summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2020-04-20 08:17:33 +0000
committerespie <espie@openbsd.org>2020-04-20 08:17:33 +0000
commit0fdb33d16d5e903440e3b9706f46e17ba27951bc (patch)
treed9ba76200985211ac4753b5e1dc9f2403567b21d /usr.bin/make
parentOnly trim blank lines when the source pane is not the target pane, (diff)
downloadwireguard-openbsd-0fdb33d16d5e903440e3b9706f46e17ba27951bc.tar.xz
wireguard-openbsd-0fdb33d16d5e903440e3b9706f46e17ba27951bc.zip
in case there are several operators on a dependency line, prefer the
standard one (:) to the very BSD specific (!) so that standard Makefiles keep working in the presence of ! in filenames. This doesn't supersede the usual heuristics of choosing the operator followed by space if several are present. okay millert@
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/parse.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index a5518dd6b58..35ab1671060 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.132 2020/01/26 12:41:21 espie Exp $ */
+/* $OpenBSD: parse.c,v 1.133 2020/04/20 08:17:33 espie Exp $ */
/* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */
/*
@@ -598,7 +598,10 @@ found_delimiter(const char *s)
do {
p += strcspn(p, "!:");
if (*p == '\0')
- break;
+ break;
+ /* always prefer : to ! if not space separated */
+ if (*p == ':' && *s == '!')
+ return false;
p++;
} while (*p != '\0' && !ISSPACE(*p));