Date: Wed, 6 Dec 1995 03:01:53 -0800 From: asami@cs.berkeley.edu (Satoshi Asami) To: jkh@time.cdrom.com Cc: ports@freebsd.org Subject: Re: Proposed change to bsd.port.mk Message-ID: <199512061101.DAA06667@silvia.HIP.Berkeley.EDU> In-Reply-To: <13988.818198260@time.cdrom.com> (jkh@time.cdrom.com)
next in thread | previous in thread | raw e-mail | index | archive | help
* 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 * * + .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) This seems useful and correct (at least I tested your example :), no objections from me. By the way, two small questions about technical details: (1) Why don't you just define the new target as "all" and get rid of the extra "all: all_hook" line? (2) The new target should be either moved completely inside the test for "!target(all)" or outside (i.e., the added ".endif" should go in place of the added ".else"). The way it is now, it's sort of confusing as it mixes two tests. The Gunslinger
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512061101.DAA06667>