From owner-freebsd-ports Fri Mar 3 02:40:56 1995 Return-Path: ports-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id CAA09663 for ports-outgoing; Fri, 3 Mar 1995 02:40:56 -0800 Received: from post.demon.co.uk (post.demon.co.uk [158.152.1.72]) by freefall.cdrom.com (8.6.9/8.6.6) with SMTP id CAA09657 for ; Fri, 3 Mar 1995 02:40:53 -0800 Received: from punt.demon.co.uk by post.demon.co.uk id aa10559; 3 Mar 95 10:36 GMT Received: from palmer.demon.co.uk by punt.demon.co.uk id aa16216; 3 Mar 95 10:33 GMT Received: from localhost (gary@localhost [127.0.0.1]) by palmer.demon.co.uk (8.6.9/8.6.9) with SMTP id KAA00901; Fri, 3 Mar 1995 10:32:00 GMT X-Authentication-Warning: palmer.demon.co.uk: Host localhost didn't use HELO protocol To: "Jordan K. Hubbard" cc: ports@freefall.cdrom.com Subject: Re: Ok, I'm stumped. In-reply-to: Your message of "Thu, 02 Mar 1995 23:49:50 PST." <199503030749.XAA02499@time.cdrom.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <897.794226718.1@palmer.demon.co.uk> Date: Fri, 03 Mar 1995 10:31:59 +0000 Message-ID: <898.794226719@palmer.demon.co.uk> From: Gary Palmer Sender: ports-owner@FreeBSD.org Precedence: bulk In message <199503030749.XAA02499@time.cdrom.com>, "Jordan K. Hubbard" writes: >The problem is that I'm kinda stumped on how to do it. Setting a variable >called NO_foobar to disable the foobar port is all well and good, but >we've got no variable anywhere that defines a port as simply "foobar"! :-( >We've got ${DISTNAME} but that's unfortunately often set to things like >foobar_11b-20.1 which doesn't make a good shell variable name. Or we've >got ${.CURDIR}, but that's set to /usr/ports/blah/bar/foobar. Sigh. Yeah - that one has bitten me before, but I can't remember when :-( >What would be neat would be some way of picking off the `entry' in >bsd.port.subdir.mk and checking to see if the value of >"X${NO_$${ENTRY}}" = "X", but I don't see any easy way of doing the >recursive shell variable expansion. Ahem. Sidestep the problem. >Any suggestions? This is where my knowledge of `sh' leaves off! :-( Try this patch : Index: bsd.port.subdir.mk =================================================================== RCS file: /home/cvs/src/share/mk/bsd.port.subdir.mk,v retrieving revision 1.9 diff -c -r1.9 bsd.port.subdir.mk *** 1.9 1995/01/05 01:46:05 --- bsd.port.subdir.mk 1995/03/03 10:29:48 *************** *** 13,28 **** _SUBDIRUSE: .USE @for entry in ${SUBDIR}; do \ ! (if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \ ! echo "===> ${DIRPRFX}$${entry}.${MACHINE}"; \ ! edir=$${entry}.${MACHINE}; \ ! cd ${.CURDIR}/$${edir}; \ ! else \ ! echo "===> ${DIRPRFX}$$entry"; \ ! edir=$${entry}; \ ! cd ${.CURDIR}/$${edir}; \ fi; \ - ${MAKE} ${.TARGET:realinstall=install} DIRPRFX=${DIRPRFX}$$edir/); \ done ${SUBDIR}:: --- 13,38 ---- _SUBDIRUSE: .USE @for entry in ${SUBDIR}; do \ ! OK=""; \ ! for dud in $$DUDS; do \ ! if [ $${dud} = $${entry} ]; then \ ! OK="false"; \ ! echo "===> ${DIRPRFX}$${entry} skipped"; \ ! fi; \ ! done; \ ! if [ "$$OK" = "" ]; then \ ! if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \ ! echo "===> ${DIRPRFX}$${entry}.${MACHINE}"; \ ! edir=$${entry}.${MACHINE}; \ ! cd ${.CURDIR}/$${edir}; \ ! else \ ! echo "===> ${DIRPRFX}$$entry"; \ ! edir=$${entry}; \ ! cd ${.CURDIR}/$${edir}; \ ! fi; \ ! ${MAKE} ${.TARGET:realinstall=install} \ ! DIRPRFX=${DIRPRFX}$$edir/; \ fi; \ done ${SUBDIR}:: Then: When you find a duff port do: setenv DUDS If you have more than one, just do setenv DUDS " " (or if you are just adding a new DUD then setenv DUDS "$DUDS " should do the trick) It should work (it seemed to in my limited tests here). Any good? Gary