Fix the makefile template

- Corrects a python barf when something in features is None
 - Corrects makefile to prevent barf when using make -f
pull/2106/head
Jimmy Brisson 2016-07-05 10:16:50 -05:00
parent 1794463a06
commit 4b7f591d33
2 changed files with 4 additions and 3 deletions

View File

@ -13,7 +13,8 @@ endif
ifeq (,$(filter .build,$(notdir $(CURDIR))))
.SUFFIXES:
OBJDIR := .build
MAKETARGET = $(MAKE) --no-print-directory -C $(OBJDIR) -f $(CURDIR)/Makefile \
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
MAKETARGET = $(MAKE) --no-print-directory -C $(OBJDIR) -f $(mkfile_path) \
SRCDIR=$(CURDIR) $(MAKECMDGOALS)
.PHONY: $(OBJDIR) clean
all:

View File

@ -147,7 +147,7 @@ class Resources:
v = [rel_path(f, base, dot) for f in getattr(self, field)]
setattr(self, field, v)
self.features = {k: f.relative_to(base, dot) for k, f in self.features.iteritems()}
self.features = {k: f.relative_to(base, dot) for k, f in self.features.iteritems() if f}
if self.linker_script is not None:
self.linker_script = rel_path(self.linker_script, base, dot)
@ -160,7 +160,7 @@ class Resources:
v = [f.replace('\\', '/') for f in getattr(self, field)]
setattr(self, field, v)
self.features = {k: f.win_to_unix() for k, f in self.features.iteritems()}
self.features = {k: f.win_to_unix() for k, f in self.features.iteritems() if f}
if self.linker_script is not None:
self.linker_script = self.linker_script.replace('\\', '/')