make: Add support for GNU make pattern rules

This commit is contained in:
Colomban Wendling 2015-04-04 01:27:58 +02:00
parent a11d67bb0b
commit 39f359b09a
4 changed files with 16 additions and 1 deletions

View File

@ -68,7 +68,7 @@ static int skipToNonWhite (int c)
static boolean isIdentifier (int c)
{
return (boolean)(c != '\0' && (isalnum (c) || strchr (".-_/$(){}", c) != NULL));
return (boolean)(c != '\0' && (isalnum (c) || strchr (".-_/$(){}%", c) != NULL));
}
static boolean isSpecialTarget (vString *const name)

View File

@ -201,6 +201,7 @@ test_sources = \
local.c \
macros.c \
make-comment-in-rule.mak \
make-gnumake-pattern-rules.mak \
make-multi-target.mak \
make-target-with-parentheses.mak \
make-variable-on-cmdline.mak \

View File

@ -0,0 +1,8 @@
%.o: %.c
touch $@
%.p %.q: %.d
touch $@
%a b%:
touch $@

View File

@ -0,0 +1,6 @@
# format=tagmanager
%.oÌ16Ö0
%.pÌ16Ö0
%.qÌ16Ö0
%aÌ16Ö0
b%Ì16Ö0