From 9e9c334b402fe79befb82153027e316a6cb1ff5c Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Sun, 1 Mar 2015 14:53:03 +0000 Subject: 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 --- gen_makefile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gen_makefile.py') 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)) -- cgit v1.2.3