pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/tools If we only define the "TOOL" variable if the ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/778521467f66
branches:  trunk
changeset: 493273:778521467f66
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon May 02 06:36:29 2005 +0000

description:
If we only define the "TOOL" variable if the real command exists, then
the "TOOL" variables won't be properly defined for the top-leve make
after returning from making the install-depends target if we're using
the pkgsrc-supplied tool.  Define the "TOOL" variable unconditionally
instead.

diffstat:

 mk/tools/perl.mk    |    4 +-
 mk/tools/replace.mk |  124 +---------------------------------------------------
 2 files changed, 2 insertions(+), 126 deletions(-)

diffs (truncated from 638 to 300 lines):

diff -r dc4d1485c7e3 -r 778521467f66 mk/tools/perl.mk
--- a/mk/tools/perl.mk  Mon May 02 06:35:55 2005 +0000
+++ b/mk/tools/perl.mk  Mon May 02 06:36:29 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: perl.mk,v 1.4 2005/05/02 04:33:53 jlam Exp $
+# $NetBSD: perl.mk,v 1.5 2005/05/02 06:36:29 jlam Exp $
 
 # Create a symlink from ${TOOLS_DIR}/bin/perl to ${PERL5} when USE_PERL5
 # is defined.  This ensures that when "perl" is invoked, the pkgsrc perl
@@ -13,9 +13,7 @@
 TOOLS_DEPENDS.perl?=   ${BUILDLINK_DEPENDS.perl}:${BUILDLINK_PKGSRCDIR.perl}
 TOOLS_SYMLINK+=                perl
 TOOLS_REAL_CMD.perl=   ${LOCALBASE}/bin/perl
-.    if exists(${TOOLS_REAL_CMD.perl})
 PERL5=                 ${TOOLS_REAL_CMD.perl}
-.    endif
 .  endif
 .  if defined(TOOLS_DEPMETHOD.perl) && defined(TOOLS_DEPENDS.perl)
 .    if empty(${TOOLS_DEPMETHOD.perl}:M${TOOLS_DEPENDS.perl})
diff -r dc4d1485c7e3 -r 778521467f66 mk/tools/replace.mk
--- a/mk/tools/replace.mk       Mon May 02 06:35:55 2005 +0000
+++ b/mk/tools/replace.mk       Mon May 02 06:36:29 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.55 2005/05/02 02:50:34 jlam Exp $
+# $NetBSD: replace.mk,v 1.56 2005/05/02 06:36:29 jlam Exp $
 #
 # This Makefile fragment handles "replacements" of system-supplied
 # tools with pkgsrc versions.  The replacements are placed under
@@ -103,9 +103,7 @@
 TOOLS_DEPENDS.awk?=            gawk>=3.1.1:../../lang/gawk
 TOOLS_SYMLINK+=                        awk
 TOOLS_REAL_CMD.awk=            ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}awk
-.    if exists(${TOOLS_REAL_CMD.awk})
 ${_TOOLS_VARNAME.awk}=         ${TOOLS_REAL_CMD.awk}
-.    endif
 .  endif
 .endif
 
@@ -116,9 +114,7 @@
 TOOLS_DEPENDS.basename?=       coreutils>=5.2.1:../../sysutils/coreutils
 TOOLS_SYMLINK+=                        basename
 TOOLS_REAL_CMD.basename=       ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}basename
-.    if exists(${TOOLS_REAL_CMD.basename})
 ${_TOOLS_VARNAME.basename}=    ${TOOLS_REAL_CMD.basename}
-.    endif
 .  endif
 .endif
 
@@ -130,9 +126,7 @@
 TOOLS_WRAP+=                   bison
 TOOLS_REAL_CMD.bison=          ${LOCALBASE}/bin/bison
 TOOLS_ARGS.bison=              -y
-.    if exists(${TOOLS_REAL_CMD.bison})
 ${_TOOLS_VARNAME.bison}=       ${TOOLS_REAL_CMD.bison} ${TOOLS_ARGS.bison}
-.    endif
 .  endif
 TOOLS_CMD.bison=               ${TOOLS_DIR}/bin/yacc
 .endif
@@ -144,9 +138,7 @@
 TOOLS_DEPENDS.bzcat?=          bzip2>=0.9.0b:../../archivers/bzip2
 TOOLS_SYMLINK+=                        bzcat
 TOOLS_REAL_CMD.bzcat=          ${LOCALBASE}/bin/bzcat
-.    if exists(${TOOLS_REAL_CMD.bzcat})
 ${_TOOLS_VARNAME.bzcat}=       ${TOOLS_REAL_CMD.bzcat}
-.    endif
 .  endif
 .endif
 
@@ -157,9 +149,7 @@
 TOOLS_DEPENDS.cat?=            coreutils>=5.2.1:../../sysutils/coreutils
 TOOLS_SYMLINK+=                        cat
 TOOLS_REAL_CMD.cat=            ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}cat
-.    if exists(${TOOLS_REAL_CMD.cat})
 ${_TOOLS_VARNAME.cat}=         ${TOOLS_REAL_CMD.cat}
-.    endif
 .  endif
 .endif
 
@@ -170,9 +160,7 @@
 TOOLS_DEPENDS.chgrp?=          coreutils>=5.2.1:../../sysutils/coreutils
 TOOLS_SYMLINK+=                        chgrp
 TOOLS_REAL_CMD.chgrp=          ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}chgrp
-.    if exists(${TOOLS_REAL_CMD.chgrp})
 ${_TOOLS_VARNAME.chgrp}=       ${TOOLS_REAL_CMD.chgrp}
-.    endif
 .  endif
 .endif
 
@@ -183,9 +171,7 @@
 TOOLS_DEPENDS.chmod?=          coreutils>=5.2.1:../../sysutils/coreutils
 TOOLS_SYMLINK+=                        chmod
 TOOLS_REAL_CMD.chmod=          ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}chmod
-.    if exists(${TOOLS_REAL_CMD.chmod})
 ${_TOOLS_VARNAME.chmod}=       ${TOOLS_REAL_CMD.chmod}
-.    endif
 .  endif
 .endif
 
@@ -196,9 +182,7 @@
 TOOLS_DEPENDS.chown?=          coreutils>=5.2.1:../../sysutils/coreutils
 TOOLS_SYMLINK+=                        chown
 TOOLS_REAL_CMD.chown=          ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}chown
-.    if exists(${TOOLS_REAL_CMD.chown})
 ${_TOOLS_VARNAME.chown}=       ${TOOLS_REAL_CMD.chown}
-.    endif
 .  endif
 .endif
 
@@ -209,9 +193,7 @@
 TOOLS_DEPENDS.cmp?=            diffutils>=2.8.1:../../devel/diffutils
 TOOLS_SYMLINK+=                        cmp
 TOOLS_REAL_CMD.cmp=            ${LOCALBASE}/bin/cmp
-.    if exists(${TOOLS_REAL_CMD.cmp})
 ${_TOOLS_VARNAME.cmp}=         ${TOOLS_REAL_CMD.cmp}
-.    endif
 .  endif
 .endif
 
@@ -222,9 +204,7 @@
 TOOLS_DEPENDS.cp?=             coreutils>=5.2.1:../../sysutils/coreutils
 TOOLS_SYMLINK+=                        cp
 TOOLS_REAL_CMD.cp=             ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}cp
-.    if exists(${TOOLS_REAL_CMD.cp})
 ${_TOOLS_VARNAME.cp}=          ${TOOLS_REAL_CMD.cp}
-.    endif
 .  endif
 .endif
 
@@ -235,9 +215,7 @@
 TOOLS_DEPENDS.cut?=            coreutils>=5.2.1:../../sysutils/coreutils
 TOOLS_SYMLINK+=                        cut
 TOOLS_REAL_CMD.cut=            ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}cut
-.    if exists(${TOOLS_REAL_CMD.cut})
 ${_TOOLS_VARNAME.cut}=         ${TOOLS_REAL_CMD.cut}
-.    endif
 .  endif
 .endif
 
@@ -248,9 +226,7 @@
 TOOLS_DEPENDS.date?=           coreutils>=5.2.1:../../sysutils/coreutils
 TOOLS_SYMLINK+=                        date
 TOOLS_REAL_CMD.date=           ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}date
-.    if exists(${TOOLS_REAL_CMD.date})
 ${_TOOLS_VARNAME.date}=                ${TOOLS_REAL_CMD.date}
-.    endif
 .  endif
 .endif
 
@@ -261,9 +237,7 @@
 TOOLS_DEPENDS.dirname?=                coreutils>=5.2.1:../../sysutils/coreutils
 TOOLS_SYMLINK+=                        dirname
 TOOLS_REAL_CMD.dirname=                ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}dirname
-.    if exists(${TOOLS_REAL_CMD.dirname})
 ${_TOOLS_VARNAME.dirname}=     ${TOOLS_REAL_CMD.dirname}
-.    endif
 .  endif
 .endif
 
@@ -274,9 +248,7 @@
 TOOLS_DEPENDS.echo?=           coreutils>=5.2.1:../../sysutils/coreutils
 TOOLS_SYMLINK+=                        echo
 TOOLS_REAL_CMD.echo=           ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}echo
-.    if exists(${TOOLS_REAL_CMD.echo})
 ${_TOOLS_VARNAME.echo}=                ${TOOLS_REAL_CMD.echo}
-.    endif
 .  endif
 .endif
 
@@ -287,9 +259,7 @@
 TOOLS_DEPENDS.egrep?=          grep>=2.5.1:../../textproc/grep
 TOOLS_SYMLINK+=                        egrep
 TOOLS_REAL_CMD.egrep=          ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}egrep
-.    if exists(${TOOLS_REAL_CMD.egrep})
 ${_TOOLS_VARNAME.egrep}=       ${TOOLS_REAL_CMD.egrep}
-.    endif
 .  endif
 .endif
 
@@ -300,9 +270,7 @@
 TOOLS_DEPENDS.env?=            coreutils>=5.2.1:../../sysutils/coreutils
 TOOLS_SYMLINK+=                        env
 TOOLS_REAL_CMD.env=            ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}env
-.    if exists(${TOOLS_REAL_CMD.env})
 ${_TOOLS_VARNAME.env}=         ${TOOLS_REAL_CMD.env}
-.    endif
 .  endif
 .endif
 
@@ -313,9 +281,7 @@
 TOOLS_DEPENDS.expr?=           coreutils>=5.2.1:../../sysutils/coreutils
 TOOLS_SYMLINK+=                        expr
 TOOLS_REAL_CMD.expr=           ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}expr
-.    if exists(${TOOLS_REAL_CMD.expr})
 ${_TOOLS_VARNAME.expr}=                ${TOOLS_REAL_CMD.expr}
-.    endif
 .  endif
 .endif
 
@@ -326,9 +292,7 @@
 TOOLS_DEPENDS.false?=          coreutils>=5.2.1:../../sysutils/coreutils
 TOOLS_SYMLINK+=                        false
 TOOLS_REAL_CMD.false=          ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}false
-.    if exists(${TOOLS_REAL_CMD.false})
 ${_TOOLS_VARNAME.false}=       ${TOOLS_REAL_CMD.false}
-.    endif
 .  endif
 .endif
 
@@ -339,9 +303,7 @@
 TOOLS_DEPENDS.fgrep?=          grep>=2.5.1:../../textproc/grep
 TOOLS_SYMLINK+=                        fgrep
 TOOLS_REAL_CMD.fgrep=          ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}fgrep
-.    if exists(${TOOLS_REAL_CMD.fgrep})
 ${_TOOLS_VARNAME.fgrep}=       ${TOOLS_REAL_CMD.fgrep}
-.    endif
 .  endif
 .endif
 
@@ -352,9 +314,7 @@
 TOOLS_DEPENDS.file?=           file>=4.13:../../sysutils/file
 TOOLS_SYMLINK+=                        file
 TOOLS_REAL_CMD.file=           ${LOCALBASE}/bin/file
-.    if exists(${TOOLS_REAL_CMD.file})
 ${_TOOLS_VARNAME.file}=        ${TOOLS_REAL_CMD.file}
-.    endif
 .  endif
 .endif
 
@@ -365,9 +325,7 @@
 TOOLS_DEPENDS.find?=           findutils>=4.1:../../sysutils/findutils
 TOOLS_SYMLINK+=                        find
 TOOLS_REAL_CMD.find=           ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}find
-.    if exists(${TOOLS_REAL_CMD.find})
 ${_TOOLS_VARNAME.find}=                ${TOOLS_REAL_CMD.find}
-.    endif
 .  endif
 .endif
 
@@ -378,9 +336,7 @@
 TOOLS_DEPENDS.gawk?=           gawk>=3.1.1:../../lang/gawk
 TOOLS_SYMLINK+=                        gawk
 TOOLS_REAL_CMD.gawk=           ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}awk
-.    if exists(${TOOLS_REAL_CMD.gawk})
 ${_TOOLS_VARNAME.gawk}=                ${TOOLS_REAL_CMD.gawk}
-.    endif
 .  endif
 TOOLS_CMD.gawk=                        ${TOOLS_DIR}/bin/awk
 .endif
@@ -392,9 +348,7 @@
 TOOLS_DEPENDS.gm4?=            m4>=1.4:../../devel/m4
 TOOLS_SYMLINK+=                        gm4
 TOOLS_REAL_CMD.gm4=            ${LOCALBASE}/bin/gm4
-.    if exists(${TOOLS_REAL_CMD.gm4})
 ${_TOOLS_VARNAME.gm4}=         ${TOOLS_REAL_CMD.gm4}
-.    endif
 .  endif
 TOOLS_CMD.gm4=                 ${TOOLS_DIR}/bin/m4
 .endif
@@ -406,9 +360,7 @@
 TOOLS_DEPENDS.gmake?=          gmake>=3.78:../../devel/gmake
 TOOLS_SYMLINK+=                        gmake
 TOOLS_REAL_CMD.gmake=          ${LOCALBASE}/bin/gmake
-.    if exists(${TOOLS_REAL_CMD.gmake})
 ${_TOOLS_VARNAME.gmake}=       ${TOOLS_REAL_CMD.gmake}
-.    endif
 .  endif
 .endif
 
@@ -419,9 +371,7 @@
 TOOLS_DEPENDS.grep?=           grep>=2.5.1:../../textproc/grep
 TOOLS_SYMLINK+=                        grep
 TOOLS_REAL_CMD.grep=           ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}grep
-.    if exists(${TOOLS_REAL_CMD.grep})
 ${_TOOLS_VARNAME.grep}=                ${TOOLS_REAL_CMD.grep}
-.    endif
 .  endif
 .endif
 
@@ -432,9 +382,7 @@
 TOOLS_DEPENDS.gsed?=           gsed>=3.0.2:../../textproc/gsed
 TOOLS_SYMLINK+=                        gsed
 TOOLS_REAL_CMD.gsed=           ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}sed
-.    if exists(${TOOLS_REAL_CMD.gsed})
 ${_TOOLS_VARNAME.gsed}=                ${TOOLS_REAL_CMD.gsed}
-.    endif
 .  endif
 TOOLS_CMD.gsed=                        ${TOOLS_DIR}/bin/sed
 .endif
@@ -450,9 +398,7 @@
 #TOOLS_DEPENDS.gtar?=          pax>=20040802:../../archivers/pax
 TOOLS_SYMLINK+=                        gtar
 TOOLS_REAL_CMD.gtar=           ${LOCALBASE}/bin/tar
-.    if exists(${TOOLS_REAL_CMD.gtar})
 ${_TOOLS_VARNAME.gtar}=                ${TOOLS_REAL_CMD.gtar}
-.    endif
 .  endif
 TOOLS_CMD.gtar=                        ${TOOLS_DIR}/bin/tar
 .endif
@@ -464,9 +410,7 @@
 TOOLS_DEPENDS.gunzip?=         gzip-base>=1.2.4b:../../archivers/gzip-base



Home | Main Index | Thread Index | Old Index