yacc has had a -o option since at least FreeBSD 3.0 so no bootstrapping is
required.
Details
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 5835 Build 6124: arc lint + arc unit
Event Timeline
Generally, yacc sources that use a prefix instead of the default "yy" would still require custom rules. pmake doesn't support for example, conf_parse.o: YFLAGS+=-pconf_ like GNU make does so a custom rule would still be required.
share/mk/bsd.suffixes-posix.mk | ||
---|---|---|
31 | In addition to generating a ${.PREFIX}.y.tab.c, a ${.PREFIX}.y.tab.h is also generated. A corresponding .l may reference the .h file. Some .y files require a -pNNN prefix which will correspond to a .l file's -PNNN prefix: a custom per target YFLAGS. | |
36 | Is there a way to pass a custom LFLAGS to a target without altering the global LFLAGS for the whole Makefile? | |
43 | Could this be -o ${.TARGET} replacing the mv? | |
share/mk/bsd.suffixes.mk | ||
73 | Same comment as above. | |
85 | For consistency, -o ? |
share/mk/bsd.suffixes.mk | ||
---|---|---|
70 | Missing space between y.tab.c and ${. |
Arg. This change only worked because almost nothing actually uses these rules. The bsd.dep.mk rules for yacc are used instead. They have then genuinely bizarre and broken effect of generating a foo.[ch] files, but also keeping the y.tab.[ch] around because most .l files assume the default y.tab.h. Fixing this is probably a good idea but it's a considerably bigger job than I though.
share/mk/bsd.suffixes-posix.mk | ||
---|---|---|
43 | I tried that, -o ${.TARGET} doesn't write a .c file, that still goes to stdout. |