diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-03-01 14:53:03 +0000 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-03-01 15:02:18 +0000 |
commit | 9e9c334b402fe79befb82153027e316a6cb1ff5c (patch) | |
tree | b090b20a7cdd93e3a963c5a3245c9a497897e528 | |
parent | b518ed8dc4a884f9c48998367db17b3f96561ca7 (diff) |
avoid trailing spaces
if no dependencies are given, we should not print a space after the
colon.
fixed by checking if dependencies are given
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
-rwxr-xr-x | gen_makefile.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gen_makefile.py b/gen_makefile.py index 2f4e3f8..6585f3b 100755 --- a/gen_makefile.py +++ b/gen_makefile.py @@ -34,7 +34,11 @@ class makefile_generator(): print('') def append_rule(self, target, dep='', cmds=[]): - print('%s: %s' % (target, dep)) + print(target + ':', end='') + if dep is not '': + print(' ', end='') + + print(dep) for cmd in cmds: print('\t%s' % (cmd)) |