summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorminskim <minskim@pkgsrc.org>2004-12-30 09:47:01 +0000
committerminskim <minskim@pkgsrc.org>2004-12-30 09:47:01 +0000
commit90e4fe3699e9cad87a629768da1403e5e880268b (patch)
tree97e63b1fd547f4710db035f47df8e867adb109e9
parent8e3130afa92a9ee899af851b723084b11cf1e081 (diff)
downloadpkgsrc-90e4fe3699e9cad87a629768da1403e5e880268b.tar.gz
Create a symlink to the pkgsrc perl executable in ${TOOLDIR}/bin so
that native perl is never used. Suggested by jlam@.
-rw-r--r--mk/tools.mk17
1 files changed, 16 insertions, 1 deletions
diff --git a/mk/tools.mk b/mk/tools.mk
index b9076cfd49c..3708530f28f 100644
--- a/mk/tools.mk
+++ b/mk/tools.mk
@@ -1,4 +1,4 @@
-# $NetBSD: tools.mk,v 1.48 2004/12/22 21:39:25 jlam Exp $
+# $NetBSD: tools.mk,v 1.49 2004/12/30 09:47:01 minskim Exp $
#
# This Makefile creates a ${TOOLS_DIR} directory and populates the bin
# subdir with tools that hide the ones outside of ${TOOLS_DIR}.
@@ -391,6 +391,21 @@ ${TOOLS_DIR}/bin/make:
fi
.endif
+# Create a symlink from ${TOOLS_DIR}/bin/perl to ${PERL5} when USE_PERL5
+# is defined.
+.if defined(USE_PERL5)
+override-tools: ${TOOLS_DIR}/bin/perl
+. if !target(${TOOLS_DIR}/bin/perl)
+${TOOLS_DIR}/bin/perl:
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ src="${PERL5}"; \
+ if [ -x $$src -a ! -f ${.TARGET} ]; then \
+ ${MKDIR} ${.TARGET:H}; \
+ ${LN} -sf $$src ${.TARGET}; \
+ fi
+. endif
+.endif
+
# Always create a ${TOOLS_DIR}/bin/rpcgen to wrap the real rpcgen.
# The wrapper will correctly set the CPP environment variable to a
# stat((2)able path to a C preprocessor, then rely on the PATH to