Date: Wed, 12 Nov 2003 04:40:06 -0800 (PST) From: Oliver Eikemeier <eikemeier@fillmore-labs.com> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/59194: proposal of two new port CATEGORIES: local and rookie Message-ID: <200311121240.hACCe6Ml098575@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/59194; it has been noted by GNATS. From: Oliver Eikemeier <eikemeier@fillmore-labs.com> To: Kris Kennaway <kris@obsecurity.org> Cc: FreeBSD-gnats-submit@freebsd.org, FreeBSD Ports Management Team <portmgr@freebsd.org> Subject: Re: ports/59194: proposal of two new port CATEGORIES: local and rookie Date: Wed, 12 Nov 2003 13:34:24 +0100 Kris Kennaway wrote: > On Wed, Nov 12, 2003 at 12:29:15AM +0100, Oliver Eikemeier wrote: > >>Two new categories are proposed: > [...] > > How about we just make /usr/ports/Makefile include Makefile.inc if > present, so people can define SUBDIR+=<whatever they want> for local > additions to the ports tree? Ok, how about that: --- categories.patch begins here --- diff -u -r1.50 bsd.port.subdir.mk --- Mk/bsd.port.subdir.mk 7 Nov 2003 08:51:46 -0000 1.50 +++ Mk/bsd.port.subdir.mk 12 Nov 2003 12:26:10 -0000 @@ -71,6 +71,10 @@ ECHO_MSG?= echo +.if exists(${CURDIR}/Makefile.local) +.include "${CURDIR}/Makefile.local" +.endif + TARGETS+= all TARGETS+= build TARGETS+= checksum diff -u -r1.473 bsd.port.mk --- Mk/bsd.port.mk 8 Nov 2003 03:22:08 -0000 1.473 +++ Mk/bsd.port.mk 12 Nov 2003 12:26:10 -0000 @@ -924,6 +924,11 @@ PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout .endif +# Customize bsd.port.mk for this category +.if exists(${.CURDIR}/../Makefile.category) +.include "${.CURDIR}/../Makefile.category" +.endif + MASTERDIR?= ${.CURDIR} # If they exist, include Makefile.inc, then architecture/operating --- categories.patch begins here --- What I like is that categories added in Makefile.category are *only* valid within this category, i.e. a ports Makefile with category `local' is not valid in the `net' category. I'm not especially happy with the name `Makefile.category', but I wanted to customize bsd.port.mk without setting USE_SUBMAKE. `Makefile.local' may be a better name than `Makefile.inc'. Perhaps `Makefile.subdir' is even better, because of the semantic differences of port and subdir Makefiles. Regards Oliver
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311121240.hACCe6Ml098575>