]> granicus.if.org Git - nethack/commit
makedefs conditional grep (trunk only)
authorkeni <keni>
Sun, 6 Apr 2008 00:48:40 +0000 (00:48 +0000)
committerkeni <keni>
Sun, 6 Apr 2008 00:48:40 +0000 (00:48 +0000)
commitd175a3f7fe8bfe874af43ed81f7f9c87ffa8e810
tree19904d4ef3ede9f6c25088021ec1051a9a35edf9
parent9f2322b1f86a7588b687112a5added37f7a9980c
makedefs conditional grep (trunk only)
This code (except for some of the argument parsing changes) is not used yet.
mdgrep.pl generates mdgrep.h; like the lex and yacc files we ship mdgrep.h
 pre-generated; there is no need for perl on end-user/end-compiler systems.
 (In fact mdgrep.h is so simple mdgrep.pl is probably overkill.)
mdgrep.h creates an array reflecting the compiler options in effect
The changes to makedefs break the Mac OS9 compile; if necessary the fix is
 simple and documented (but I think that port is permanently dead).
With that port out of the way, makedefs can be allowed to take real options;
 none of the current options have been changed.  Instead, a second sub-main
 routine has been added to handle options starting with two hyphens and all
 the new options start with two hyphens:
--input specifies the input file (- is stdin)
--output specifies the output file (- is stdout)
--grep causes the input file to be filtered into the output file
--grep-showvars dumps the info from the array in mdgrep.h
--grep-trace turns on tracing of the grep filtering
Docs for the filtering language are in the source.
util/makedefs.c
util/mdgrep.h [new file with mode: 0644]
util/mdgrep.pl [new file with mode: 0644]