From c331d66fa1098bf3fa7cb5937187e17164cff806 Mon Sep 17 00:00:00 2001 From: grant Date: Sat, 27 Dec 2003 03:05:53 +0000 Subject: 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. --- mk/subst.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mk/subst.mk') 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; \ -- cgit v1.2.3