From 9abfc01938b40272982a592d297b8b7d2c93f925 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Sat, 16 May 2015 03:28:22 +0100 Subject: do not add a final separator. The Makefile used to have a trailing newline at the end of the file. Signed-off-by: Olivier Gayot --- gen_makefile.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gen_makefile.py') diff --git a/gen_makefile.py b/gen_makefile.py index 93adaf0..7b66592 100755 --- a/gen_makefile.py +++ b/gen_makefile.py @@ -43,8 +43,6 @@ class makefile_generator(): for cmd in cmds: print('\t%s' % (cmd)) - self.append_separator() - def append_static_rule(self, target, dep='', cmds=[]): self.append_rule(target, dep, cmds) self.phony.append(target) @@ -70,11 +68,13 @@ class makefile_generator(): # first rule to be evaluated self.append_static_rule('all', '$(NAME)') + self.append_separator() # linkage self.append_rule('$(NAME)', '$(OBJ)', [ '$(%s) -o "$@" $^ $(LDFLAGS)' % (self._compiler_var) ]) + self.append_separator() # include dependencies print('-include $(DEP)') @@ -85,18 +85,22 @@ class makefile_generator(): '$(%s) -MM $(CPPFLAGS) $(%s) $< -MF $@ -MT "$*.o $@"' % (self._compiler_var, self._compiler_flags_var), ]) + self.append_separator() self.append_static_rule('clean', cmds=[ '$(RM) $(OBJ)', '$(RM) $(NAME)', ]) + self.append_separator() self.append_static_rule('mrproper', 'clean', [ '$(RM) $(DEP)', ]) + self.append_separator() self.append_static_rule('distclean', 'mrproper', [ '$(RM) $(addsuffix ~,$(SRC))', '$(RM) $(wildcard $(addsuffix .sw*,$(addprefix .,$(SRC))))', ]) + self.append_separator() # phony rule self.append_rule('.PHONY', ' '.join(self.phony)) -- cgit v1.2.3