tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
make: :: embeded in targets
One of my collegues has been running freebsd's regression tests with
bmake...
The patch below, allows something like:
all: silly::target
silly::target:
@echo hi
to work, instead of saying
make: don't know how to make silly::target. Stop
Index: parse.c
===================================================================
RCS file: /cvsroot/src/usr.bin/make/parse.c,v
retrieving revision 1.176
diff -u -p -r1.176 parse.c
--- parse.c 20 Feb 2011 23:12:09 -0000 1.176
+++ parse.c 4 Mar 2011 06:11:22 -0000
@@ -1169,9 +1169,22 @@ ParseDoDependency(char *line)
do {
for (cp = line; *cp && (ParseIsEscaped(lstart, cp) ||
- !(isspace((unsigned char)*cp) ||
- *cp == '!' || *cp == ':' || *cp == LPAREN));
+ !(isspace((unsigned char)*cp) || *cp == LPAREN));
cp++) {
+ if (*cp == ':' || *cp == '!') {
+ /*
+ * ignore sequences of ':' and '!' that are not
+ * followed by white-space or end-of-line.
+ */
+ size_t x;
+
+ x = strspn(cp, ":!");
+ if (cp[x] != '\0' && !isspace((unsigned char)cp[x])) {
+ cp += x - 1;
+ continue;
+ }
+ break;
+ }
if (*cp == '$') {
/*
* Must be a dynamic source (would have been expanded
Home |
Main Index |
Thread Index |
Old Index