diff options
author | jlam <jlam@pkgsrc.org> | 2002-11-25 19:32:47 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-11-25 19:32:47 +0000 |
commit | 5d04f81d5ef939957342569d23c447c9f7813f06 (patch) | |
tree | f1c2eeb19c4098fb59c7eeba468ce46f29e4f15d /mk/buildlink2 | |
parent | 09f8af79beb02a28f8538d04142d9afd84842f69 (diff) | |
download | pkgsrc-5d04f81d5ef939957342569d23c447c9f7813f06.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.
Diffstat (limited to 'mk/buildlink2')
-rw-r--r-- | mk/buildlink2/bsd.buildlink2.mk | 14 |
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; \ |