options NG and slave/sub ports

Olli Hauer ohauer at FreeBSD.org
Sat Jul 21 20:18:35 UTC 2012


Scratching my head how to do this with options NG.

Given one port and x sub ports.

The main port defines:

OPTIONS_DEFINE+=        OPT1 OPT2
OPTIONS_SINGLE=         TEST
OPTIONS_SINGLE_TEST=    MAIN SUB1 SUB2 SUB3 SUB4 ...
OPTIONS_DEFAULT+=       MAIN


Slave1 has to overwrite MAIN and SUBx option and set SUB1.

MASTERDIR=	${.CURDIR}/../test
OPTIONS_UNSET+=		MAIN SUB2 SUB3 SUB4 ...
OPTIONS_SET+=		SUB1
OPTIONS_DEFAULT+=	SUB1
.include "${MASTERDIR}/Makefile"


Slave2 has to overwrite MAIN +SUBx options and set SUB2

MASTERDIR=	${.CURDIR}/../test
OPTIONS_UNSET+=		MAIN SUB1 SUB3 SUB4 ...
OPTIONS_SET+=		SUB2
OPTIONS_DEFAULT+=	SUB2
.include "${MASTERDIR}/Makefile"


This is working until someone executes "make config".
The challenge is to use OPTIONS_SINGLE and also allow in the master port
all possible SUBx options so we can remove "Nr. of subport+1" checks
but overwrite the options from the subport (even after make config).




More information about the freebsd-ports mailing list