diff options
author | ru <ru@FreeBSD.org> | 2004-01-12 15:29:47 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2004-01-12 15:29:47 +0000 |
commit | 7f5ae3ced763dc17dd3ceeb474bc6920a56dc69a (patch) | |
tree | 5a38d5fc20d2f1c396ac2d2fb009aa50c7d8717e | |
parent | 17a33cbd75fb964e5b2b08981bf59ff9fae027b0 (diff) | |
download | FreeBSD-src-7f5ae3ced763dc17dd3ceeb474bc6920a56dc69a.zip FreeBSD-src-7f5ae3ced763dc17dd3ceeb474bc6920a56dc69a.tar.gz |
- Replaced several := ops with their += equivalents; the old
form became unnecessary with the bsd.prog.mk,v 1.69 change.
- Eliminated duplicate y.tab.h in SRCS.
Reviewed by: bde
- Complementary to the said bsd.prog.mk change, use the fact
that inner .for loops are not real loops but a tricky form
of a local macro for the outer loop's variable, and switch
to using faster variable modifiers to replace extensions.
-rw-r--r-- | share/mk/bsd.dep.mk | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index e667fc9..9ae361e 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -71,32 +71,31 @@ tags: ${SRCS} CLEANFILES?= .for _LSRC in ${SRCS:M*.l:N*/*} -.for _LC in ${_LSRC:S/.l/.c/} +.for _LC in ${_LSRC:R}.c ${_LC}: ${_LSRC} ${LEX} -t ${LFLAGS} ${.ALLSRC} > ${.TARGET} SRCS:= ${SRCS:S/${_LSRC}/${_LC}/} -CLEANFILES:= ${CLEANFILES} ${_LC} +CLEANFILES+= ${_LC} .endfor .endfor .for _YSRC in ${SRCS:M*.y:N*/*} -.for _YC in ${_YSRC:S/.y/.c/} +.for _YC in ${_YSRC:R}.c SRCS:= ${SRCS:S/${_YSRC}/${_YC}/} -CLEANFILES:= ${CLEANFILES} ${_YC} +CLEANFILES+= ${_YC} .if ${YFLAGS:M-d} != "" && ${SRCS:My.tab.h} .ORDER: ${_YC} y.tab.h ${_YC} y.tab.h: ${_YSRC} ${YACC} ${YFLAGS} ${.ALLSRC} cp y.tab.c ${_YC} -SRCS:= ${SRCS} y.tab.h -CLEANFILES:= ${CLEANFILES} y.tab.c y.tab.h +CLEANFILES+= y.tab.c y.tab.h .elif ${YFLAGS:M-d} != "" -.for _YH in ${_YC:S/.c/.h/} +.for _YH in ${_YC:R}.h .ORDER: ${_YC} ${_YH} ${_YC} ${_YH}: ${_YSRC} ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} -SRCS:= ${SRCS} ${_YH} -CLEANFILES:= ${CLEANFILES} ${_YH} +SRCS+= ${_YH} +CLEANFILES+= ${_YH} .endfor .else ${_YC}: ${_YSRC} |