From owner-freebsd-ports@FreeBSD.ORG Sat Jul 21 20:18:35 2012 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22280106564A for ; Sat, 21 Jul 2012 20:18:35 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from p578be941.dip0.t-ipconnect.de (p578be941.dip0.t-ipconnect.de [87.139.233.65]) by mx1.freebsd.org (Postfix) with ESMTP id D29CF8FC14 for ; Sat, 21 Jul 2012 20:18:34 +0000 (UTC) Received: from [192.168.0.100] (cde1100.uni.vrs [192.168.0.100]) (Authenticated sender: ohauer) by p578be941.dip0.t-ipconnect.de (Postfix) with ESMTPSA id 6A1432088A for ; Sat, 21 Jul 2012 22:18:24 +0200 (CEST) Message-ID: <500B0E91.7040409@FreeBSD.org> Date: Sat, 21 Jul 2012 22:18:25 +0200 From: Olli Hauer User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: FreeBSD Ports X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Subject: options NG and slave/sub ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: FreeBSD Ports List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2012 20:18:35 -0000 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).