From eec5c74ac986d4e4936843a68b947d3678870659 Mon Sep 17 00:00:00 2001 From: jkh Date: Wed, 5 Oct 1994 22:28:45 +0000 Subject: [PATCH] Following changes from Robert Withrow (+ a few mods): 1. Make DEPENDS fully qualified, and not implictly assume relative to ${PORTSDIR}. This allows more arbitrary dependencies to be specified. This also means that DEPENDS= x11/foo needs to be changed to DEPENDS= ${PORTSDIR}/x11/foo in any Makefiles. I'll try to do these changes myself. 2. Add an option NO_DEPENDS to disable the automagic building of depended ports. Submitted by: rww --- share/mk/bsd.port.mk | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/share/mk/bsd.port.mk b/share/mk/bsd.port.mk index 2769eac76a53..e406edc46abd 100644 --- a/share/mk/bsd.port.mk +++ b/share/mk/bsd.port.mk @@ -3,7 +3,7 @@ # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. # -# $Id: bsd.port.mk,v 1.47 1994/10/04 15:48:21 jkh Exp $ +# $Id: bsd.port.mk,v 1.48 1994/10/04 15:50:43 jkh Exp $ # # Please view me with 4 column tabs! @@ -45,6 +45,7 @@ # NO_PACKAGE - Use a dummy (do-nothing) package target. # NO_INSTALL - Use a dummy (do-nothing) install target. # NO_WRKSUBDIR - Assume port unpacks directly into ${WRKDIR}. +# NO_DEPENDS - Don't verify build of dependencies. # USE_GMAKE - Says that the port uses gmake. # USE_IMAKE - Says that the port uses imake. # HAS_CONFIGURE - Says that the port has its own configure script. @@ -229,16 +230,18 @@ build: configure pre-build @echo "===> Building for ${DISTNAME}" .if defined(DEPENDS) @echo "===> ${DISTNAME} depends on: ${DEPENDS}" +.if !defined(NO_DEPENDS) @for i in ${DEPENDS}; do \ echo "===> Verifying build for $$i"; \ - if [ ! -d ${PORTSDIR}/$$i ]; then \ - echo ">> No directory for ${PORTSDIR}/$$i. Skipping.."; \ + if [ ! -d $$i ]; then \ + echo ">> No directory for $$i. Skipping.."; \ else \ - (cd ${PORTSDIR}/$$i; ${MAKE} is_depended) ; \ + (cd $$i; ${MAKE} is_depended) ; \ fi \ done @echo "===> Returning to build of ${DISTNAME}" .endif +.endif .if defined(USE_GMAKE) @(cd ${WRKSRC}; ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} all) .else defined(USE_GMAKE) @@ -248,6 +251,7 @@ build: configure pre-build env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ + DEPENDS="${DEPENDS}" \ sh ${SCRIPTDIR}/post-build; \ fi .endif @@ -275,12 +279,14 @@ ${CONFIGURE_COOKIE}: env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ + DEPENDS="${DEPENDS}" \ sh ${SCRIPTDIR}/pre-configure; \ fi @if [ -f ${SCRIPTDIR}/configure ]; then \ env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ + DEPENDS="${DEPENDS}" \ sh ${SCRIPTDIR}/configure; \ fi .if defined(HAS_CONFIGURE) @@ -293,6 +299,7 @@ ${CONFIGURE_COOKIE}: env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ + DEPENDS="${DEPENDS}" \ sh ${SCRIPTDIR}/post-configure; \ fi @touch -f ${CONFIGURE_COOKIE}