pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk bomb to prevent silent failure if we're unable to r...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ca47a0fa13fe
branches:  trunk
changeset: 465299:ca47a0fa13fe
user:      grant <grant%pkgsrc.org@localhost>
date:      Sat Dec 27 03:05:53 2003 +0000

description:
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:

 mk/subst.mk |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 8e68b47b2366 -r ca47a0fa13fe mk/subst.mk
--- a/mk/subst.mk       Sat Dec 27 03:02:11 2003 +0000
+++ b/mk/subst.mk       Sat Dec 27 03:05:53 2003 +0000
@@ -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 @@
        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;                               \



Home | Main Index | Thread Index | Old Index