From owner-freebsd-ports Tue Dec 5 13:18:09 1995 Return-Path: owner-ports Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA05817 for ports-outgoing; Tue, 5 Dec 1995 13:18:09 -0800 Received: from time.cdrom.com (time.cdrom.com [192.216.222.226]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id NAA05804 for ; Tue, 5 Dec 1995 13:18:03 -0800 Received: from localhost (localhost [127.0.0.1]) by time.cdrom.com (8.6.12/8.6.9) with SMTP id NAA13990 for ; Tue, 5 Dec 1995 13:17:40 -0800 To: ports@freebsd.org Subject: Proposed change to bsd.port.mk Date: Tue, 05 Dec 1995 13:17:40 -0800 Message-ID: <13988.818198260@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-ports@freebsd.org Precedence: bulk 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) 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