aboutsummaryrefslogtreecommitdiff
path: root/share/mk
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2019-11-15 21:19:06 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2019-11-15 21:19:06 +0000
commit5a2899ac850837f0fea8fa44eade617a2c0d01a1 (patch)
treeb11b2f06a9da754427ddeaf5ca9e4064a78d405f /share/mk
parent2e2844645fabf409f0586bfbf082fa9d952e5500 (diff)
downloadsrc-5a2899ac850837f0fea8fa44eade617a2c0d01a1.tar.gz
src-5a2899ac850837f0fea8fa44eade617a2c0d01a1.zip
Allow per-file lex and yacc options.
In order to allow software with multiple (different) options for lex and yacc add extra per-file options to the calls. This is especially useful when one .l file needs -Pprefix. Reviewed by: imp MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D22337
Notes
Notes: svn path=/head/; revision=354747
Diffstat (limited to 'share/mk')
-rw-r--r--share/mk/bsd.dep.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index 71fba474aa62..a63b9e46deca 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -108,7 +108,7 @@ OBJS_DEPEND_GUESS.${_S:${OBJS_SRCS_FILTER:ts:}}.o+= ${_S}
.for _LSRC in ${SRCS:M*.l:N*/*}
.for _LC in ${_LSRC:R}.c
${_LC}: ${_LSRC}
- ${LEX} ${LFLAGS} -o${.TARGET} ${.ALLSRC}
+ ${LEX} ${LFLAGS} ${LFLAGS.${_LSRC}} -o${.TARGET} ${.ALLSRC}
OBJS_DEPEND_GUESS.${_LC:R}.o+= ${_LC}
SRCS:= ${SRCS:S/${_LSRC}/${_LC}/}
CLEANFILES+= ${_LC}
@@ -129,7 +129,7 @@ y.tab.h: ${_YC} .NOMETA
${_YC}: .PHONY .META
.endif
${_YC}: ${_YSRC}
- ${YACC} ${YFLAGS} ${.ALLSRC}
+ ${YACC} ${YFLAGS} ${YFLAGS.${_YSRC}} ${.ALLSRC}
cp y.tab.c ${_YC}
CLEANFILES+= y.tab.c y.tab.h
.elif !empty(YFLAGS:M-d)
@@ -142,13 +142,13 @@ ${_YH}: ${_YC} .NOMETA
${_YC}: .PHONY .META
.endif
${_YC}: ${_YSRC}
- ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC}
+ ${YACC} ${YFLAGS} ${YFLAGS.${_YSRC}} -o ${_YC} ${.ALLSRC}
SRCS+= ${_YH}
CLEANFILES+= ${_YH}
.endfor
.else
${_YC}: ${_YSRC}
- ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC}
+ ${YACC} ${YFLAGS} ${YFLAGS.${_YSRC}} -o ${_YC} ${.ALLSRC}
.endif
OBJS_DEPEND_GUESS.${_YC:R}.o+= ${_YC}
.endfor