summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam>2002-11-25 19:32:47 +0000
committerjlam <jlam>2002-11-25 19:32:47 +0000
commit5f88e20f36c1e7da8a0bc69d76b9786052936592 (patch)
treef1c2eeb19c4098fb59c7eeba468ce46f29e4f15d
parentdca85e086e4409d49a532fe37c362386dd6a6ec9 (diff)
downloadpkgsrc-5f88e20f36c1e7da8a0bc69d76b9786052936592.tar.gz
In the _BUILDLINK_SUBST_USE target, save the original file from which we
generate the "sed-substituted" file with a ".blsav" suffix. This is primarily useful for debugging purposes.
-rw-r--r--mk/buildlink2/bsd.buildlink2.mk14
1 files changed, 8 insertions, 6 deletions
diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk
index 1effca3ea34..9c4c89a0ba4 100644
--- a/mk/buildlink2/bsd.buildlink2.mk
+++ b/mk/buildlink2/bsd.buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink2.mk,v 1.54 2002/11/21 00:21:11 jlam Exp $
+# $NetBSD: bsd.buildlink2.mk,v 1.55 2002/11/25 19:32:47 jlam Exp $
#
# An example package buildlink2.mk file:
#
@@ -382,13 +382,15 @@ _BUILDLINK_SUBST_USE: .USE
cd ${WRKSRC}; \
for file in $${files}; do \
if ${_BLNK_CHECK_IS_TEXT_FILE}; then \
+ ${MV} -f $${file} $${file}.blsav; \
${SED} ${BUILDLINK_SUBST_SED.${.TARGET:S/-buildlink-subst//}} \
- $${file} > $${file}.modified; \
- if [ -x $${file} ]; then \
- ${CHMOD} +x $${file}.modified; \
+ $${file}.blsav > $${file}; \
+ if [ -x $${file}.blsav ]; then \
+ ${CHMOD} +x $${file}; \
fi; \
- if ${CMP} -s $${file} $${file}.modified; then :; else \
- ${MV} -f $${file}.modified $${file}; \
+ if ${CMP} -s $${file}.blsav $${file}; then \
+ ${MV} -f $${file}.blsav $${file}; \
+ else \
${ECHO} $${file} >> $${cookie}; \
fi; \
fi; \