@@ -48,12 +48,15 @@ ifeq ($(HAS_SPEC), )
48
48
# from the command-line.
49
49
##############################################################################
50
50
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
54
54
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)
57
60
58
61
# Define a simple reverse function.
59
62
# Should maybe move to MakeBase.gmk, but we can't include that file now.
@@ -87,8 +90,10 @@ ifeq ($(HAS_SPEC), )
87
90
command_line_variables := $$(strip $$(foreach var, \
88
91
$$(subst \ ,_,$$(MAKEOVERRIDES)), \
89
92
$$(firstword $$(subst =, , $$(var)))))
93
+ allowed_command_line_variables := $$(strip $$(subst $$(COMMA), , $$(ALLOW)))
90
94
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)))
92
97
ifneq ($$(unknown_command_line_variables), )
93
98
$$(info Note: Command line contains non-control variables:)
94
99
$$(foreach var, $$(unknown_command_line_variables), $$(info * $$(var)=$$($$(var))))
0 commit comments