@@ -48,12 +48,15 @@ ifeq ($(HAS_SPEC), )
4848 # from the command-line.
4949 ##############################################################################
5050
51- # Make control variables, handled by Init.gmk
52- INIT_CONTROL_VARIABLES + = LOG CONF CONF_NAME SPEC JOBS TEST_JOBS CONF_CHECK \
53- COMPARE_BUILD JTREG GTEST MICRO TEST_OPTS TEST_VM_OPTS TEST_DEPS
51+ # Essential control variables that are handled by Init.gmk
52+ INIT_CONTROL_VARIABLES : = LOG CONF CONF_NAME SPEC JOBS CONF_CHECK ALLOW \
53+ COMPARE_BUILD
5454
55- # All known make control variables
56- MAKE_CONTROL_VARIABLES := $(INIT_CONTROL_VARIABLES) TEST JDK_FILTER SPEC_FILTER
55+ # All known make control variables; these are handled in other makefiles
56+ MAKE_CONTROL_VARIABLES += JDK_FILTER SPEC_FILTER \
57+ TEST TEST_JOBS JTREG GTEST MICRO TEST_OPTS TEST_VM_OPTS TEST_DEPS
58+
59+ ALL_CONTROL_VARIABLES := $(INIT_CONTROL_VARIABLES) $(MAKE_CONTROL_VARIABLES)
5760
5861 # Define a simple reverse function.
5962 # Should maybe move to MakeBase.gmk, but we can't include that file now.
@@ -87,8 +90,10 @@ ifeq ($(HAS_SPEC), )
8790 command_line_variables := $$(strip $$(foreach var, \
8891 $$(subst \ ,_,$$(MAKEOVERRIDES)), \
8992 $$(firstword $$(subst =, , $$(var)))))
93+ allowed_command_line_variables := $$(strip $$(subst $$(COMMA), , $$(ALLOW)))
9094 unknown_command_line_variables := $$(strip \
91- $$(filter-out $$(MAKE_CONTROL_VARIABLES), $$(command_line_variables)))
95+ $$(filter-out $$(ALL_CONTROL_VARIABLES) $$(allowed_command_line_variables), \
96+ $$(command_line_variables)))
9297 ifneq ($$(unknown_command_line_variables), )
9398 $$(info Note: Command line contains non-control variables:)
9499 $$(foreach var, $$(unknown_command_line_variables), $$(info * $$(var)=$$($$(var))))
0 commit comments