svn commit: r354747 - head/share/mk

Cy Schubert Cy.Schubert at cschubert.com
Fri Nov 15 21:25:30 UTC 2019


On November 15, 2019 2:19:06 PM MST, "Bjoern A. Zeeb" <bz at FreeBSD.org> wrote:
>Author: bz
>Date: Fri Nov 15 21:19:06 2019
>New Revision: 354747
>URL: https://svnweb.freebsd.org/changeset/base/354747
>
>Log:
>  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
>
>Modified:
>  head/share/mk/bsd.dep.mk
>
>Modified: head/share/mk/bsd.dep.mk
>==============================================================================
>--- head/share/mk/bsd.dep.mk	Fri Nov 15 20:43:39 2019	(r354746)
>+++ head/share/mk/bsd.dep.mk	Fri Nov 15 21:19:06 2019	(r354747)
>@@ -108,7 +108,7 @@
>OBJS_DEPEND_GUESS.${_S:${OBJS_SRCS_FILTER:ts:}}.o+=	${
> .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

Thank you.


-- 
Pardon the typos and autocorrect, small keyboard in use. 
Cy Schubert <Cy.Schubert at cschubert.com>
FreeBSD UNIX: <cy at FreeBSD.org> Web: https://www.FreeBSD.org

The need of the many outweighs the greed of the few.

Sent from my Android device with K-9 Mail. Please excuse my brevity.


More information about the svn-src-all mailing list