version 1.18, 1999/05/04 16:09:25 |
version 1.19, 1999/05/04 16:44:45 |
|
|
*cp && !isspace (*cp) && (*cp != '('); |
*cp && !isspace (*cp) && (*cp != '('); |
cp++) |
cp++) |
{ |
{ |
|
/* |
|
* We don't want to end a word on ':' or '!' if there is a |
|
* better match later on in the string. By "better" I mean |
|
* one that is followed by whitespace. This allows the user |
|
* to have targets like: |
|
* fie::fi:fo: fum |
|
* where "fie::fi:fo" is the target. In real life this is used |
|
* for perl5 library man pages where "::" separates an object |
|
* from its class. Ie: "File::Spec::Unix". This behaviour |
|
* is also consistent with other versions of make. |
|
*/ |
if (*cp == '!' || *cp == ':') { |
if (*cp == '!' || *cp == ':') { |
char *p = cp + 1; |
char *p = cp + 1; |
|
|
|
|
break; /* no chance, not enough room */ |
break; /* no chance, not enough room */ |
/* |
/* |
* Only end the word on ':' or '!' if there is not |
* Only end the word on ':' or '!' if there is not |
* a match later on followed by whitespace. This |
* a match later on followed by whitespace. |
* allows us to have targets with embedded ':' and '!' |
|
* characters. |
|
*/ |
*/ |
while ((p = strchr(p + 1, *cp)) && !isspace(*(p + 1))) |
while ((p = strchr(p + 1, *cp)) && !isspace(*(p + 1))) |
; |
; |