From owner-svn-src-head@freebsd.org Fri Nov 15 21:19:07 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 728471B0868; Fri, 15 Nov 2019 21:19:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47FB6z0yDFz4Rxs; Fri, 15 Nov 2019 21:19:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E91A81EE00; Fri, 15 Nov 2019 21:19:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAFLJ6l8083769; Fri, 15 Nov 2019 21:19:06 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAFLJ6m4083768; Fri, 15 Nov 2019 21:19:06 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201911152119.xAFLJ6m4083768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 15 Nov 2019 21:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354747 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 354747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Nov 2019 21:19:07 -0000 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