summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2005-04-27 17:29:06 +0000
committerjlam <jlam>2005-04-27 17:29:06 +0000
commit48f0a831c2eeea8cc6d7614cc926cb9f640f59ef (patch)
treee55e3ecc1bfdc10772ad9d2ef365191832621e8e /mk
parentd142c81b6012496e92b10565baa263e68596151e (diff)
downloadpkgsrc-48f0a831c2eeea8cc6d7614cc926cb9f640f59ef.tar.gz
Split out the perl handling to a separate file, since we always use the
pkgsrc perl, and it isn't really like any of the other tools that we replace based on a system-/pkgsrc-supplied distinction.
Diffstat (limited to 'mk')
-rw-r--r--mk/tools/perl.mk18
-rw-r--r--mk/tools/replace.mk23
2 files changed, 20 insertions, 21 deletions
diff --git a/mk/tools/perl.mk b/mk/tools/perl.mk
new file mode 100644
index 00000000000..111d9dc7254
--- /dev/null
+++ b/mk/tools/perl.mk
@@ -0,0 +1,18 @@
+# $NetBSD: perl.mk,v 1.1 2005/04/27 17:29:06 jlam Exp $
+
+# Create a symlink from ${TOOLS_DIR}/bin/perl to ${PERL5} when USE_PERL5
+# is defined. This ensures that the correct perl is executed when it's
+# invoked as a bare "perl".
+#
+.if defined(USE_PERL5) && !defined(TOOLS_IGNORE.perl)
+. if !empty(PKGPATH:Mlang/perl58)
+MAKEFLAGS+= TOOLS_IGNORE.perl=
+. else
+. include "../../lang/perl5/buildlink3.mk"
+TOOLS_SYMLINK+= perl
+TOOLS_REAL_CMD.perl= ${PERL5}
+. if exists(${TOOLS_REAL_CMD.perl})
+PERL5= ${TOOLS_REAL_CMD.perl}
+. endif
+. endif
+.endif
diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk
index 30433c0d96f..9fe4083fe43 100644
--- a/mk/tools/replace.mk
+++ b/mk/tools/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.42 2005/04/27 17:15:13 jlam Exp $
+# $NetBSD: replace.mk,v 1.43 2005/04/27 17:29:06 jlam Exp $
#
# This Makefile fragment handles "replacements" of system-supplied
# tools with pkgsrc versions. The replacements are placed under
@@ -38,10 +38,6 @@ USE_TOOLS+= ${USE_GNU_TOOLS:S/^awk$/gawk/:S/^make$/gmake/:S/^sed$/gsed/}
USE_TOOLS+= tbl
.endif
-.if defined(USE_PERL5)
-USE_TOOLS+= perl
-.endif
-
# These are the platform-specific lists of system-supplied tools.
#
# XXX These should eventually just migrate over to the appropriate
@@ -57,8 +53,7 @@ USE_TOOLS+= perl
#
_TOOLS_REPLACE_LIST= awk bison cmp egrep fgrep file find gawk gm4 \
gmake grep gsed gtar gunzip gzcat gzip lex m4 \
- mtree patch pax perl sed sh shlock tbl xargs \
- yacc
+ mtree patch pax sed sh shlock tbl xargs yacc
# "TOOL" variable names associated with each of the tools
_TOOLS_VARNAME.awk= AWK
@@ -82,7 +77,6 @@ _TOOLS_VARNAME.m4= M4
_TOOLS_VARNAME.mtree= MTREE
_TOOLS_VARNAME.patch= PATCH
_TOOLS_VARNAME.pax= PAX
-_TOOLS_VARNAME.perl= PERL5
_TOOLS_VARNAME.sed= SED
_TOOLS_VARNAME.sh= SH
_TOOLS_VARNAME.shlock= SHLOCK
@@ -420,19 +414,6 @@ ${_TOOLS_VARNAME.patch}= ${TOOLS_REAL_CMD.patch}
. endif
.endif
-.if !defined(TOOLS_IGNORE.perl) && !empty(USE_TOOLS:Mperl)
-. if !empty(PKGPATH:Mlang/perl5)
-MAKEFLAGS+= TOOLS_IGNORE.perl=
-. elif !empty(_TOOLS_USE_PKGSRC.perl:M[yY][eE][sS])
-. include "../../lang/perl5/buildlink3.mk"
-TOOLS_SYMLINK+= perl
-TOOLS_REAL_CMD.perl= ${LOCALBASE}/bin/perl
-. if exists(${TOOLS_REAL_CMD.perl})
-${_TOOLS_VARNAME.perl}= ${TOOLS_REAL_CMD.perl}
-. endif
-. endif
-.endif
-
# "gsed" overrides "sed"
.if !defined(TOOLS_IGNORE.sed) && !empty(USE_TOOLS:Msed) && \
empty(USE_TOOLS:Mgsed)