summaryrefslogtreecommitdiff
path: root/mk/subst.mk
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2003-12-27 03:05:53 +0000
committergrant <grant@pkgsrc.org>2003-12-27 03:05:53 +0000
commitc331d66fa1098bf3fa7cb5937187e17164cff806 (patch)
tree86d447a28c22419fe6a1da503fd9606b6cf5998b /mk/subst.mk
parent74f8aaa8f91bbdf4a7937c8d689e9e02ab3b737b (diff)
downloadpkgsrc-c331d66fa1098bf3fa7cb5937187e17164cff806.tar.gz
bomb to prevent silent failure if we're unable to rename a file
before subst'ing it. previously, only a warning would be printed and the .subst_done cookie(s) would be created, indicating that the subst target was successful when it really was not.
Diffstat (limited to 'mk/subst.mk')
-rw-r--r--mk/subst.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/mk/subst.mk b/mk/subst.mk
index 68b5b6634cb..6187bb6f9d7 100644
--- a/mk/subst.mk
+++ b/mk/subst.mk
@@ -1,4 +1,4 @@
-# $NetBSD: subst.mk,v 1.5 2003/12/27 03:02:11 grant Exp $
+# $NetBSD: subst.mk,v 1.6 2003/12/27 03:05:53 grant Exp $
#
# This Makefile fragment implements a general text replacement facility
# for different classes of files in ${WRKSRC}. For each class of files,
@@ -69,7 +69,7 @@ ${_SUBST_COOKIE.${_class_}}:
case "$$files" in \
"") ;; \
*) for file in $${files}; do \
- ${MV} -f $$file $$file.subst.sav; \
+ ${MV} -f $$file $$file.subst.sav || exit 1; \
${CAT} $$file.subst.sav \
| ${SUBST_FILTER_CMD.${_class_}} \
> $$file; \