diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/tools/autoconf.mk | 29 | ||||
-rw-r--r-- | mk/tools/automake.mk | 29 | ||||
-rw-r--r-- | mk/tools/defaults.mk | 4 | ||||
-rw-r--r-- | mk/tools/replace.mk | 78 |
4 files changed, 98 insertions, 42 deletions
diff --git a/mk/tools/autoconf.mk b/mk/tools/autoconf.mk index 42105311c04..1ff96fc59c4 100644 --- a/mk/tools/autoconf.mk +++ b/mk/tools/autoconf.mk @@ -1,4 +1,4 @@ -# $NetBSD: autoconf.mk,v 1.11 2005/06/11 05:22:03 jlam Exp $ +# $NetBSD: autoconf.mk,v 1.12 2005/07/15 20:14:04 jlam Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -66,7 +66,8 @@ # # Only allow one of "autoconf" and "autoconf213" in USE_TOOLS. -.if !empty(USE_TOOLS:Mautoconf) && !empty(USE_TOOLS:Mautoconf213) +.if !empty(USE_TOOLS:C/:.*//:Mautoconf) && \ + !empty(USE_TOOLS:C/:.*//:Mautoconf213) PKG_FAIL_REASON+= "\`\`autoconf'' and \`\`autoconf213'' conflict in USE_TOOLS." .endif @@ -85,16 +86,20 @@ _TOOLS_AC_NAMES+= ifnames ifnames-2.13 _TOOLS_AC_TYPE.${_t_}?= TOOLS_GNU_MISSING .endfor _t_ -.if !defined(TOOLS_IGNORE.autoconf) && !empty(USE_TOOLS:Mautoconf) +.if !defined(TOOLS_IGNORE.autoconf) && !empty(USE_TOOLS:C/:.*//:Mautoconf) . if !empty(PKGPATH:Mdevel/autoconf) MAKEFLAGS+= TOOLS_IGNORE.autoconf= . else AUTOCONF_REQD?= 2.50 -TOOLS_DEPMETHOD.autoconf?= BUILD_DEPENDS +. if !empty(USE_TOOLS:Mautoconf\:run) +_TOOLS_DEPMETHOD.autoconf= DEPENDS +. else +_TOOLS_DEPMETHOD.autoconf= BUILD_DEPENDS +. endif TOOLS_DEPENDS.autoconf?= autoconf>=${AUTOCONF_REQD}:../../devel/autoconf -. if empty(${TOOLS_DEPMETHOD.autoconf}:M${TOOLS_DEPENDS.autoconf}) -${TOOLS_DEPMETHOD.autoconf}+= ${TOOLS_DEPENDS.autoconf} +. if empty(${_TOOLS_DEPMETHOD.autoconf}:M${TOOLS_DEPENDS.autoconf}) +${_TOOLS_DEPMETHOD.autoconf}+= ${TOOLS_DEPENDS.autoconf} . endif EVAL_PREFIX+= _TOOLS_AC_PREFIX=autoconf @@ -121,16 +126,20 @@ TOOLS_REAL_CMD.ifnames= ${_TOOLS_AC_PREFIX}/bin/ifnames . endif .endif -.if !defined(TOOLS_IGNORE.autoconf213) && !empty(USE_TOOLS:Mautoconf213) +.if !defined(TOOLS_IGNORE.autoconf213) && !empty(USE_TOOLS:C/:.*//:Mautoconf213) . if !empty(PKGPATH:Mdevel/autoconf213) MAKEFLAGS+= TOOLS_IGNORE.autoconf213= . else AUTOCONF_REQD?= 2.13 -TOOLS_DEPMETHOD.autoconf213?= BUILD_DEPENDS +. if !empty(USE_TOOLS:Mautoconf213\:run) +_TOOLS_DEPMETHOD.autoconf213= DEPENDS +. else +_TOOLS_DEPMETHOD.autoconf213= BUILD_DEPENDS +. endif TOOLS_DEPENDS.autoconf213?= autoconf213>=${AUTOCONF_REQD}:../../devel/autoconf213 -. if empty(${TOOLS_DEPMETHOD.autoconf213}:M${TOOLS_DEPENDS.autoconf213}) -${TOOLS_DEPMETHOD.autoconf213}+= ${TOOLS_DEPENDS.autoconf213} +. if empty(${_TOOLS_DEPMETHOD.autoconf213}:M${TOOLS_DEPENDS.autoconf213}) +${_TOOLS_DEPMETHOD.autoconf213}+= ${TOOLS_DEPENDS.autoconf213} . endif EVAL_PREFIX+= _TOOLS_AC_PREFIX=autoconf213 diff --git a/mk/tools/automake.mk b/mk/tools/automake.mk index 21acd800355..e35256af448 100644 --- a/mk/tools/automake.mk +++ b/mk/tools/automake.mk @@ -1,4 +1,4 @@ -# $NetBSD: automake.mk,v 1.14 2005/06/11 05:22:03 jlam Exp $ +# $NetBSD: automake.mk,v 1.15 2005/07/15 20:14:04 jlam Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -79,7 +79,8 @@ USE_TOOLS+= gettext-m4 .endif # Only allow one of "automake" and "automake14" in USE_TOOLS. -.if !empty(USE_TOOLS:Mautomake) && !empty(USE_TOOLS:Mautomake14) +.if !empty(USE_TOOLS:C/:.*//:Mautomake) && \ + !empty(USE_TOOLS:C/:.*//:Mautomake14) PKG_FAIL_REASON+= "\`\`automake'' and \`\`automake14'' conflict in USE_TOOLS." .endif @@ -103,17 +104,21 @@ _TOOLS_AM_NAMES+= automake automake-1.4 \ _TOOLS_AM_TYPE.${_t_}?= TOOLS_GNU_MISSING .endfor -.if !defined(TOOLS_IGNORE.automake) && !empty(USE_TOOLS:Mautomake) +.if !defined(TOOLS_IGNORE.automake) && !empty(USE_TOOLS:C/:.*//:Mautomake) . if !empty(PKGPATH:Mdevel/automake) MAKEFLAGS+= TOOLS_IGNORE.automake= . else AUTOMAKE_REQD?= 1.9 AUTOCONF_REQD?= 2.58 -TOOLS_DEPMETHOD.automake?= BUILD_DEPENDS +. if !empty(USE_TOOLS:Mautomake\:run) +_TOOLS_DEPMETHOD.automake= DEPENDS +. else +_TOOLS_DEPMETHOD.automake= BUILD_DEPENDS +. endif TOOLS_DEPENDS.automake?= automake>=${AUTOMAKE_REQD}:../../devel/automake -. if empty(${TOOLS_DEPMETHOD.automake}:M${TOOLS_DEPENDS.automake}) -${TOOLS_DEPMETHOD.automake}+= ${TOOLS_DEPENDS.automake} +. if empty(${_TOOLS_DEPMETHOD.automake}:M${TOOLS_DEPENDS.automake}) +${_TOOLS_DEPMETHOD.automake}+= ${TOOLS_DEPENDS.automake} . endif EVAL_PREFIX+= _TOOLS_AM_PREFIX=automake @@ -125,17 +130,21 @@ TOOLS_REAL_CMD.automake= ${_TOOLS_AM_PREFIX}/bin/automake . endif .endif -.if !defined(TOOLS_IGNORE.automake14) && !empty(USE_TOOLS:Mautomake14) +.if !defined(TOOLS_IGNORE.automake14) && !empty(USE_TOOLS:C/:.*//:Mautomake14) . if !empty(PKGPATH:Mdevel/automake14) MAKEFLAGS+= TOOLS_IGNORE.automake14= . else AUTOMAKE_REQD?= 1.4 AUTOCONF_REQD?= 2.13 -TOOLS_DEPMETHOD.automake14?= BUILD_DEPENDS +. if !empty(USE_TOOLS:Mautomake14\:run) +_TOOLS_DEPMETHOD.automake14= DEPENDS +. else +_TOOLS_DEPMETHOD.automake14= BUILD_DEPENDS +. endif TOOLS_DEPENDS.automake14?= automake14>=${AUTOMAKE_REQD}:../../devel/automake14 -. if empty(${TOOLS_DEPMETHOD.automake14}:M${TOOLS_DEPENDS.automake14}) -${TOOLS_DEPMETHOD.automake14}+= ${TOOLS_DEPENDS.automake14} +. if empty(${_TOOLS_DEPMETHOD.automake14}:M${TOOLS_DEPENDS.automake14}) +${_TOOLS_DEPMETHOD.automake14}+= ${TOOLS_DEPENDS.automake14} . endif EVAL_PREFIX+= _TOOLS_AM_PREFIX=automake14 diff --git a/mk/tools/defaults.mk b/mk/tools/defaults.mk index 81ea80ef7f4..479e4145aec 100644 --- a/mk/tools/defaults.mk +++ b/mk/tools/defaults.mk @@ -1,4 +1,4 @@ -# $NetBSD: defaults.mk,v 1.35 2005/07/15 18:27:55 jlam Exp $ +# $NetBSD: defaults.mk,v 1.36 2005/07/15 20:14:04 jlam Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -178,7 +178,7 @@ _TOOLS_VARNAME_GNU.yacc= YACC # just in the targets, so these must be defined here, and this file be # included by bsd.prefs.mk. # -.for _t_ in ${USE_TOOLS:O:u} +.for _t_ in ${USE_TOOLS:C/:.*//:O:u} . if defined(_TOOLS_VARNAME.${_t_}) && \ defined(TOOLS_PLATFORM.${_t_}) && !empty(TOOLS_PLATFORM.${_t_}) . for _v_ in ${_TOOLS_VARNAME.${_t_}} diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk index c4b11cf7bd4..97c5d6a4aaa 100644 --- a/mk/tools/replace.mk +++ b/mk/tools/replace.mk @@ -1,4 +1,4 @@ -# $NetBSD: replace.mk,v 1.108 2005/07/15 18:27:55 jlam Exp $ +# $NetBSD: replace.mk,v 1.109 2005/07/15 20:14:04 jlam Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -69,19 +69,20 @@ # to be generated that may be used as a yacc-replacement. # # By default, any dependencies on the pkgsrc tools are build dependencies, -# but this may be changed by explicitly setting TOOLS_DEPMETHOD.<tool>, +# but this may be changed by adding a :run modifier to the tool name, # e.g.: # -# TOOLS_DEPMETHOD.tbl= DEPENDS +# USE_TOOLS+= perl:run # # Continue to allow USE_PERL5 until packages have been taught to use the # new syntax. # .if defined(USE_PERL5) -USE_TOOLS+= perl . if empty(USE_PERL5:Mbuild) -TOOLS_DEPMETHOD.perl?= DEPENDS +USE_TOOLS+= perl:run +. else +USE_TOOLS+= perl . endif .endif @@ -93,7 +94,7 @@ USE_TOOLS+= perl .endif # bison implies "bison-yacc" -.if !empty(USE_TOOLS:Mbison) +.if !empty(USE_TOOLS:Mbison) || !empty(USE_TOOLS:Mbison\:*) USE_TOOLS+= bison-yacc .endif @@ -103,20 +104,20 @@ USE_TOOLS+= bison-yacc # ones that are overridden by superseding ones. # .if !defined(_USE_TOOLS) -_USE_TOOLS:= ${USE_TOOLS:O:u} -. if !empty(USE_TOOLS:Mbison-yacc) # bison-yacc > yacc +_USE_TOOLS:= ${USE_TOOLS:C/:.*//:O:u} +. if !empty(_USE_TOOLS:Mbison-yacc) # bison-yacc > yacc _USE_TOOLS:= ${_USE_TOOLS:Nyacc} . endif -. if !empty(USE_TOOLS:Mflex) # flex > lex +. if !empty(_USE_TOOLS:Mflex) # flex > lex _USE_TOOLS:= ${_USE_TOOLS:Nlex} . endif -. if !empty(USE_TOOLS:Mgawk) # gawk > awk +. if !empty(_USE_TOOLS:Mgawk) # gawk > awk _USE_TOOLS:= ${_USE_TOOLS:Nawk} . endif -. if !empty(USE_TOOLS:Mgm4) # gm4 > m4 +. if !empty(_USE_TOOLS:Mgm4) # gm4 > m4 _USE_TOOLS:= ${_USE_TOOLS:Nm4} . endif -. if !empty(USE_TOOLS:Mgsed) # gsed > sed +. if !empty(_USE_TOOLS:Mgsed) # gsed > sed _USE_TOOLS:= ${_USE_TOOLS:Nsed} . endif .endif @@ -124,6 +125,48 @@ MAKEVARS+= _USE_TOOLS ###################################################################### +# Set the type of dependency requested for the tool. +# +.for _t_ in ${USE_TOOLS:N*\:*} ${USE_TOOLS:M*\:build} +_TOOLS_DEPMETHOD.${_t_:C/:.*//}= BUILD_DEPENDS +.endfor +.for _t_ in ${USE_TOOLS:M*\:run} +_TOOLS_DEPMETHOD.${_t_:C/:.*//}= DEPENDS +.endfor + +.if !empty(_USE_TOOLS:Mbison-yacc) # bison-yacc > yacc +. if (${_TOOLS_DEPMETHOD.bison-yacc} == "BUILD_DEPENDS") && \ + defined(_TOOLS_DEPMETHOD.yacc) +_TOOLS_DEPMETHOD.bison-yacc= ${_TOOLS_DEPMETHOD.yacc} +. endif +.endif +.if !empty(_USE_TOOLS:Mflex) # flex > lex +. if (${_TOOLS_DEPMETHOD.flex} == "BUILD_DEPENDS") && \ + defined(_TOOLS_DEPMETHOD.lex) +_TOOLS_DEPMETHOD.flex= ${_TOOLS_DEPMETHOD.lex} +. endif +.endif +.if !empty(_USE_TOOLS:Mgawk) # gawk > awk +. if (${_TOOLS_DEPMETHOD.gawk} == "BUILD_DEPENDS") && \ + defined(_TOOLS_DEPMETHOD.awk) +_TOOLS_DEPMETHOD.gawk= ${_TOOLS_DEPMETHOD.awk} +. endif +.endif +.if !empty(_USE_TOOLS:Mgm4) # gm4 > m4 +. if (${_TOOLS_DEPMETHOD.gm4} == "BUILD_DEPENDS") && \ + defined(_TOOLS_DEPMETHOD.m4) +_TOOLS_DEPMETHOD.gm4= ${_TOOLS_DEPMETHOD.m4} +. endif +.endif +.if !empty(_USE_TOOLS:Mgsed) # gsed > sed +. if (${_TOOLS_DEPMETHOD.gsed} == "BUILD_DEPENDS") && \ + defined(_TOOLS_DEPMETHOD.sed) +_TOOLS_DEPMETHOD.gsed= ${_TOOLS_DEPMETHOD.sed} +. endif +.endif + +###################################################################### + # _TOOLS_USE_PKGSRC.<tool> is "yes" or "no" depending on whether we're # using a pkgsrc-supplied tool to replace the system-supplied one. We # use the system-supplied one if TOOLS_PLATFORM.<tool> is non-empty, or @@ -136,11 +179,6 @@ _TOOLS_USE_PKGSRC.${_t_}?= no _TOOLS_USE_PKGSRC.${_t_}?= yes .endfor -# TOOLS_DEPMETHOD.<tool> defaults to BUILD_DEPENDS. -.for _t_ in ${_USE_TOOLS} -TOOLS_DEPMETHOD.${_t_}?= BUILD_DEPENDS -.endfor - ###################################################################### # For each of the blocks below, we create either symlinks or wrappers @@ -1188,10 +1226,10 @@ FIND_PREFIX:= ${TOOLS_FIND_PREFIX} # Add the dependencies for each pkgsrc-supplied tool. # .for _t_ in ${_USE_TOOLS} -. if defined(TOOLS_DEPMETHOD.${_t_}) && defined(TOOLS_DEPENDS.${_t_}) +. if defined(_TOOLS_DEPMETHOD.${_t_}) && defined(TOOLS_DEPENDS.${_t_}) . for _dep_ in ${TOOLS_DEPENDS.${_t_}} -. if empty(${TOOLS_DEPMETHOD.${_t_}}:C/\:.*$//:M${_dep_:C/\:.*$//}) -${TOOLS_DEPMETHOD.${_t_}}+= ${_dep_} +. if empty(${_TOOLS_DEPMETHOD.${_t_}}:C/\:.*$//:M${_dep_:C/\:.*$//}) +${_TOOLS_DEPMETHOD.${_t_}}+= ${_dep_} . endif . endfor . endif |