diff options
-rwxr-xr-x | shellgenerator.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/shellgenerator.py b/shellgenerator.py index e4317a7..3333dd3 100755 --- a/shellgenerator.py +++ b/shellgenerator.py @@ -32,6 +32,7 @@ class ShellGenerator(): 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()) + outfile.write('echo This is experimental and most likely will not work!\n') self.generate_commands(outfile) outfile.close() os.chmod(outfilename, stat.S_IREAD | stat.S_IWRITE | stat.S_IEXEC |\ @@ -58,9 +59,9 @@ class ShellGenerator(): commands.append(abs_src) commands += compiler.get_output_flags() commands.append(abs_obj) - quoted = environment.shell_quote(commands) + ['\n'] + quoted = environment.shell_quote(commands) outfile.write('\necho Compiling \\"%s\\"\n' % src) - outfile.write(' '.join(quoted)) + outfile.write(' '.join(quoted) + ' || exit\n') return abs_obj def generate_link(self, target, outfile, outname, obj_list): @@ -72,9 +73,9 @@ class ShellGenerator(): commands += dep.get_link_flags() commands += linker.get_output_flags() commands.append(outname) - quoted = environment.shell_quote(commands) + ['\n'] + quoted = environment.shell_quote(commands) outfile.write('\necho Linking \\"%s\\".\n' % outname) - outfile.write(' '.join(quoted)) + outfile.write(' '.join(quoted) + ' || exit\n') def generate_commands(self, outfile): for i in self.interpreter.get_executables().items(): |