diff options
| author | Stefan Becker <stefanb@gpartner-nvidia.com> | 2016-04-13 13:55:34 +0300 |
|---|---|---|
| committer | Stefan Becker <stefanb@gpartner-nvidia.com> | 2016-04-13 13:55:34 +0300 |
| commit | 952d4453bd9cee7f5ce6b2acb79954810bde66cd (patch) | |
| tree | 7059086f41f4fb4220fdcc90aba02347b1a62785 /command.cc | |
| parent | 786881c217e1d4c3715e7d3dea6eb062677180e1 (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.cc | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; } |
