summaryrefslogtreecommitdiff
path: root/mk/flavor
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-10-09 01:40:49 +0000
committerrillig <rillig@pkgsrc.org>2006-10-09 01:40:49 +0000
commitf8810ba0283a8b7c765bde90067b64c49b6190f4 (patch)
treeadaa13c8be68d5d009a8d9567f258792bf150fd3 /mk/flavor
parent6e913917223042bb2b6c4e842120787f1478284e (diff)
downloadpkgsrc-f8810ba0283a8b7c765bde90067b64c49b6190f4.tar.gz
Replaced the pipe operator with temporary files, since the former hides
errors. Now "make depends" stops on dependency directories that don't exist. The dependencies are first extracted into two temporary files and then combined with cat(1) because otherwise "make depends" passes silently on errors when it is called for the second time. Somehow ${.TARGET} didn't get removed.
Diffstat (limited to 'mk/flavor')
-rw-r--r--mk/flavor/pkg/depends.mk16
1 files changed, 9 insertions, 7 deletions
diff --git a/mk/flavor/pkg/depends.mk b/mk/flavor/pkg/depends.mk
index fc7bc5c9ffb..fc28921d9c5 100644
--- a/mk/flavor/pkg/depends.mk
+++ b/mk/flavor/pkg/depends.mk
@@ -1,4 +1,4 @@
-# $NetBSD: depends.mk,v 1.12 2006/07/27 21:46:46 jlam Exp $
+# $NetBSD: depends.mk,v 1.13 2006/10/09 01:40:49 rillig Exp $
_DEPENDS_FILE= ${WRKDIR}/.depends
_REDUCE_DEPENDS_CMD= ${SETENV} CAT=${CAT:Q} \
@@ -42,24 +42,26 @@ depends-cookie: ${_DEPENDS_FILE}
${_DEPENDS_FILE}:
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- ${_REDUCE_DEPENDS_CMD} ${BUILD_DEPENDS:Q} | \
+ ${_PKG_SILENT}${_PKG_DEBUG} set -e; \
+ ${_REDUCE_DEPENDS_CMD} ${BUILD_DEPENDS:Q} > ${.TARGET}.tmp; \
while read dep; do \
pattern=`${ECHO} $$dep | ${SED} -e "s,:.*,,"`; \
dir=`${ECHO} $$dep | ${SED} -e "s,.*:,,"`; \
${TEST} -n "$$pattern" || exit 1; \
${TEST} -n "$$dir" || exit 1; \
${ECHO} "build $$pattern $$dir"; \
- done >> ${.TARGET}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- ${_REDUCE_DEPENDS_CMD} ${DEPENDS:Q} | \
+ done < ${.TARGET}.tmp >> ${.TARGET}.tmp1
+ ${_PKG_SILENT}${_PKG_DEBUG} set -e; \
+ ${_REDUCE_DEPENDS_CMD} ${DEPENDS:Q} > ${.TARGET}.tmp; \
while read dep; do \
pattern=`${ECHO} $$dep | ${SED} -e "s,:.*,,"`; \
dir=`${ECHO} $$dep | ${SED} -e "s,.*:,,"`; \
${TEST} -n "$$pattern" || exit 1; \
${TEST} -n "$$dir" || exit 1; \
${ECHO} "full $$pattern $$dir"; \
- done >> ${.TARGET}
+ done < ${.TARGET}.tmp >> ${.TARGET}.tmp2
+ ${_PKG_DEBUG}${_PKG_SILENT} \
+ cat ${.TARGET}.tmp1 ${.TARGET.tmp2} >> ${.TARGET}
######################################################################
### depends-install (PRIVATE, pkgsrc/mk/depends/depends.mk)