What is the right way to make OPTIONS_DEFAULT depend on

Matthew Seaman matthew at FreeBSD.org
Sun Sep 3 14:52:14 UTC 2017


On 03/09/2017 05:57, Yuri wrote:
> This doesn't work:
> 
>> .include <bsd.port.options.mk>
>>
>> .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100000
>> OPTIONS_DEFAULT+= MYOPT
>> .endif
> MYOPT isn't picked up
> 
> 
> I tried with a regular expressions, witout .include:
>> SYSVERSION=    ${OPSYS}${OSVERSION}
>> OPTIONS_DEFAULT=HELP
>> ${SYSVERSION:C/^FreeBSD1[1-9][0-9]{5}$/MYOPT/:MMYOPT}
> MYOPT isn't picked up again.
> 

If you're referring to $OPSYS or $OSVERSION then you'll want to
put that section of code after

.include <bsd.port.pre.mk>

and obviously change the last line in your Makefile to

.include <bsd.port.post.mk>

	Cheers,

	Matthew


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20170903/360b6643/attachment.sig>


More information about the freebsd-ports mailing list