Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jul 2012 22:18:25 +0200
From:      Olli Hauer <ohauer@FreeBSD.org>
To:        FreeBSD Ports <ports@FreeBSD.org>
Subject:   options NG and slave/sub ports
Message-ID:  <500B0E91.7040409@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
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).





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?500B0E91.7040409>