diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2013-06-06 13:58:19 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2013-06-06 13:58:19 +0000 |
commit | 65792bf65b0fad9378331f434988b02b7c108a68 (patch) | |
tree | 5c7b4bbb4c3cac0c4f7202658071bd519bdb5848 /Mk/bsd.options.mk | |
parent | 35a9197d3f1bc2b9e369bebc8b94bc15f72932cb (diff) | |
download | ports-65792bf65b0fad9378331f434988b02b7c108a68.tar.gz ports-65792bf65b0fad9378331f434988b02b7c108a68.zip |
Readd the OPTIONS parser given that apparently someports still haven't been converted, and passed throught the grep that was supposed to find them all
Reported by: Vincent Hoffman <vince@unsane.co.uk>
Notes
Notes:
svn path=/head/; revision=320098
Diffstat (limited to 'Mk/bsd.options.mk')
-rw-r--r-- | Mk/bsd.options.mk | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk index 523b30f487ee..34fd0845e99d 100644 --- a/Mk/bsd.options.mk +++ b/Mk/bsd.options.mk @@ -94,6 +94,45 @@ ALL_OPTIONS+= ${opt} .endfor ALL_OPTIONS:= ${ALL_OPTIONS:O:u} + +#XXX to kill when old option framework won't be used anymore +.if defined(OPTIONS) +NO_OPTIONS_SORT= yes +. undef optname +. for O in ${OPTIONS:S|\#|\\\#|g} +opt:= ${O} +. if !defined(optname) +optname:= ${O} +ALL_OPTIONS+= ${O} +.if !defined(OPTIONS_DEFINE) || empty(OPTIONS_DEFINE:M${O}) +OPTIONS_DEFINE+= ${O} +.endif +PORT_OPTIONS+= ${O} +. elif !defined(optdesc) +optdesc:= ${opt} +${optname}_DESC:= ${opt:S|"||g} +. else +. if ${opt:L} == off +. if defined(PORT_OPTIONS) && defined(optname) +NO_OPTIONS+= ${optname} +NO_OPTIONS:= ${NO_OPTIONS:O:u} +. else +. endif +. endif +. undef optname +. undef optdesc +. endif +. endfor +. if defined(NO_OPTIONS) +. for O in ${NO_OPTIONS} +PORT_OPTIONS:= ${PORT_OPTIONS:N${O}} +. endfor +. endif +#. undef NO_OPTIONS +.endif +#XXX end of compatibility + +ALL_OPTIONS:= ${ALL_OPTIONS:O:u} OPTIONS_DEFAULT:= ${OPTIONS_DEFAULT:O:u} # Remove global options the port maintainer doesn't want |