how to determine whether a port is a slave port?

Oliver Eikemeier eikemeier at
Tue Feb 24 07:59:09 PST 2004

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 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


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
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.


More information about the freebsd-ports mailing list