diff options
-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} |