diff options
author | minskim <minskim> | 2004-12-30 09:47:01 +0000 |
---|---|---|
committer | minskim <minskim> | 2004-12-30 09:47:01 +0000 |
commit | f6ee944321b7f4f9bff85dfc226c11368e394ce2 (patch) | |
tree | 97e63b1fd547f4710db035f47df8e867adb109e9 | |
parent | 86043a0567b8776e21cfb3b0ce17b0856d3829df (diff) | |
download | pkgsrc-f6ee944321b7f4f9bff85dfc226c11368e394ce2.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.mk | 17 |
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 |