[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
diff --git a/command.cc b/command.cc
index f75a8a0..8907630 100644
--- a/command.cc
+++ b/command.cc
@@ -160,6 +160,8 @@
*echo = false;
} else if (c == '-') {
*ignore_error = true;
+ } else if (c == '+') {
+ // ignore recursion marker
} else {
break;
}