Add some simple sanity checks around PHONY targets
These checks won't apply for all build systems, but for Android, we'd
like to assert:
* That .PHONY targets don't look like real files. This is mostly to
prevent confusion, and just checks to see if any targets marked as phony
have a '/' character in their name.
* That real files don't depend on a PHONY target. If they do, the real
file would be rebuilt on every build execution, potentially causing much
of the build graph to be rebuilt on every execution.
Change-Id: Ibc3023ddccfca5123be41a5124e7bc134e37d2d2
diff --git a/flags.h b/flags.h
index 36a12e8..d19a3b2 100644
--- a/flags.h
+++ b/flags.h
@@ -47,6 +47,10 @@
bool werror_implicit_rules;
bool warn_suffix_rules;
bool werror_suffix_rules;
+ bool warn_real_to_phony;
+ bool werror_real_to_phony;
+ bool warn_phony_looks_real;
+ bool werror_phony_looks_real;
const char* goma_dir;
const char* ignore_dirty_pattern;
const char* no_ignore_dirty_pattern;