summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-02-12 13:39:57 +0000
committerjlam <jlam@pkgsrc.org>2004-02-12 13:39:57 +0000
commitc7e915ef09fb310ea2715d019b502a6578a776f5 (patch)
tree8ae7cb4f692e32b801d4b5a787bf44301b3c8841 /mk
parent512f44d53d99ef77cddbb3cda9b6cf0f4d26d32b (diff)
downloadpkgsrc-c7e915ef09fb310ea2715d019b502a6578a776f5.tar.gz
Double-check that the files named in GNU_MISSING_OVERRIDE actually exist
before replacing them.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk10
1 files changed, 6 insertions, 4 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index b2a8b19589f..8fec46da0b6 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1390 2004/02/12 13:30:04 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1391 2004/02/12 13:39:57 jlam Exp $
#
# This file is in the public domain.
#
@@ -2460,10 +2460,12 @@ _CONFIGURE_POSTREQ+= do-gnu-missing-override
.PHONY: do-gnu-missing-override
do-gnu-missing-override:
. for file in ${GNU_MISSING_OVERRIDE}
- ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${WRKSRC}/${file}
${_PKG_SILENT}${_PKG_DEBUG} \
- ${CP} ${_PKGSRCDIR}/mk/gnu-config/missing ${WRKSRC}/${file}
- ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${WRKSRC}/${file}
+ if [ -f ${WRKSRC}/${file} ]; then \
+ ${RM} -f ${WRKSRC}/${file}; \
+ ${CP} ${_PKGSRCDIR}/mk/gnu-config/missing ${WRKSRC}/${file}; \
+ ${CHMOD} +x ${WRKSRC}/${file}; \
+ fi
. endfor
.endif