summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/var.h
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-05-10 08:06:13 +0000
committerharti <harti@FreeBSD.org>2005-05-10 08:06:13 +0000
commit35798a61f5bc26fc5367c82049406055d1e71604 (patch)
tree848bbd774031d41facff25de4a70857f9eb8b2c1 /usr.bin/make/var.h
parent6352eca8c58c516b39b9fcfe237e2b4736fa66c1 (diff)
downloadFreeBSD-src-35798a61f5bc26fc5367c82049406055d1e71604.zip
FreeBSD-src-35798a61f5bc26fc5367c82049406055d1e71604.tar.gz
Make make a little bit more POSIXish with regard to option parsing:
take everything after -- as either a macro assignment or a target. Note that make still reorders arguments before --: anything starting with a dash is considered an option, anything which contains an equal sign is considered a macro assignment and everything else a target. This still is not POSIX with regard to the options, but it will probably not change because it has been make's behaviour for ages. Add a new function Var_Match() that correctly skips a macro call by just doing the same as Var_Subst() but without producing output. This will help making the parser more robust. Patches: 7.190,7.191 Submitted by: Max Okumoto <okumoto@ucsd.edu>
Diffstat (limited to 'usr.bin/make/var.h')
-rw-r--r--usr.bin/make/var.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/make/var.h b/usr.bin/make/var.h
index a81e743..dbc41db 100644
--- a/usr.bin/make/var.h
+++ b/usr.bin/make/var.h
@@ -94,6 +94,7 @@ void Var_Delete(const char *, struct GNode *);
void Var_Dump(const struct GNode *);
Boolean Var_Exists(const char *, struct GNode *);
void Var_Init(char **);
+size_t Var_Match(const char [], struct GNode *);
char *Var_Parse(const char *, struct GNode *, Boolean, size_t *, Boolean *);
char *Var_Quote(const char *);
void Var_Set(const char *, const char *, struct GNode *);
OpenPOWER on IntegriCloud