diff options
author | harti <harti@FreeBSD.org> | 2005-04-28 15:37:25 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2005-04-28 15:37:25 +0000 |
commit | 5063114341528789e7028bb9807e2d1d364d9de9 (patch) | |
tree | 8f067ab4376d2e46aee60b3591c3912a0093058e /usr.bin/make/cond.c | |
parent | c2ee427f58870a57f71f4e20d3f83c4e6bdde733 (diff) | |
download | FreeBSD-src-5063114341528789e7028bb9807e2d1d364d9de9.zip FreeBSD-src-5063114341528789e7028bb9807e2d1d364d9de9.tar.gz |
Introduce a flag to enable extended warnings (-x) and make them off
by default. This should fix the problem of getting lots of errors
when building with an up-to-date make and old *.mk files.
Diffstat (limited to 'usr.bin/make/cond.c')
-rw-r--r-- | usr.bin/make/cond.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c index 1269eec..792fe75 100644 --- a/usr.bin/make/cond.c +++ b/usr.bin/make/cond.c @@ -1123,8 +1123,9 @@ Cond_Else(char *line __unused, int code __unused, int lineno __unused) while (isspace((u_char)*line)) line++; - if (*line != '\0') { - Parse_Error(PARSE_WARNING, "junk after .else ignored '%s'", line); + if (*line != '\0' && (warnflags & WARN_DIRSYNTAX)) { + Parse_Error(PARSE_WARNING, "junk after .else ignored '%s'", + line); } if (condTop == MAXIF) { @@ -1163,9 +1164,11 @@ Cond_Endif(char *line __unused, int code __unused, int lineno __unused) while (isspace((u_char)*line)) line++; - if (*line != '\0') { - Parse_Error(PARSE_WARNING, "junk after .endif ignored '%s'", line); + if (*line != '\0' && (warnflags & WARN_DIRSYNTAX)) { + Parse_Error(PARSE_WARNING, "junk after .endif ignored '%s'", + line); } + /* * End of a conditional section. If skipIfLevel is non-zero, * that conditional was skipped, so lines following it should |