cvs commit: src/usr.bin/make cond.c cond.h for.c for.h parse.c
parse.h
Hartmut Brandt
harti at FreeBSD.org
Mon Apr 11 00:20:10 PDT 2005
harti 2005-04-11 07:20:10 UTC
FreeBSD src repository
Modified files:
usr.bin/make cond.c cond.h for.c for.h parse.c parse.h
Log:
Rework the directive parsing code. Instead of using a lot of strcmp()s
on every line that starts with a dot use a minimal perfect hash
function and a single strcmp() on the first word after the dot
to find out whether it is really a directive call and, if yes, which
one. Then directly dispatch to a handler function for that directive
(or fall through to the dependency handling code). This makes the
directive parse a little bit more strict about the syntax: the directive
word must be followed by a character that is not alphanumerical and not
an underline (making .undefFOO illegal); .endif and .else can only be
followed by comments.
Revision Changes Path
1.46 +155 -163 src/usr.bin/make/cond.c
1.3 +20 -1 src/usr.bin/make/cond.h
1.41 +105 -107 src/usr.bin/make/for.c
1.2 +4 -1 src/usr.bin/make/for.h
1.95 +387 -324 src/usr.bin/make/parse.c
1.3 +0 -1 src/usr.bin/make/parse.h
More information about the cvs-src
mailing list