diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-08-06 00:36:05 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-08-06 00:36:05 +0100 |
commit | 5b9fee7c98bc2867a0d02ee8859a1fbba18c2fb3 (patch) | |
tree | a6016118eab407777fea9e83ae30e5fb88d60679 /gen_makefile.py | |
parent | c3319558848de337019f8f1440ef7884ae6e4d66 (diff) |
removed trailing spaces after variables with no value
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'gen_makefile.py')
-rwxr-xr-x | gen_makefile.py | 8 |
1 files 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('') |