From owner-freebsd-ports Sat May 3 18:46:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id SAA00135 for ports-outgoing; Sat, 3 May 1997 18:46:05 -0700 (PDT) Received: from vader.cs.berkeley.edu (vader.CS.Berkeley.EDU [128.32.38.234]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA00130 for ; Sat, 3 May 1997 18:45:59 -0700 (PDT) Received: (from asami@localhost) by vader.cs.berkeley.edu (8.8.5/8.7.3) id SAA27203; Sat, 3 May 1997 18:45:44 -0700 (PDT) Date: Sat, 3 May 1997 18:45:44 -0700 (PDT) Message-Id: <199705040145.SAA27203@vader.cs.berkeley.edu> To: james@nexis.net, chuckr@mat.net CC: freebsd-ports@FreeBSD.ORG In-reply-to: <199705040118.SAA27103@vader.cs.berkeley.edu> (asami@vader.cs.berkeley.edu) Subject: Re: Suggested change to apache port From: asami@vader.cs.berkeley.edu (Satoshi Asami) Sender: owner-ports@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk * * I guess what I need is something like this: * * * * DEPENDS= ${PORTSDIR}/www/apache:patch * * BUILD_DEPENDS= perl5.003:${PORTSDIR}/lang/perl5:install * * Hmm. That's quite interesting, let me see if I can fix bsd.port.mk to * do it. But (assuming those override DEPENDS_TARGET in the * environment), you need to lose the ":install" at the end of * BUILD_DEPENDS or the package build will have the same problem as * before. It was simpler than I thought. This patch only works for fetch/build/run depends. If this works ok, I'll duplicate it elsewhere (lib-depends and depends have pretty much the same structure) and commit it. Note, the default target is still "install" (or whatever DEPENDS_TARGET is), so you don't need to specify ":install". That way we won't have to go change all the ports. Satoshi ------- Index: bsd.port.mk =================================================================== RCS file: /usr/cvs/src/share/mk/bsd.port.mk,v retrieving revision 1.257 diff -u -r1.257 bsd.port.mk --- bsd.port.mk 1997/04/30 03:12:05 1.257 +++ bsd.port.mk 1997/05/04 01:38:20 @@ -1415,7 +1415,13 @@ .else @for i in ${DEPENDS_TMP}; do \ prog=`${ECHO} $$i | ${SED} -e 's/:.*//'`; \ - dir=`${ECHO} $$i | ${SED} -e 's/.*://'`; \ + dir=`${ECHO} $$i | ${SED} -e 's/[^:]*://'`; \ + if expr "$$dir" : '.*:' > /dev/null; then \ + target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ + dir=`${ECHO} $$dir | ${SED} -e 's/:.*//'`; \ + else \ + target=${DEPENDS_TARGET}; \ + fi; \ if expr "$$prog" : \\/ >/dev/null; then \ if [ -e "$$prog" ]; then \ ${ECHO_MSG} "===> ${PKGNAME} depends on file: $$prog - found"; \ @@ -1434,11 +1440,11 @@ fi; \ fi; \ if [ $$notfound != 0 ]; then \ - ${ECHO_MSG} "===> Verifying ${DEPENDS_TARGET} for $$prog in $$dir"; \ + ${ECHO_MSG} "===> Verifying $$target for $$prog in $$dir"; \ if [ ! -d "$$dir" ]; then \ ${ECHO_MSG} ">> No directory for $$prog. Skipping.."; \ else \ - (cd $$dir; ${MAKE} ${.MAKEFLAGS} ${DEPENDS_TARGET}) ; \ + (cd $$dir; ${MAKE} ${.MAKEFLAGS} $$target) ; \ ${ECHO_MSG} "===> Returning to build of ${PKGNAME}"; \ fi; \ fi; \