aboutsummaryrefslogtreecommitdiff
path: root/command.cc
diff options
context:
space:
mode:
authorStefan Becker <stefanb@gpartner-nvidia.com>2016-04-13 13:55:34 +0300
committerStefan Becker <stefanb@gpartner-nvidia.com>2016-04-13 13:55:34 +0300
commit952d4453bd9cee7f5ce6b2acb79954810bde66cd (patch)
tree7059086f41f4fb4220fdcc90aba02347b1a62785 /command.cc
parent786881c217e1d4c3715e7d3dea6eb062677180e1 (diff)
[C++] Ignore recursive marker in recipes
Test case: $ cat Makefile.recursive .PHONY: default default: +echo DONE $ ckati --warn --gen_all_targets --regen --ninja -f Makefile.recursive Makefile.recursive was modified, regenerating... $ fgrep DONE build.ninja command = /bin/sh -c "+echo DONE" $ ninja [1/1] build default FAILED: default /bin/sh -c "+echo DONE" /bin/sh: + : invalid option Usage: /bin/sh [GNU long option] [option] ... ... Fixes https://github.com/google/kati/issues/57 Change-Id: Ic40d71ff2b168158661eb2eac638adaeadaec1fe
Diffstat (limited to 'command.cc')
-rw-r--r--command.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/command.cc b/command.cc
index f75a8a0..8907630 100644
--- a/command.cc
+++ b/command.cc
@@ -160,6 +160,8 @@ void ParseCommandPrefixes(StringPiece* s, bool* echo, bool* ignore_error) {
*echo = false;
} else if (c == '-') {
*ignore_error = true;
+ } else if (c == '+') {
+ // ignore recursion marker
} else {
break;
}