Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Feb 2004 16:58:43 +0100
From:      Oliver Eikemeier <eikemeier@fillmore-labs.com>
To:        Will Andrews <will@csociety.org>
Cc:        Mark Linimon <linimon@lonesome.com>
Subject:   Re: how to determine whether a port is a slave port?
Message-ID:  <403B74B3.7060403@fillmore-labs.com>
In-Reply-To: <20040224153053.GR7466@sirius.firepipe.net>
References:  <Pine.LNX.4.44.0402240012310.27707-100000@pancho> <403B2336.1030607@fillmore-labs.com> <20040224153053.GR7466@sirius.firepipe.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Will Andrews wrote:

> On Tue, Feb 24, 2004 at 11:11:02AM +0100, Oliver Eikemeier wrote:
> 
>>Since FreshPorts is having problems with that too, I suggest that
>>a port is a slave port if and only if MASTERDIR is set, and to let
>>us fix the other ports. That would make it easier for portlint too.
> 
> All ports have MASTERDIR set in bsd.port.mk by default.
> 
> Perhaps you mean: It's a slave when ${MASTERDIR} != ${.CURDIR}.

Basically. I meant if and only if the *port* sets MASTERDIR, which
makes statements like

MASTERDIR=	${.CURDIR}

a bug, since it would be a slave of itself. Generally I like to see that
ports either not set MASTERDIR (besides the default in bsd.port.pre.mk)
and end with

  .include <bsd.port[.post].mk>

or they set MASTERDIR (in their Makefile) and end with

  .include "${MASTERDIR}/Makefile"

nothing else. I know the difference is subtle, but that would make it
far easier for automated tools, I could even use grep to find all
master/slave ports, without doing a make -VMASTERDIR.

Regards
   Oliver



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?403B74B3.7060403>