aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yapymake/makefile/__init__.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/yapymake/makefile/__init__.py b/yapymake/makefile/__init__.py
index 086ea2c..0a272cf 100644
--- a/yapymake/makefile/__init__.py
+++ b/yapymake/makefile/__init__.py
@@ -401,12 +401,6 @@ class CommandLine:
file.args.silent or \
file.special_target_has_prereq('.SILENT', current_target.name)
- # > If the command prefix contains a <plus-sign>, this indicates a makefile command line that shall be executed
- # > even if -n, -q, or -t is specified.
- should_execute = self.always_execute or not (file.args.dry_run or file.args.question or file.args.touch)
- if not should_execute:
- return
-
execution_line = file.expand_macros(self.execution_line, current_target)
# > Except as described under the at-sign prefix...
@@ -414,6 +408,12 @@ class CommandLine:
# > the execution line shall be written to the standard output.
print(execution_line)
+ # > If the command prefix contains a <plus-sign>, this indicates a makefile command line that shall be executed
+ # > even if -n, -q, or -t is specified.
+ should_execute = self.always_execute or not (file.args.dry_run or file.args.question or file.args.touch)
+ if not should_execute:
+ return
+
# > The execution line shall then be executed by a shell as if it were passed as the argument to the system()
# > interface, except that if errors are not being ignored then the shell -e option shall also be in effect.
# TODO figure out how to pass -e to the shell reliably
@@ -423,6 +423,7 @@ class CommandLine:
# > an error message to standard error.
if not ignore_errors and result != 0:
print('error!', file=sys.stderr)
+ # TODO implement keep-going
sys.exit(1)
BUILTIN_INFERENCE_RULES = [