From 026aa086dcb09d48ef658ccfc3e4a857bf416016 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 29 Dec 2012 22:13:14 +0200 Subject: Better text output in shell script. --- shellgenerator.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'shellgenerator.py') diff --git a/shellgenerator.py b/shellgenerator.py index 60ece2637..6ac6f0b73 100755 --- a/shellgenerator.py +++ b/shellgenerator.py @@ -29,7 +29,9 @@ class ShellGenerator(): self.interpreter.run() outfilename = os.path.join(self.environment.get_build_dir(), self.build_filename) outfile = open(outfilename, 'w') - outfile.write('#!/bin/sh\n') + outfile.write('#!/bin/sh\n\n') + outfile.write('echo This is an autogenerated shell script build file for project \\"%s\\".\n' + % self.interpreter.get_project()) self.generate_commands(outfile) outfile.close() os.chmod(outfilename, stat.S_IREAD | stat.S_IWRITE | stat.S_IEXEC |\ @@ -55,7 +57,7 @@ class ShellGenerator(): commands += compiler.get_output_flags() commands.append(abs_obj) quoted = environment.shell_quote(commands) + ['\n'] - outfile.write('\necho Compiling %s\n' % src) + outfile.write('\necho Compiling \\"%s\\"\n' % src) outfile.write(' '.join(quoted)) return abs_obj @@ -67,7 +69,7 @@ class ShellGenerator(): commands += linker.get_output_flags() commands.append(outname) quoted = environment.shell_quote(commands) + ['\n'] - outfile.write('\necho Linking %s.\n' % outname) + outfile.write('\necho Linking \\"%s\\".\n' % outname) outfile.write(' '.join(quoted)) def generate_commands(self, outfile): -- cgit v1.2.3