From owner-freebsd-ports Sun Nov 3 20:16:36 1996 Return-Path: owner-ports Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id UAA08249 for ports-outgoing; Sun, 3 Nov 1996 20:16:36 -0800 (PST) Received: from alpha.xerox.com (alpha.Xerox.COM [13.1.64.93]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id UAA08236 for ; Sun, 3 Nov 1996 20:16:32 -0800 (PST) Received: from crevenia.parc.xerox.com ([13.2.116.11]) by alpha.xerox.com with SMTP id <15376(2)>; Sun, 3 Nov 1996 16:55:30 PST Received: by crevenia.parc.xerox.com id <177557>; Sun, 3 Nov 1996 16:55:28 -0800 From: Bill Fenner To: ports@freebsd.org Subject: Figuring out another port's build directory Message-Id: <96Nov3.165528pst.177557@crevenia.parc.xerox.com> Date: Sun, 3 Nov 1996 16:55:16 PST Sender: owner-ports@freebsd.org X-Loop: FreeBSD.org Precedence: bulk My "vat" port depends on include files in the gsm port's build directory. I could hardcode in "${PORTSDIR}/audio/gsm/work/gsm-1.0-pl10", but given that 2.1.5 had gsm1.0.7 and -current has gsm1.0.10, I'm hesitant to do that. Does anyone see anything wrong with the following Makefile construct (other than that it's hairy)? GSM_DIR= ${PORTSDIR}/audio/gsm # Grunge the GSM work directory out of the port makefile. CONFIGURE_ARGS= --with-gsm=`awk '/^WRKSRC=/ { sub(/$$[{(]?WRKDIR[})]?/, WRKDIR, $$2); print $$2 }' WRKDIR=${GSM_DIR}/work ${GSM_DIR}/Makefile` This should handle all of WRKSRC= $WRKDIR/foo WRKSRC= $(WRKDIR)/foo WRKSRC= ${WRKDIR}/foo Thanks, Bill (I previously used `echo ${GSM_DIR}/work/gsm*`, but got worried about someone not cleaning out their "work" directory after the gsm port got updated and having both gsm-1.0-pl7 and gsm-1.0-pl10 directories present)