From owner-freebsd-ports Thu Dec 7 06:07:11 1995 Return-Path: owner-ports Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA13918 for ports-outgoing; Thu, 7 Dec 1995 06:07:11 -0800 (PST) Received: from chemserv.umd.edu (chemserv.umd.edu [129.2.64.40]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id GAA13913 for ; Thu, 7 Dec 1995 06:07:09 -0800 (PST) Received: from cappuccino.eng.umd.edu (cappuccino.eng.umd.edu [129.2.98.14]) by chemserv.umd.edu (8.7.2/8.7) with ESMTP id JAA13135; Thu, 7 Dec 1995 09:07:04 -0500 (EST) Received: (chuckr@localhost) by cappuccino.eng.umd.edu (8.7.3/8.6.4) id JAA01773; Thu, 7 Dec 1995 09:07:04 -0500 (EST) Date: Thu, 7 Dec 1995 09:07:03 -0500 (EST) From: Chuck Robey X-Sender: chuckr@cappuccino.eng.umd.edu To: "Jordan K. Hubbard" cc: ports@freebsd.org Subject: Re: Proposed change to bsd.port.mk In-Reply-To: <13988.818198260@time.cdrom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-ports@freebsd.org Precedence: bulk On Tue, 5 Dec 1995, Jordan K. Hubbard wrote: > I was just thinking today that it might be nice to be able to write > your own scripts for traversing the ports tree, so I came up with this: > > *** /usr/src/share/mk/bsd.port.mk Fri Oct 6 00:20:35 1995 > --- /usr/share/mk/bsd.port.mk Tue Dec 5 02:24:42 1995 > *************** > *** 402,409 **** > --- 402,422 ---- > @${DO_NADA} > .endif > Not bad, gives great flexibility ... I can change it as I please .... Doesn't interfere with normal compilation ... I like this! > + .if defined(ALL_HOOK) > + all_hook: > + @/usr/bin/env CURDIR=${.CURDIR} DISTNAME=${DISTNAME} \ > + DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ > + WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ > + FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ > + DEPENDS="${DEPENDS}" BUILD_DEPENDS="${BUILD_DEPENDS}" \ > + RUN_DEPENDS="${RUN_DEPENDS}" X11BASE=${X11BASE} \ > + ${ALL_HOOK} > + > + all: all_hook > + .else > .if !target(all) > all: build > + .endif > .endif > > .if !defined(IS_DEPENDED_TARGET) > > Allowing you to do something like this: > > % cd /usr/ports > % make ALL_HOOK='echo ${DISTNAME}: `cat ${PKGDIR}/COMMENT`' ECHO_MSG='echo >/dev/null' > > To produce output like this: > > arc521e.pl8: arc - create & extract files from DOS .ARC files > sharutils-4.1.4: Allow packing and unpacking of shell archives, v4.1.4 > ha0999: ha - the HA archiver using the HSC compression method, version 0.999beta > lha101u: LHA - version 101u. Compress/uncompress files using LZW compression (.lzh files) > unarj: unarj version 2.41 - allows files to be extracted from ARJ archives. > ... > > What do folks think? > > Jordan > ============================================================================ Chuck Robey chuckr@eng.umd.edu -- I run FreeBSD on n3lxx and Journey2 --------------------------------------------------------------------------- The Dilbert Zone is Dilbert's new WWW home! The area features never-before-seen original sketches of Dilbert, a photo tour of Scott Adams' studio, Dilbert Trivia and memorabilia, high school photos and much more!: