diff -r 5acc0ec03d06 -r 0c09b47449c8 Makefile --- a/Makefile Thu Jan 15 16:36:24 2015 +0100 +++ b/Makefile Fri Jan 16 16:02:09 2015 +0100 @@ -48,6 +48,17 @@ endif root_dir:=$(patsubst %/,%,$(dir $(makefile_path))) +ifeq ($(MAIN_TARGETS), ) + COMMAND_LINE_VARIABLES:=$(subst =command,,$(filter %=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))) + MAKE_CONTROL_VARIABLES:=LOG CONF SPEC JOBS TEST IGNORE_OLD_CONFIG + UNKNOWN_COMMAND_LINE_VARIABLES:=$(strip $(filter-out $(MAKE_CONTROL_VARIABLES), $(COMMAND_LINE_VARIABLES))) + ifneq ($(UNKNOWN_COMMAND_LINE_VARIABLES), ) + $(info Note: Command line contains non-control variables: $(UNKNOWN_COMMAND_LINE_VARIABLES).) + $(info Make sure it is not mistyped, and that you intend to override this variable.) + $(info 'make help' will list known control variables) + endif +endif + ifneq ($(findstring qp,$(MAKEFLAGS)),) # When called with -qp, assume an external part (e.g. bash completion) is trying # to understand our targets. @@ -148,62 +159,64 @@ # Here are "global" targets, i.e. targets that can be executed without specifying a single configuration. # If you add more global targets, please update the variable global_targets in MakeHelpers. +# Helper macro to allow $(info) to properly print strings beginning with spaces. +_:= + help: $(info ) $(info OpenJDK Makefile help) $(info =====================) $(info ) $(info Common make targets) - $(info . make [default] # Compile all modules in langtools, hotspot, jaxp, jaxws,) - $(info . # corba and jdk and create a runnable "exploded" image) - $(info . make all # Compile everything, all repos, docs and images) - $(info . make images # Create complete jdk and jre images) - $(info . make # Compile the specified phase and everything it depends on) - $(info . # (gensrc, java, copy, libs, launchers, gendata, rmic)) - $(info . make *-only # Applies to most targets and disables compling the) - $(info . # dependencies for the target. This is faster but may) - $(info . # result in incorrect build results!) - $(info . make docs # Create all docs) - $(info . make docs-javadoc # Create just javadocs, depends on less than full docs) - $(info . make profiles # Create complete jre compact profile images) - $(info . make bootcycle-images # Build images twice, second time with newly built JDK) - $(info . make install # Install the generated images locally) - $(info . make reconfigure # Rerun configure with the same arguments as last time) - $(info . make help # Give some help on using make) - $(info . make test # Run tests, default is all tests (see TEST below)) + $(info $(_) make [default] # Compile all modules in langtools, hotspot, jdk, jaxws,) + $(info $(_) # jaxp and corba, and create a runnable "exploded" image) + $(info $(_) make all # Compile everything, all repos, docs and images) + $(info $(_) make images # Create complete j2sdk and j2re images) + $(info $(_) make # Build the specified phase and everything it depends on) + $(info $(_) # (gensrc, java, copy, libs, launchers, gendata, rmic)) + $(info $(_) make *-only # Applies to most targets and disables compling the) + $(info $(_) # dependencies for the target. This is faster but may) + $(info $(_) # result in incorrect build results!) + $(info $(_) make docs # Create all docs) + $(info $(_) make docs-javadoc # Create just javadocs, depends on less than full docs) + $(info $(_) make profiles # Create complete j2re compact profile images) + $(info $(_) make bootcycle-images # Build images twice, second time with newly built JDK) + $(info $(_) make install # Install the generated images locally) + $(info $(_) make reconfigure # Rerun configure with the same arguments as last time) + $(info $(_) make help # Give some help on using make) + $(info $(_) make test # Run tests, default is all tests (see TEST below)) $(info ) $(info Targets for cleaning) - $(info . make clean # Remove all files generated by make, but not those) - $(info . # generated by configure) - $(info . make dist-clean # Remove all files, including configuration) - $(info . make clean- # Remove the subdir in the output dir with the name) - $(info . make clean- # Remove all build results related to a certain build) - $(info . # phase (gensrc, java, libs, launchers)) - $(info . make clean- # Remove all build results related to a certain module) - $(info . make clean-- # Remove all build results related to a certain) - $(info . # module and phase) + $(info $(_) make clean # Remove all files generated by make, but not those) + $(info $(_) # generated by configure) + $(info $(_) make dist-clean # Remove all files, including configuration) + $(info $(_) make clean- # Remove the subdir in the output dir with the name) + $(info $(_) make clean- # Remove all build results related to a certain build) + $(info $(_) # phase (gensrc, java, libs, launchers)) + $(info $(_) make clean- # Remove all build results related to a certain module) + $(info $(_) make clean-- # Remove all build results related to a certain) + $(info $(_) # module and phase) $(info ) $(info Targets for specific modules) - $(info . make # Build and everything it depends on. ) - $(info . make - # Compile the specified phase for the specified module) - $(info . # and everything it depends on) - $(info . # (gensrc, java, copy, libs, launchers, gendata, rmic)) - $(info ) - $(info Useful make variables) - $(info . make CONF= # Build all configurations (note, assignment is empty)) - $(info . make CONF= # Build the configuration(s) with a name matching) - $(info . # ) + $(info $(_) make # Build and everything it depends on.) + $(info $(_) make - # Compile the specified phase for the specified module) + $(info $(_) # and everything it depends on) + $(info $(_) # (gensrc, java, copy, libs, launchers, gendata, rmic)) $(info ) - $(info . make LOG= # Change the log level from warn to ) - $(info . # Available log levels are:) - $(info . # 'warn' (default), 'info', 'debug' and 'trace') - $(info . # To see executed command lines, use LOG=debug) - $(info ) - $(info . make JOBS= # Run parallel make jobs) - $(info . # Note that -jN does not work as expected!) - $(info ) - $(info . make test TEST= # Only run the given test or tests, e.g.) - $(info . # make test TEST="jdk_lang jdk_net") + $(info Make control variables) + $(info $(_) CONF= # Build all configurations (note, assignment is empty)) + $(info $(_) CONF= # Build the configuration(s) with a name matching) + $(info $(_) # ) + $(info $(_) SPEC= # Build the configuration given by the spec file) + $(info $(_) LOG= # Change the log level from warn to ) + $(info $(_) # Available log levels are:) + $(info $(_) # 'warn' (default), 'info', 'debug' and 'trace') + $(info $(_) # To see executed command lines, use LOG=debug) + $(info $(_) JOBS= # Run parallel make jobs) + $(info $(_) # Note that -jN does not work as expected!) + $(info $(_) IGNORE_OLD_CONFIG=true # Skip tests if spec file is up to date) + $(info $(_) make test TEST= # Only run the given test or tests, e.g.) + $(info $(_) # make test TEST="jdk_lang jdk_net") $(info ) .PHONY: help