Index: Mk/bsd.options.mk =================================================================== --- Mk/bsd.options.mk +++ Mk/bsd.options.mk @@ -263,7 +263,11 @@ # Remove options the port maintainer doesn't want, part 2 .for opt in ${_ALL_EXCLUDE:O:u} +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} +. else +DEV_WARNING+= "One of OPTIONS_EXCLUDE* contains ${opt} but it is not a valid option for this port" +. endif .endfor ## Now create the list of activated options @@ -297,13 +301,19 @@ . if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} +. else +WARNING+= "${OPTIONS_NAME}_SET contains ${opt} but it is not a valid option for this port" . endif . endfor ## Unset the options excluded per-port (set by user in make.conf) . for opt in ${${OPTIONS_NAME}_UNSET} +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} +. else +WARNING+= "${OPTIONS_NAME}_UNSET contains ${opt} but it is not a valid option for this port" +. endif . endfor ## options files (from dialog) @@ -325,12 +335,18 @@ . if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} +. else +WARNING+= "The options file contains ${opt} but it is not a valid option for this port, maybe re-run make config" . endif . endfor .for opt in ${OPTIONS_FILE_UNSET} +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} +. else +WARNING+= "The options file contains ${opt} but it is not a valid option for this port, maybe re-run make config" +. endif .endfor .endif @@ -355,13 +371,19 @@ . if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} +. else +WARNING+= "${OPTIONS_NAME}_FORCE_SET contains ${opt} but it is not a valid option for this port" . endif . endfor ## Unset the options excluded per-port (set by user in make.conf) . for opt in ${${OPTIONS_NAME}_UNSET_FORCE} +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} +. else +WARNING+= "${OPTIONS_NAME}_FORCE_UNSET contains ${opt} but it is not a valid option for this port" +. endif . endfor @@ -414,7 +436,13 @@ .endfor # Finally, add options required by slave ports -PORT_OPTIONS+= ${OPTIONS_SLAVE} +.for opt in ${OPTIONS_SLAVE} +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) +PORT_OPTIONS+= ${opt} +. else +DEV_WARNING+= "OPTIONS_SLAVE contains ${opt} but it is not a valid option for this port" +. endif +.endfor # Sort options and eliminate duplicates PORT_OPTIONS:= ${PORT_OPTIONS:O:u} @@ -506,6 +534,17 @@ . for configure in CONFIGURE CMAKE MESON QMAKE . if defined(${opt}_${configure}_ON) ${configure}_ARGS+= ${${opt}_${configure}_ON} +. if !defined(${opt}_${configure}_OFF) +. if ${configure:MCONFIGURE} +DEV_WARNING+= "You have ${opt}_${configure}_ON defined but ${opt}_${configure}_OFF is not, make sure the feature cannot be auto-activated, or maybe use ${opt}_${configure}_WITH or ${opt}_${configure}_ENABLE" +. elsif ${configure:MCMAKE} +DEV_WARNING+= "You have ${opt}_${configure}_ON defined but ${opt}_${configure}_OFF is not, make sure the feature cannot be auto-activated, or maybe use ${opt}_${configure}_BOOL or ${opt}_${configure}_BOOL_OFF" +. elsif ${configure:MMESON} +DEV_WARNING+= "You have ${opt}_${configure}_ON defined but ${opt}_${configure}_OFF is not, make sure the feature cannot be auto-activated, or maybe use ${opt}_${configure}_TRUE/FALSE/YES/NO" +. else +DEV_WARNING+= "You have ${opt}_${configure}_ON defined but ${opt}_${configure}_OFF is not, make sure the feature cannot be auto-activated" +. endif +. endif . endif . endfor . for flags in ${_OPTIONS_FLAGS} @@ -568,6 +607,17 @@ . for configure in CONFIGURE CMAKE MESON QMAKE . if defined(${opt}_${configure}_OFF) ${configure}_ARGS+= ${${opt}_${configure}_OFF} +. if !defined(${opt}_${configure}_ON) +. if ${configure:MCONFIGURE} +DEV_WARNING+= "You have ${opt}_${configure}_OFF defined but ${opt}_${configure}_ON is not, make sure the feature cannot be auto-activated, or maybe use ${opt}_${configure}_WITH or ${opt}_${configure}_ENABLE" +. elsif ${configure:MCMAKE} +DEV_WARNING+= "You have ${opt}_${configure}_OFF defined but ${opt}_${configure}_ON is not, make sure the feature cannot be auto-activated, or maybe use ${opt}_${configure}_BOOL or ${opt}_${configure}_BOOL_OFF" +. elsif ${configure:MMESON} +DEV_WARNING+= "You have ${opt}_${configure}_OFF defined but ${opt}_${configure}_ON is not, make sure the feature cannot be auto-activated, or maybe use ${opt}_${configure}_TRUE/FALSE/YES/NO" +. else +DEV_WARNING+= "You have ${opt}_${configure}_OFF defined but ${opt}_${configure}_ON is not, make sure the feature cannot be auto-activated" +. endif +. endif . endif . endfor . for flags in ${_OPTIONS_FLAGS}