diff options
author | rillig <rillig@pkgsrc.org> | 2007-02-19 10:33:46 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2007-02-19 10:33:46 +0000 |
commit | fad42cf10bd3a4b18934684434cf25a34c913380 (patch) | |
tree | be51901ec4ebdc26bff09d69b46174c07f9d4844 /mk | |
parent | 5a2b72057231d6128256bfe45768f20087cecfaf (diff) | |
download | pkgsrc-fad42cf10bd3a4b18934684434cf25a34c913380.tar.gz |
When make(1)'s shell is a Korn shell, brace expansion may be performed.
This is especially critical for dependency patterns like
p5-perl-headers-6.5{,nb*}, which just occured on IRIX.
By the way, in "set -e" mode, assertions for non-empty variables can be
written much easier.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/flavor/pkg/depends.mk | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mk/flavor/pkg/depends.mk b/mk/flavor/pkg/depends.mk index 4f80c393be7..ddb8122236d 100644 --- a/mk/flavor/pkg/depends.mk +++ b/mk/flavor/pkg/depends.mk @@ -1,4 +1,4 @@ -# $NetBSD: depends.mk,v 1.17 2007/02/19 10:18:33 rillig Exp $ +# $NetBSD: depends.mk,v 1.18 2007/02/19 10:33:46 rillig Exp $ _DEPENDS_FILE= ${WRKDIR}/.depends _REDUCE_DEPENDS_CMD= ${SETENV} CAT=${CAT:Q} \ @@ -46,20 +46,20 @@ ${_DEPENDS_FILE}: ${RUN} \ exec 0< ${.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; \ + pattern=`${ECHO} "$$dep" | ${SED} -e "s,:.*,,"`; \ + dir=`${ECHO} "$$dep" | ${SED} -e "s,.*:,,"`; \ + [ "$$pattern" ]; \ + [ "$$dir" ]; \ ${ECHO} "build $$pattern $$dir"; \ done >> ${.TARGET} ${RUN} ${_REDUCE_DEPENDS_CMD} ${DEPENDS:Q} > ${.TARGET}.tmp ${RUN} \ exec 0< ${.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; \ + pattern=`${ECHO} "$$dep" | ${SED} -e "s,:.*,,"`; \ + dir=`${ECHO} "$$dep" | ${SED} -e "s,.*:,,"`; \ + [ "$$pattern" ]; \ + [ "$$dir" ]; \ ${ECHO} "full $$pattern $$dir"; \ done >> ${.TARGET} |