mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-12 03:00:28 +00:00
Add a check for options names.
They must be all uppercase, so that they do not conflict with flavors that are lowercase. Reviewed by: bapt Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D12810
This commit is contained in:
parent
123df59a89
commit
d45d670c33
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=453347
@ -4659,6 +4659,24 @@ ${_t}:
|
||||
|
||||
.if !target(pre-check-config)
|
||||
pre-check-config:
|
||||
_CHECK_OPTIONS_NAMES= OPTIONS_DEFINE
|
||||
_CHECK_OPTIONS_NAMES+= ${OPTIONS_GROUP:S/^/OPTIONS_GROUP_/}
|
||||
_CHECK_OPTIONS_NAMES+= ${OPTIONS_MULTI:S/^/OPTIONS_MULTI_/}
|
||||
_CHECK_OPTIONS_NAMES+= ${OPTIONS_RADIO:S/^/OPTIONS_RADIO_/}
|
||||
_CHECK_OPTIONS_NAMES+= ${OPTIONS_SINGLE:S/^/OPTIONS_SINGLE_/}
|
||||
.for var in ${_CHECK_OPTIONS_NAMES}
|
||||
. if defined(${var})
|
||||
. for o in ${${var}}
|
||||
. if ${o:C/[-_[:upper:][:digit:]]//g}
|
||||
OPTIONS_BAD_NAMES+= ${o}
|
||||
. endif
|
||||
. endfor
|
||||
. endif
|
||||
.endfor
|
||||
.if defined(OPTIONS_BAD_NAMES) && !empty(OPTIONS_BAD_NAMES)
|
||||
DEV_WARNING+= "These options name have characters outside of [-_A-Z0-9]:"
|
||||
DEV_WARNING+= "${OPTIONS_BAD_NAMES:O:u}"
|
||||
.endif
|
||||
.for single in ${OPTIONS_SINGLE}
|
||||
. for opt in ${OPTIONS_SINGLE_${single}}
|
||||
. if empty(ALL_OPTIONS:M${single}) || !empty(PORT_OPTIONS:M${single})
|
||||
|
Loading…
Reference in New Issue
Block a user