From 5b9fee7c98bc2867a0d02ee8859a1fbba18c2fb3 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Thu, 6 Aug 2015 00:36:05 +0100 Subject: removed trailing spaces after variables with no value Signed-off-by: Olivier Gayot --- gen_makefile.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gen_makefile.py b/gen_makefile.py index fb91242..93c8c3c 100755 --- a/gen_makefile.py +++ b/gen_makefile.py @@ -26,8 +26,12 @@ class makefile_generator(): self._binary = 'a.out' self.phony = [] - def append_variable(self, name, value=''): - print('%s%.*s= %s' % (name, 16 - len(name), ' ', value)) + def append_variable(self, name, value=None): + print('%s%.*s=' % (name, 16 - len(name), ' '), end='') + if value is not None: + print(' ' + value) + else: + print('') def append_separator(self): print('') -- cgit v1.2.3