diff options
Diffstat (limited to 'mk/tools/replace.mk')
-rw-r--r-- | mk/tools/replace.mk | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk index e1f9f9b72cc..7870c35326e 100644 --- a/mk/tools/replace.mk +++ b/mk/tools/replace.mk @@ -1,4 +1,4 @@ -# $NetBSD: replace.mk,v 1.93 2005/05/22 21:04:42 jlam Exp $ +# $NetBSD: replace.mk,v 1.94 2005/05/23 01:20:50 jlam Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -113,6 +113,9 @@ _USE_TOOLS:= ${_USE_TOOLS:O:u} . if !empty(USE_TOOLS:Mbison-yacc) # bison-yacc > yacc _USE_TOOLS:= ${_USE_TOOLS:Nyacc} . endif +. if !empty(USE_TOOLS:Mflex) # flex > lex +_USE_TOOLS:= ${_USE_TOOLS:Nlex} +. endif . if !empty(USE_TOOLS:Mgawk) # gawk > awk _USE_TOOLS:= ${_USE_TOOLS:Nawk} . endif @@ -435,6 +438,25 @@ TOOLS_${_TOOLS_VARNAME.find}= ${TOOLS_REAL_CMD.find} . endif .endif +.if !defined(TOOLS_IGNORE.flex) && !empty(_USE_TOOLS:Mflex) +. if !empty(PKGPATH:Mdevel/flex) +MAKEFLAGS+= TOOLS_IGNORE.flex= +. elif !empty(_TOOLS_USE_PKGSRC.flex:M[yY][eE][sS]) +. include "../../devel/flex/buildlink3.mk" +_TOOLS_DEPENDS.flex= # empty +. for _dep_ in ${BUILDLINK_DEPENDS.flex} +_TOOLS_DEPENDS.flex+= ${_dep_}:${BUILDLINK_PKGSRCDIR.flex} +. endfor +. undef _dep_ +TOOLS_DEPENDS.flex?= ${_TOOLS_DEPENDS.flex} +TOOLS_CREATE+= flex +TOOLS_FIND_PREFIX+= TOOLS_PREFIX.flex=flex +TOOLS_REAL_CMD.flex= ${TOOLS_PREFIX.flex}/bin/flex +TOOLS_${_TOOLS_VARNAME.flex}= ${TOOLS_REAL_CMD.flex} +. endif +TOOLS_ALIASES.flex= lex +.endif + .if !defined(TOOLS_IGNORE.gawk) && !empty(_USE_TOOLS:Mgawk) . if !empty(PKGPATH:Mlang/gawk) MAKEFLAGS+= TOOLS_IGNORE.gawk= |