Date: Thu, 26 Feb 2004 12:17:41 +0900 From: horio shoichi <bugsgrief@bugsgrief.net> To: Mark Linimon <linimon@lonesome.com> Cc: ports@FreeBSD.org Subject: Re: how to determine whether a port is a slave port? Message-ID: <20040226.031742.115e504b7318efa4.10.0.3.9@bugsgrief.net> In-Reply-To: <Pine.LNX.4.44.0402240012310.27707-100000@pancho> References: <Pine.LNX.4.44.0402240012310.27707-100000@pancho>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 24 Feb 2004 00:25:47 -0600 (CST) Mark Linimon <linimon@lonesome.com> wrote: > One of the things that I would like to have available for the > database in my ports monitoring code is an indication of whether > or not a port is a slave port. The Porter's Handbook recommends > that the MASTERDIR makevar be used to establish that, but does > not make it clear whether its use is mandatory or not. However, > there are over 300 ports that do not seem to use this convention. > Most seem to use the "${.CURDIR}/.." convention, although a few > seem to use PORTSDIR directly. > > So, without wanting to start a bikeshed, are these just remnants > of a time before MASTERDIR was introduced? Is there a consensus > on how slave ports ought to be handled? > > mcl > > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" > A clip from my collection. Further clip your necessary part from here. # switch to masterdir # return 0 iff there is (distinct) masterdir and have switched to it switchtomasterdir() { local - [ -r Makefile ] || return 1 set -- $(make -V MASTERDIR -V .CURDIR) [ $# -ne 2 ] && return 1 set -- $(csh -fc "cd $1 ; echo \$cwd") $(csh -fc "cd $2 ; echo \$cwd") [ $1 != $2 ] && { echo "-- MASTERDIR = $1 --" cd $1 } } HTH, horio shocihi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040226.031742.115e504b7318efa4.10.0.3.9>