summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2001-11-30 03:48:14 +0000
committerjlam <jlam>2001-11-30 03:48:14 +0000
commit5d3d5ac9081155da50a1fa7a7377ed13b12d25fd (patch)
tree42fe223d3ab41fd22946504de7f43b53ca9502be /mk
parent4f2fbaa7f4a836006b8d1fa7a6b616d38ec64e94 (diff)
downloadpkgsrc-5d3d5ac9081155da50a1fa7a7377ed13b12d25fd.tar.gz
Move the REPLACE_PERL code into a separate configure pre-requisite target
"replace-perl", instead of keeping it as part of the do-patch target. Now, a "make patch" will result in just the patched sources.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk24
1 files changed, 15 insertions, 9 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index e529fef19fc..dc3aaff2ac9 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.869 2001/11/30 03:19:04 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.870 2001/11/30 03:48:14 jlam Exp $
#
# This file is in the public domain.
#
@@ -1507,23 +1507,29 @@ do-patch: uptodate-digest
fi; \
fi; \
fi
+.endif
+
+# Configure
-. if defined(REPLACE_PERL)
-. for f in ${REPLACE_PERL}
- ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; if [ -f ${f} ]; then \
+_CONFIGURE_PREREQ+= replace-perl
+replace-perl:
+.if defined(REPLACE_PERL)
+. for f in ${REPLACE_PERL}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ cd ${WRKSRC}; \
+ if [ -f ${f} ]; then \
${SED} "s,#!.*/bin/perl,#!${PERL5}," \
- ${f} > ${f}.new; \
+ ${f} > ${f}.new; \
if [ -x ${f} ]; then \
${CHMOD} a+x ${f}.new; \
fi; \
${MV} -f ${f}.new ${f}; \
fi
-. endfor
-. endif
+. endfor
+.else
+ ${_PKG_SILENT}${_PKG_DEBUG}${TRUE}
.endif
-# Configure
-
_CONFIGURE_PREREQ+= do-ltconfig-override
do-ltconfig-override:
.if defined(USE_LIBTOOL) && defined(LTCONFIG_OVERRIDE)