From eba4df6903eea9dd0a4f33ec915fe097c78322a4 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Sun, 26 Nov 2017 14:02:04 +0100 Subject: [PATCH] Add preproc user args before internal args, rather than after them. This allows using e.g. --precmd=python --prearg=mypreproc.py and still benefit from automatic defines, but on the negative side (or not?), it doesn't allow user options to override mcpp/gcpp internal options; user is forced to use -p ext in that case. --- main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.py b/main.py index 919fbf7..f24ed43 100755 --- a/main.py +++ b/main.py @@ -577,7 +577,7 @@ def main(argv): shortname = os.path.basename(fname) # Build preprocessor command line - preproc_cmdline = [preproc_command] + preproc_cmdline = [preproc_command] + preproc_user_args if predefines: if preproc == 'gcpp': preproc_cmdline += [ @@ -609,7 +609,6 @@ def main(argv): preproc_cmdline.append('-D__SHORTFILE__="%s"' % shortname) preproc_cmdline.append('-D__OPTIMIZER__=LSL PyOptimizer') preproc_cmdline.append('-D__OPTIMIZER_VERSION__=' + VERSION) - preproc_cmdline += preproc_user_args if type(script) is unicode: script = script.encode('utf8')