diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/tools/replace.mk | 193 |
1 files changed, 59 insertions, 134 deletions
diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk index b25eb78ea59..8747eb4081e 100644 --- a/mk/tools/replace.mk +++ b/mk/tools/replace.mk @@ -1,4 +1,4 @@ -# $NetBSD: replace.mk,v 1.116 2005/07/17 22:12:08 jlam Exp $ +# $NetBSD: replace.mk,v 1.117 2005/07/18 02:33:27 jlam Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -43,9 +43,13 @@ # appear earlier in the search path when invoked using the bare name # of the tool. # -# "TOOLS_TOOL" variables, e.g. TOOLS_AWK, TOOLS_SED, etc. are set to -# the full command lines necessary to invoke the real tools on the -# filesystem, and represent the tools required by the package. +# "TOOLS_TOOLS" variables, e.g. TOOLS_AWK, TOOLS_SED, etc. are set to +# the full paths to the real tools on the filesystem, and represent +# tools required by the package. +# +# "TOOLS_CMDLINE_TOOL" variables, e.g. TOOLS_CMDLINE_AWK, +# TOOLS_CMDLINE_SED, etc. are set to the full command lines (path and +# arguments) necessary to invoke the real tools on the filesystem # # "TOOL" variables, e.g. AWK, SED, etc. are set to the full command # lines necessary to invoke the real tools on the filesystem, and @@ -205,7 +209,6 @@ TOOLS_DEPENDS.awk?= nawk>=20040207:../../lang/nawk TOOLS_CREATE+= awk TOOLS_FIND_PREFIX+= TOOLS_PREFIX.awk=nawk TOOLS_PATH.awk= ${TOOLS_PREFIX.awk}/bin/nawk -TOOLS_${_TOOLS_VARNAME.awk}= ${TOOLS_PATH.awk} . endif .endif @@ -217,7 +220,6 @@ TOOLS_DEPENDS.basename?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= basename TOOLS_FIND_PREFIX+= TOOLS_PREFIX.basename=coreutils TOOLS_PATH.basename= ${TOOLS_PREFIX.basename}/bin/${GNU_PROGRAM_PREFIX}basename -TOOLS_${_TOOLS_VARNAME.basename}= ${TOOLS_PATH.basename} . endif .endif @@ -229,7 +231,6 @@ TOOLS_DEPENDS.bash?= bash-[0-9]*:../../shells/bash TOOLS_CREATE+= bash TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bash=bash TOOLS_PATH.bash= ${TOOLS_PREFIX.bash}/bin/bash -TOOLS_${_TOOLS_VARNAME.bash}= ${TOOLS_PATH.bash} . endif .endif @@ -272,8 +273,6 @@ TOOLS_CREATE+= bison-yacc TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bison-yacc=bison TOOLS_PATH.bison-yacc= ${TOOLS_PREFIX.bison-yacc}/bin/bison TOOLS_ARGS.bison-yacc= -y -TOOLS_${_TOOLS_VARNAME.bison-yacc}= \ - ${TOOLS_PATH.bison-yacc} ${TOOLS_ARGS.bison-yacc} . endif TOOLS_CMD.bison-yacc= ${TOOLS_DIR}/bin/yacc .endif @@ -286,7 +285,6 @@ TOOLS_DEPENDS.bzcat?= bzip2>=0.9.0b:../../archivers/bzip2 TOOLS_CREATE+= bzcat TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bzcat=bzip2 TOOLS_PATH.bzcat= ${TOOLS_PREFIX.bzcat}/bin/bzcat -TOOLS_${_TOOLS_VARNAME.bzcat}= ${TOOLS_PATH.bzcat} . endif .endif @@ -298,7 +296,6 @@ TOOLS_DEPENDS.cat?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= cat TOOLS_FIND_PREFIX+= TOOLS_PREFIX.cat=coreutils TOOLS_PATH.cat= ${TOOLS_PREFIX.cat}/bin/${GNU_PROGRAM_PREFIX}cat -TOOLS_${_TOOLS_VARNAME.cat}= ${TOOLS_PATH.cat} . endif .endif @@ -310,7 +307,6 @@ TOOLS_DEPENDS.chgrp?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= chgrp TOOLS_FIND_PREFIX+= TOOLS_PREFIX.chgrp=coreutils TOOLS_PATH.chgrp= ${TOOLS_PREFIX.chgrp}/bin/${GNU_PROGRAM_PREFIX}chgrp -TOOLS_${_TOOLS_VARNAME.chgrp}= ${TOOLS_PATH.chgrp} . endif .endif @@ -322,7 +318,6 @@ TOOLS_DEPENDS.chmod?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= chmod TOOLS_FIND_PREFIX+= TOOLS_PREFIX.chmod=coreutils TOOLS_PATH.chmod= ${TOOLS_PREFIX.chmod}/bin/${GNU_PROGRAM_PREFIX}chmod -TOOLS_${_TOOLS_VARNAME.chmod}= ${TOOLS_PATH.chmod} . endif .endif @@ -334,7 +329,6 @@ TOOLS_DEPENDS.chown?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= chown TOOLS_FIND_PREFIX+= TOOLS_PREFIX.chown=coreutils TOOLS_PATH.chown= ${TOOLS_PREFIX.chown}/bin/${GNU_PROGRAM_PREFIX}chown -TOOLS_${_TOOLS_VARNAME.chown}= ${TOOLS_PATH.chown} . endif .endif @@ -346,7 +340,6 @@ TOOLS_DEPENDS.cmp?= diffutils>=2.8.1:../../devel/diffutils TOOLS_CREATE+= cmp TOOLS_FIND_PREFIX+= TOOLS_PREFIX.cmp=diffutils TOOLS_PATH.cmp= ${TOOLS_PREFIX.cmp}/bin/${GNU_PROGRAM_PREFIX}cmp -TOOLS_${_TOOLS_VARNAME.cmp}= ${TOOLS_PATH.cmp} . endif .endif @@ -358,7 +351,6 @@ TOOLS_DEPENDS.cp?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= cp TOOLS_FIND_PREFIX+= TOOLS_PREFIX.cp=coreutils TOOLS_PATH.cp= ${TOOLS_PREFIX.cp}/bin/${GNU_PROGRAM_PREFIX}cp -TOOLS_${_TOOLS_VARNAME.cp}= ${TOOLS_PATH.cp} . endif .endif @@ -370,7 +362,6 @@ TOOLS_DEPENDS.csh?= tcsh-[0-9]*:../../shells/tcsh TOOLS_CREATE+= csh TOOLS_FIND_PREFIX+= TOOLS_PREFIX.csh=tcsh TOOLS_PATH.csh= ${TOOLS_PREFIX.csh}/bin/tcsh -TOOLS_${_TOOLS_VARNAME.csh}= ${TOOLS_PATH.csh} . endif .endif @@ -382,7 +373,6 @@ TOOLS_DEPENDS.cut?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= cut TOOLS_FIND_PREFIX+= TOOLS_PREFIX.cut=coreutils TOOLS_PATH.cut= ${TOOLS_PREFIX.cut}/bin/${GNU_PROGRAM_PREFIX}cut -TOOLS_${_TOOLS_VARNAME.cut}= ${TOOLS_PATH.cut} . endif .endif @@ -394,7 +384,6 @@ TOOLS_DEPENDS.date?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= date TOOLS_FIND_PREFIX+= TOOLS_PREFIX.date=coreutils TOOLS_PATH.date= ${TOOLS_PREFIX.date}/bin/${GNU_PROGRAM_PREFIX}date -TOOLS_${_TOOLS_VARNAME.date}= ${TOOLS_PATH.date} . endif .endif @@ -406,7 +395,6 @@ TOOLS_DEPENDS.diff?= diffutils>=2.8.1:../../devel/diffutils TOOLS_CREATE+= diff TOOLS_FIND_PREFIX+= TOOLS_PREFIX.diff=diffutils TOOLS_PATH.diff= ${TOOLS_PREFIX.diff}/bin/${GNU_PROGRAM_PREFIX}diff -TOOLS_${_TOOLS_VARNAME.diff}= ${TOOLS_PATH.diff} . endif .endif @@ -418,7 +406,6 @@ TOOLS_DEPENDS.dirname?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= dirname TOOLS_FIND_PREFIX+= TOOLS_PREFIX.dirname=coreutils TOOLS_PATH.dirname= ${TOOLS_PREFIX.dirname}/bin/${GNU_PROGRAM_PREFIX}dirname -TOOLS_${_TOOLS_VARNAME.dirname}= ${TOOLS_PATH.dirname} . endif .endif @@ -430,7 +417,6 @@ TOOLS_DEPENDS.echo?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= echo TOOLS_FIND_PREFIX+= TOOLS_PREFIX.echo=coreutils TOOLS_PATH.echo= ${TOOLS_PREFIX.echo}/bin/${GNU_PROGRAM_PREFIX}echo -TOOLS_${_TOOLS_VARNAME.echo}= ${TOOLS_PATH.echo} . endif .endif @@ -442,7 +428,6 @@ TOOLS_DEPENDS.egrep?= grep>=2.5.1:../../textproc/grep TOOLS_CREATE+= egrep TOOLS_FIND_PREFIX+= TOOLS_PREFIX.egrep=grep TOOLS_PATH.egrep= ${TOOLS_PREFIX.egrep}/bin/${GNU_PROGRAM_PREFIX}egrep -TOOLS_${_TOOLS_VARNAME.egrep}= ${TOOLS_PATH.egrep} . endif .endif @@ -454,7 +439,6 @@ TOOLS_DEPENDS.env?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= env TOOLS_FIND_PREFIX+= TOOLS_PREFIX.env=coreutilsj TOOLS_PATH.env= ${TOOLS_PREFIX.env}/bin/${GNU_PROGRAM_PREFIX}env -TOOLS_${_TOOLS_VARNAME.env}= ${TOOLS_PATH.env} . endif .endif @@ -466,7 +450,6 @@ TOOLS_DEPENDS.expr?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= expr TOOLS_FIND_PREFIX+= TOOLS_PREFIX.expr=coreutils TOOLS_PATH.expr= ${TOOLS_PREFIX.expr}/bin/${GNU_PROGRAM_PREFIX}expr -TOOLS_${_TOOLS_VARNAME.expr}= ${TOOLS_PATH.expr} . endif .endif @@ -478,7 +461,6 @@ TOOLS_DEPENDS.false?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= false TOOLS_FIND_PREFIX+= TOOLS_PREFIX.false=coreutils TOOLS_PATH.false= ${TOOLS_PREFIX.false}/bin/${GNU_PROGRAM_PREFIX}false -TOOLS_${_TOOLS_VARNAME.false}= ${TOOLS_PATH.false} . endif .endif @@ -490,7 +472,6 @@ TOOLS_DEPENDS.fgrep?= grep>=2.5.1:../../textproc/grep TOOLS_CREATE+= fgrep TOOLS_FIND_PREFIX+= TOOLS_PREFIX.fgrep=grep TOOLS_PATH.fgrep= ${TOOLS_PREFIX.fgrep}/bin/${GNU_PROGRAM_PREFIX}fgrep -TOOLS_${_TOOLS_VARNAME.fgrep}= ${TOOLS_PATH.fgrep} . endif .endif @@ -502,7 +483,6 @@ TOOLS_DEPENDS.file?= file>=4.13:../../sysutils/file TOOLS_CREATE+= file TOOLS_FIND_PREFIX+= TOOLS_PREFIX.file=file TOOLS_PATH.file= ${TOOLS_PREFIX.file}/bin/file -TOOLS_${_TOOLS_VARNAME.file}= ${TOOLS_PATH.file} . endif .endif @@ -514,7 +494,6 @@ TOOLS_DEPENDS.find?= findutils>=4.1:../../sysutils/findutils TOOLS_CREATE+= find TOOLS_FIND_PREFIX+= TOOLS_PREFIX.find=findutils TOOLS_PATH.find= ${TOOLS_PREFIX.find}/bin/${GNU_PROGRAM_PREFIX}find -TOOLS_${_TOOLS_VARNAME.find}= ${TOOLS_PATH.find} . endif .endif @@ -531,7 +510,6 @@ TOOLS_DEPENDS.flex?= ${_TOOLS_DEPENDS.flex} TOOLS_CREATE+= flex TOOLS_FIND_PREFIX+= TOOLS_PREFIX.flex=flex TOOLS_PATH.flex= ${TOOLS_PREFIX.flex}/bin/flex -TOOLS_${_TOOLS_VARNAME.flex}= ${TOOLS_PATH.flex} . endif TOOLS_ALIASES.flex= lex .endif @@ -544,7 +522,6 @@ TOOLS_DEPENDS.gawk?= gawk>=3.1.1:../../lang/gawk TOOLS_CREATE+= gawk TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gawk=gawk TOOLS_PATH.gawk= ${TOOLS_PREFIX.gawk}/bin/${GNU_PROGRAM_PREFIX}awk -TOOLS_${_TOOLS_VARNAME.gawk}= ${TOOLS_PATH.gawk} . endif TOOLS_ALIASES.gawk= awk .endif @@ -557,7 +534,6 @@ TOOLS_DEPENDS.gm4?= m4>=1.4:../../devel/m4 TOOLS_CREATE+= gm4 TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gm4=m4 TOOLS_PATH.gm4= ${TOOLS_PREFIX.gm4}/bin/gm4 -TOOLS_${_TOOLS_VARNAME.gm4}= ${TOOLS_PATH.gm4} . endif TOOLS_ALIASES.gm4= m4 .endif @@ -570,7 +546,6 @@ TOOLS_DEPENDS.gmake?= gmake>=3.78:../../devel/gmake TOOLS_CREATE+= gmake TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gmake=gmake TOOLS_PATH.gmake= ${TOOLS_PREFIX.gmake}/bin/gmake -TOOLS_${_TOOLS_VARNAME.gmake}= ${TOOLS_PATH.gmake} . endif .endif @@ -582,7 +557,6 @@ TOOLS_DEPENDS.grep?= grep>=2.5.1:../../textproc/grep TOOLS_CREATE+= grep TOOLS_FIND_PREFIX+= TOOLS_PREFIX.grep=grep TOOLS_PATH.grep= ${TOOLS_PREFIX.grep}/bin/${GNU_PROGRAM_PREFIX}grep -TOOLS_${_TOOLS_VARNAME.grep}= ${TOOLS_PATH.grep} . endif .endif @@ -594,7 +568,6 @@ TOOLS_DEPENDS.gsed?= gsed>=3.0.2:../../textproc/gsed TOOLS_CREATE+= gsed TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gsed=gsed TOOLS_PATH.gsed= ${TOOLS_PREFIX.gsed}/bin/${GNU_PROGRAM_PREFIX}sed -TOOLS_${_TOOLS_VARNAME.gsed}= ${TOOLS_PATH.gsed} . endif TOOLS_ALIASES.gsed= sed .endif @@ -607,7 +580,6 @@ TOOLS_DEPENDS.gtar?= gtar-base>=1.13.25:../../archivers/gtar-base TOOLS_CREATE+= gtar TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gtar=gtar-base TOOLS_PATH.gtar= ${TOOLS_PREFIX.gtar}/bin/${GNU_PROGRAM_PREFIX}tar -TOOLS_${_TOOLS_VARNAME.gtar}= ${TOOLS_PATH.gtar} . endif .endif @@ -620,7 +592,6 @@ TOOLS_CREATE+= gunzip TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gunzip=gzip-base TOOLS_PATH.gunzip= ${TOOLS_PREFIX.gunzip}/bin/gunzip TOOLS_ARGS.gunzip= -f -TOOLS_${_TOOLS_VARNAME.gunzip}= ${TOOLS_PATH.gunzip} ${TOOLS_ARGS.gunzip} . endif .endif @@ -632,7 +603,6 @@ TOOLS_DEPENDS.gzcat?= gzip-base>=1.2.4b:../../archivers/gzip-base TOOLS_CREATE+= gzcat TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gzcat=gzip-base TOOLS_PATH.gzcat= ${TOOLS_PREFIX.gzcat}/bin/zcat -TOOLS_${_TOOLS_VARNAME.gzcat}= ${TOOLS_PATH.gzcat} . endif .endif @@ -645,7 +615,6 @@ TOOLS_CREATE+= gzip TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gzip=gzip-base TOOLS_PATH.gzip= ${TOOLS_PREFIX.gzip}/bin/gzip TOOLS_ARGS.gzip= -nf ${GZIP} -TOOLS_${_TOOLS_VARNAME.gzip}= ${TOOLS_PATH.gzip} ${TOOLS_ARGS.gzip} . endif .endif @@ -657,7 +626,6 @@ TOOLS_DEPENDS.head?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= head TOOLS_FIND_PREFIX+= TOOLS_PREFIX.head=coreutils TOOLS_PATH.head= ${TOOLS_PREFIX.head}/bin/${GNU_PROGRAM_PREFIX}head -TOOLS_${_TOOLS_VARNAME.head}= ${TOOLS_PATH.head} . endif .endif @@ -669,7 +637,6 @@ TOOLS_DEPENDS.hostname?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= hostname TOOLS_FIND_PREFIX+= TOOLS_PREFIX.hostname=coreutils TOOLS_PATH.hostname= ${TOOLS_PREFIX.hostname}/bin/${GNU_PROGRAM_PREFIX}hostname -TOOLS_${_TOOLS_VARNAME.hostname}= ${TOOLS_PATH.hostname} . endif .endif @@ -681,7 +648,6 @@ TOOLS_DEPENDS.id?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= id TOOLS_FIND_PREFIX+= TOOLS_PREFIX.id=coreutils TOOLS_PATH.id= ${TOOLS_PREFIX.id}/bin/${GNU_PROGRAM_PREFIX}id -TOOLS_${_TOOLS_VARNAME.id}= ${TOOLS_PATH.id} . endif .endif @@ -701,7 +667,6 @@ TOOLS_PATH.imake= ${TOOLS_PREFIX.imake}/${X11ROOT_PREFIX}/bin/imake . else # !empty(X11_TYPE:Mnative) TOOLS_PATH.imake= ${X11BASE}/bin/imake . endif -TOOLS_${_TOOLS_VARNAME.imake}= ${TOOLS_PATH.imake} ${TOOLS_ARGS.imake} . endif .endif @@ -713,7 +678,6 @@ TOOLS_DEPENDS.install?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= install TOOLS_FIND_PREFIX+= TOOLS_PREFIX.install=coreutils TOOLS_PATH.install= ${TOOLS_PREFIX.install}/bin/${GNU_PROGRAM_PREFIX}install -TOOLS_${_TOOLS_VARNAME.install}= ${TOOLS_PATH.install} . endif .endif @@ -730,7 +694,6 @@ TOOLS_DEPENDS.lex?= ${_TOOLS_DEPENDS.lex} TOOLS_CREATE+= lex TOOLS_FIND_PREFIX+= TOOLS_PREFIX.lex=flex TOOLS_PATH.lex= ${TOOLS_PREFIX.lex}/bin/flex -TOOLS_${_TOOLS_VARNAME.lex}= ${TOOLS_PATH.lex} . endif .endif @@ -742,7 +705,6 @@ TOOLS_DEPENDS.lha?= lha>=114.9:../../archivers/lha TOOLS_CREATE+= lha TOOLS_FIND_PREFIX+= TOOLS_PREFIX.lha=lha TOOLS_PATH.lha= ${TOOLS_PREFIX.lha}/bin/lha -TOOLS_${_TOOLS_VARNAME.lha}= ${TOOLS_PATH.lha} . endif .endif @@ -754,7 +716,6 @@ TOOLS_DEPENDS.ln?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= ln TOOLS_FIND_PREFIX+= TOOLS_PREFIX.ln=coreutils TOOLS_PATH.ln= ${TOOLS_PREFIX.ln}/bin/${GNU_PROGRAM_PREFIX}ln -TOOLS_${_TOOLS_VARNAME.ln}= ${TOOLS_PATH.ln} . endif .endif @@ -766,7 +727,6 @@ TOOLS_DEPENDS.ls?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= ls TOOLS_FIND_PREFIX+= TOOLS_PREFIX.ls=coreutils TOOLS_PATH.ls= ${TOOLS_PREFIX.ls}/bin/${GNU_PROGRAM_PREFIX}ls -TOOLS_${_TOOLS_VARNAME.ls}= ${TOOLS_PATH.ls} . endif .endif @@ -778,7 +738,6 @@ TOOLS_DEPENDS.m4?= m4>=1.4:../../devel/m4 TOOLS_CREATE+= m4 TOOLS_FIND_PREFIX+= TOOLS_PREFIX.m4=m4 TOOLS_PATH.m4= ${TOOLS_PREFIX.m4}/bin/gm4 -TOOLS_${_TOOLS_VARNAME.m4}= ${TOOLS_PATH.m4} . endif .endif @@ -790,7 +749,6 @@ TOOLS_DEPENDS.mail?= nail>=11.22:../../mail/nail TOOLS_CREATE+= mail TOOLS_FIND_PREFIX+= TOOLS_PREFIX.mail=nail TOOLS_PATH.mail= ${TOOLS_PREFIX.mail}/bin/nail -TOOLS_${_TOOLS_VARNAME.mail}= ${TOOLS_PATH.mail} . endif .endif @@ -803,7 +761,6 @@ TOOLS_CREATE+= mkdir TOOLS_FIND_PREFIX+= TOOLS_PREFIX.mkdir=coreutils TOOLS_PATH.mkdir= ${TOOLS_PREFIX.mkdir}/bin/${GNU_PROGRAM_PREFIX}mkdir TOOLS_ARGS.mkdir= -p -TOOLS_${_TOOLS_VARNAME.mkdir}= ${TOOLS_PATH.mkdir} ${TOOLS_ARGS.mkdir} . endif .endif @@ -815,7 +772,6 @@ TOOLS_DEPENDS.mktemp?= mktemp>=1.5:../../sysutils/mktemp TOOLS_CREATE+= mktemp TOOLS_FIND_PREFIX+= TOOLS_PREFIX.mktemp=mktemp TOOLS_PATH.mktemp= ${TOOLS_PREFIX.mktemp}/bin/mktemp -TOOLS_${_TOOLS_VARNAME.mktemp}= ${TOOLS_PATH.mktemp} . endif .endif @@ -831,7 +787,6 @@ MAKEFLAGS+= TOOLS_IGNORE.mtree= TOOLS_CREATE+= mtree TOOLS_FIND_PREFIX+= TOOLS_PREFIX.mtree=mtree TOOLS_PATH.mtree= ${TOOLS_PREFIX.mtree}/bin/mtree -TOOLS_${_TOOLS_VARNAME.mtree}= ${TOOLS_PATH.mtree} . endif .endif @@ -843,7 +798,6 @@ TOOLS_DEPENDS.mv?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= mv TOOLS_FIND_PREFIX+= TOOLS_PREFIX.mv=coreutils TOOLS_PATH.mv= ${TOOLS_PREFIX.mv}/bin/${GNU_PROGRAM_PREFIX}mv -TOOLS_${_TOOLS_VARNAME.mv}= ${TOOLS_PATH.mv} . endif .endif @@ -855,7 +809,6 @@ TOOLS_DEPENDS.nice?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= nice TOOLS_FIND_PREFIX+= TOOLS_PREFIX.nice=coreutils TOOLS_PATH.nice= ${TOOLS_PREFIX.nice}/bin/${GNU_PROGRAM_PREFIX}nice -TOOLS_${_TOOLS_VARNAME.nice}= ${TOOLS_PATH.nice} . endif .endif @@ -867,7 +820,6 @@ TOOLS_DEPENDS.nroff?= groff>=1.19nb4:../../textproc/groff TOOLS_CREATE+= nroff TOOLS_FIND_PREFIX+= TOOLS_PREFIX.nroff=groff TOOLS_PATH.nroff= ${TOOLS_PREFIX.nroff}/bin/nroff -TOOLS_${_TOOLS_VARNAME.nroff}= ${TOOLS_PATH.nroff} . endif .endif @@ -879,7 +831,6 @@ TOOLS_DEPENDS.patch?= patch>=2.2:../../devel/patch TOOLS_CREATE+= patch TOOLS_FIND_PREFIX+= TOOLS_PREFIX.patch=patch TOOLS_PATH.patch= ${TOOLS_PREFIX.patch}/bin/gpatch -TOOLS_${_TOOLS_VARNAME.patch}= ${TOOLS_PATH.patch} . endif .endif @@ -895,7 +846,6 @@ MAKEFLAGS+= TOOLS_IGNORE.pax= TOOLS_CREATE+= pax TOOLS_FIND_PREFIX+= TOOLS_PREFIX.pax=pax TOOLS_PATH.pax= ${TOOLS_PREFIX.pax}/bin/pax -TOOLS_${_TOOLS_VARNAME.pax}= ${TOOLS_PATH.pax} . endif .endif @@ -908,7 +858,6 @@ TOOLS_DEPENDS.perl?= {perl>=${PERL5_REQD},perl-thread>=${PERL5_REQD}}:../../lan TOOLS_CREATE+= perl TOOLS_FIND_PREFIX+= TOOLS_PREFIX.perl=perl TOOLS_PATH.perl= ${TOOLS_PREFIX.perl}/bin/perl -TOOLS_${_TOOLS_VARNAME.perl}= ${TOOLS_PATH.perl} . endif .endif @@ -920,7 +869,6 @@ TOOLS_DEPENDS.pwd?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= pwd TOOLS_FIND_PREFIX+= TOOLS_PREFIX.pwd=coreutils TOOLS_PATH.pwd= ${TOOLS_PREFIX.pwd}/bin/${GNU_PROGRAM_PREFIX}pwd -TOOLS_${_TOOLS_VARNAME.pwd}= ${TOOLS_PATH.pwd} . endif .endif @@ -932,7 +880,6 @@ TOOLS_DEPENDS.rm?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= rm TOOLS_FIND_PREFIX+= TOOLS_PREFIX.rm=coreutils TOOLS_PATH.rm= ${TOOLS_PREFIX.rm}/bin/${GNU_PROGRAM_PREFIX}rm -TOOLS_${_TOOLS_VARNAME.rm}= ${TOOLS_PATH.rm} . endif .endif @@ -944,7 +891,6 @@ TOOLS_DEPENDS.rmdir?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= rmdir TOOLS_FIND_PREFIX+= TOOLS_PREFIX.rmdir=coreutils TOOLS_PATH.rmdir= ${TOOLS_PREFIX.rmdir}/bin/${GNU_PROGRAM_PREFIX}rmdir -TOOLS_${_TOOLS_VARNAME.rmdir}= ${TOOLS_PATH.rmdir} . endif .endif @@ -956,7 +902,6 @@ TOOLS_DEPENDS.sed?= nbsed>=20040821:../../textproc/nbsed TOOLS_CREATE+= sed TOOLS_FIND_PREFIX+= TOOLS_PREFIX.sed=nbsed TOOLS_PATH.sed= ${TOOLS_PREFIX.nbsed}/bin/nbsed -TOOLS_${_TOOLS_VARNAME.sed}= ${TOOLS_PATH.sed} . endif .endif @@ -968,7 +913,6 @@ TOOLS_DEPENDS.sh?= pdksh>=5.2.14:../../shells/pdksh TOOLS_CREATE+= sh TOOLS_FIND_PREFIX+= TOOLS_PREFIX.sh=pdksh TOOLS_PATH.sh= ${TOOLS_PREFIX.sh}/bin/pdksh -TOOLS_${_TOOLS_VARNAME.sh}= ${TOOLS_PATH.sh} . endif TOOLS_CMD.sh= ${TOOLS_DIR}/bin/sh .endif @@ -981,7 +925,6 @@ TOOLS_DEPENDS.shlock?= shlock>=20020114:../../pkgtools/shlock TOOLS_CREATE+= shlock TOOLS_FIND_PREFIX+= TOOLS_PREFIX.shlock=shlock TOOLS_PATH.shlock= ${TOOLS_PREFIX.shlock}/bin/shlock -TOOLS_${_TOOLS_VARNAME.shlock}= ${TOOLS_PATH.shlock} . endif .endif @@ -993,7 +936,6 @@ TOOLS_DEPENDS.sort?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= sort TOOLS_FIND_PREFIX+= TOOLS_PREFIX.sort=coreutils TOOLS_PATH.sort= ${TOOLS_PREFIX.sort}/bin/${GNU_PROGRAM_PREFIX}sort -TOOLS_${_TOOLS_VARNAME.sort}= ${TOOLS_PATH.sort} . endif .endif @@ -1005,7 +947,6 @@ TOOLS_DEPENDS.tail?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= tail TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tail=coreutils TOOLS_PATH.tail= ${TOOLS_PREFIX.tail}/bin/${GNU_PROGRAM_PREFIX}tail -TOOLS_${_TOOLS_VARNAME.tail}= ${TOOLS_PATH.tail} . endif .endif @@ -1021,7 +962,6 @@ MAKEFLAGS+= TOOLS_IGNORE.tar= TOOLS_CREATE+= tar TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tar=pax TOOLS_PATH.tar= ${TOOLS_PREFIX.tar}/bin/tar -TOOLS_${_TOOLS_VARNAME.tar}= ${TOOLS_PATH.tar} . endif .endif @@ -1033,7 +973,6 @@ TOOLS_DEPENDS.tbl?= groff>=1.19nb4:../../textproc/groff TOOLS_CREATE+= tbl TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tbl=groff TOOLS_PATH.tbl= ${TOOLS_PREFIX.tbl}/bin/tbl -TOOLS_${_TOOLS_VARNAME.tbl}= ${TOOLS_PATH.tbl} . endif .endif @@ -1045,7 +984,6 @@ TOOLS_DEPENDS.tee?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= tee TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tee=coreutils TOOLS_PATH.tee= ${TOOLS_PREFIX.tee}/bin/${GNU_PROGRAM_PREFIX}tee -TOOLS_${_TOOLS_VARNAME.tee}= ${TOOLS_PATH.tee} . endif .endif @@ -1057,7 +995,6 @@ TOOLS_DEPENDS.test?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= test TOOLS_FIND_PREFIX+= TOOLS_PREFIX.test=coreutils TOOLS_PATH.test= ${TOOLS_PREFIX.test}/bin/${GNU_PROGRAM_PREFIX}test -TOOLS_${_TOOLS_VARNAME.test}= ${TOOLS_PATH.test} . endif .endif @@ -1069,7 +1006,6 @@ TOOLS_DEPENDS.touch?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= touch TOOLS_FIND_PREFIX+= TOOLS_PREFIX.touch=coreutils TOOLS_PATH.touch= ${TOOLS_PREFIX.touch}/bin/${GNU_PROGRAM_PREFIX}touch -TOOLS_${_TOOLS_VARNAME.touch}= ${TOOLS_PATH.touch} . endif .endif @@ -1081,7 +1017,6 @@ TOOLS_DEPENDS.tr?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= tr TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tr=coreutils TOOLS_PATH.tr= ${TOOLS_PREFIX.tr}/bin/${GNU_PROGRAM_PREFIX}tr -TOOLS_${_TOOLS_VARNAME.tr}= ${TOOLS_PATH.tr} . endif .endif @@ -1093,7 +1028,6 @@ TOOLS_DEPENDS.true?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= true TOOLS_FIND_PREFIX+= TOOLS_PREFIX.true=coreutils TOOLS_PATH.true= ${TOOLS_PREFIX.true}/bin/${GNU_PROGRAM_PREFIX}true -TOOLS_${_TOOLS_VARNAME.true}= ${TOOLS_PATH.true} . endif .endif @@ -1105,7 +1039,6 @@ TOOLS_DEPENDS.tsort?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= tsort TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tsort=coreutils TOOLS_PATH.tsort= ${TOOLS_PREFIX.tsort}/bin/${GNU_PROGRAM_PREFIX}tsort -TOOLS_${_TOOLS_VARNAME.tsort}= ${TOOLS_PATH.tsort} . endif .endif @@ -1117,7 +1050,6 @@ TOOLS_DEPENDS.unrar?= unrar>=3.3.4:../../archivers/unrar TOOLS_CREATE+= unrar TOOLS_FIND_PREFIX+= TOOLS_PREFIX.unrar=unrar TOOLS_PATH.unrar= ${TOOLS_PREFIX.unrar}/bin/unrar -TOOLS_${_TOOLS_VARNAME.unrar}= ${TOOLS_PATH.unrar} . endif .endif @@ -1129,7 +1061,6 @@ TOOLS_DEPENDS.unzip?= unzip-[0-9]*:../../archivers/unzip TOOLS_CREATE+= unzip TOOLS_FIND_PREFIX+= TOOLS_PREFIX.unzip=unzip TOOLS_PATH.unzip= ${TOOLS_PREFIX.unzip}/bin/unzip -TOOLS_${_TOOLS_VARNAME.unzip}= ${TOOLS_PATH.unzip} . endif .endif @@ -1141,7 +1072,6 @@ TOOLS_DEPENDS.unzoo?= unzoo-[0-9]*:../../archivers/unzoo TOOLS_CREATE+= unzoo TOOLS_FIND_PREFIX+= TOOLS_PREFIX.unzoo=unzoo TOOLS_PATH.unzoo= ${TOOLS_PREFIX.unzoo}/bin/unzoo -TOOLS_${_TOOLS_VARNAME.unzoo}= ${TOOLS_PATH.unzoo} . endif .endif @@ -1153,7 +1083,6 @@ TOOLS_DEPENDS.wc?= coreutils>=5.2.1:../../sysutils/coreutils TOOLS_CREATE+= wc TOOLS_FIND_PREFIX+= TOOLS_PREFIX.wc=coreutils TOOLS_PATH.wc= ${TOOLS_PREFIX.wc}/bin/${GNU_PROGRAM_PREFIX}wc -TOOLS_${_TOOLS_VARNAME.wc}= ${TOOLS_PATH.wc} . endif .endif @@ -1166,7 +1095,6 @@ TOOLS_CREATE+= xargs TOOLS_FIND_PREFIX+= TOOLS_PREFIX.xargs=findutils TOOLS_PATH.xargs= ${TOOLS_PREFIX.xargs}/bin/${GNU_PROGRAM_PREFIX}xargs TOOLS_ARGS.xargs= -r # don't run command if stdin is empty -TOOLS_${_TOOLS_VARNAME.xargs}= ${TOOLS_PATH.xargs} ${TOOLS_ARGS.xargs} . endif .endif @@ -1195,7 +1123,6 @@ TOOLS_PATH.xmkmf= ${X11BASE}/bin/xmkmf TOOLS_FIND_PREFIX+= TOOLS_PREFIX.xpkgwedge=xpkgwedge TOOLS_PATH.xmkmf= ${TOOLS_PREFIX.xpkgwedge}/bin/pkgxmkmf . endif -TOOLS_${_TOOLS_VARNAME.xmkmf}= ${TOOLS_PATH.xmkmf} ${TOOLS_ARGS.xmkmf} . endif .endif @@ -1208,7 +1135,6 @@ TOOLS_CREATE+= yacc TOOLS_FIND_PREFIX+= TOOLS_PREFIX.yacc=bison TOOLS_PATH.yacc= ${TOOLS_PREFIX.yacc}/bin/bison TOOLS_ARGS.yacc= -y -TOOLS_${_TOOLS_VARNAME.yacc}= ${TOOLS_PATH.yacc} ${TOOLS_ARGS.yacc} . endif .endif @@ -1218,15 +1144,60 @@ 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_}) -. for _dep_ in ${TOOLS_DEPENDS.${_t_}} -. if empty(${_TOOLS_DEPMETHOD.${_t_}}:C/\:.*$//:M${_dep_:C/\:.*$//}) +. if !defined(TOOLS_IGNORE.${_t_}) +. if !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS]) +##### +##### Add the dependencies for each pkgsrc-supplied tool. +##### +. 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_} +. endif +. endfor . endif -. endfor +. elif defined(TOOLS_PLATFORM.${_t_}) && !empty(TOOLS_PLATFORM.${_t_}) +##### +##### For each system-supplied tool, break the tool down into a path +##### and arguments so that either a symlink or a wrapper will be +##### properly created. +##### +TOOLS_CREATE+= ${_t_} +TOOLS_PATH.${_t_}?= \ + ${TOOLS_PLATFORM.${_t_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//} +TOOLS_ARGS.${_t_}?= \ + ${TOOLS_PLATFORM.${_t_}:C/^/_asdf_/1:N_asdf_*} +. endif +. endif +### +### For each tool, TOOLS_CMDLINE.<tool> is the full command (path and +### arguments) that should be run to properly execute the tool. +### +. if defined(TOOLS_PATH.${_t_}) +TOOLS_CMDLINE.${_t_}?= ${TOOLS_PATH.${_t_}} ${TOOLS_ARGS.${_t_}} +. endif +### +### If a "TOOL" name is associated with the tool, then export two +### variables: +### +### (1) The "TOOLS_TOOL" name for each tool points to the path +### to the real command, e.g. TOOLS_TBL, TOOLS_YACC, etc. +### +### (2) The "TOOLS_CMDLINE_TOOL" name for each tool to point to the +### full command, e.g. TOOLS_CMDLINE_TBL, TOOLS_CMDLINE_YACC, +### etc. +### +. if defined(_TOOLS_VARNAME.${_t_}) +. if defined(TOOLS_PATH.${_t_}) +TOOLS_${_TOOLS_VARNAME.${_t_}}= ${TOOLS_PATH.${_t_}} +. endif +. if defined(TOOLS_CMDLINE.${_t_}) +TOOLS_CMDLINE_${_TOOLS_VARNAME.${_t_}}= ${TOOLS_CMDLINE.${_t_}} +. for _v_ in ${_TOOLS_VARNAME.${_t_}} +${_v_}?= ${TOOLS_CMDLINE_${_TOOLS_VARNAME.${_t_}}} +. endfor +. endif . endif .endfor @@ -1251,52 +1222,6 @@ ${_TOOLS_VARNAME.${_t_}}= ${TOOLS_${_TOOLS_VARNAME.${_t_}}} ###################################################################### -# If we are using the system-supplied tool, create symlinks or wrappers -# for each of the tools requested. -# -# Set TOOLS_PATH.<tool> appropriately in the case where we are -# using the system-supplied tool. Here, we first check to see if -# TOOLS_PLATFORM.<tool> is defined. If it is, then use that as the -# path to the real command and extract any arguments into -# TOOLS_ARGS.<tool>. -# -# Always set the "TOOLS_TOOL" name for each tool to point to the real -# command, e.g., TOOLS_TBL, TOOLS_YACC, etc., provided that "TOOL" has -# been associated with <tool>. If the "TOOL" name is undefined, then -# set it to the same value to provide a simple name for use by package -# Makefiles. -# -.for _t_ in ${_USE_TOOLS} -. if !defined(TOOLS_IGNORE.${_t_}) && \ - !empty(_TOOLS_USE_PKGSRC.${_t_}:M[nN][oO]) -. if defined(TOOLS_PLATFORM.${_t_}) && !empty(TOOLS_PLATFORM.${_t_}) -TOOLS_PATH.${_t_}?= \ - ${TOOLS_PLATFORM.${_t_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//} -TOOLS_ARGS.${_t_}?= \ - ${TOOLS_PLATFORM.${_t_}:C/^/_asdf_/1:N_asdf_*} -. if defined(_TOOLS_VARNAME.${_t_}) -TOOLS_${_TOOLS_VARNAME.${_t_}}= ${TOOLS_PLATFORM.${_t_}} -. endif -TOOLS_CREATE+= ${_t_} -. elif defined(_TOOLS_VARNAME.${_t_}) -. if defined(TOOLS_PATH.${_t_}) -TOOLS_${_TOOLS_VARNAME.${_t_}}= ${TOOLS_PATH.${_t_}} ${TOOLS_ARGS.${_t_}} -. else -TOOLS_${_TOOLS_VARNAME.${_t_}}= ${_TOOLS_VARNAME.${_t_}}_not_defined_ -. endif -. endif -. endif -. if defined(_TOOLS_VARNAME.${_t_}) -. if defined(TOOLS_${_TOOLS_VARNAME.${_t_}}) -. for _v_ in ${_TOOLS_VARNAME.${_t_}} -${_v_}?= ${TOOLS_${_TOOLS_VARNAME.${_t_}}} -. endfor -. endif -. endif -.endfor - -###################################################################### - # For packages that use GNU configure scripts, pass the real command # paths for the tools that the package uses through the shell environment. # We do this since these paths may be hardcoded into package scripts, |