2015-03-26 15:17:30 +00:00
|
|
|
#
|
2023-11-28 15:32:21 +00:00
|
|
|
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
2015-03-26 15:17:30 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
|
|
# published by the Free Software Foundation. Oracle designates this
|
|
|
|
# particular file as subject to the "Classpath" exception as provided
|
|
|
|
# by Oracle in the LICENSE file that accompanied this code.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
|
|
|
#
|
|
|
|
|
|
|
|
###
|
|
|
|
### Global targets for printing help etc.
|
|
|
|
###
|
|
|
|
|
|
|
|
# Helper macro to allow $(info) to properly print strings beginning with spaces.
|
2024-09-03 15:31:09 +00:00
|
|
|
_ :=
|
2015-03-26 15:17:30 +00:00
|
|
|
|
|
|
|
help:
|
|
|
|
$(info )
|
|
|
|
$(info OpenJDK Makefile help)
|
|
|
|
$(info =====================)
|
|
|
|
$(info )
|
|
|
|
$(info Common make targets)
|
2017-11-14 11:10:28 +00:00
|
|
|
$(info $(_) make [default] # Compile all modules and create a runnable "exploded")
|
|
|
|
$(info $(_) # image (alias for jdk or exploded-image))
|
|
|
|
$(info $(_) make all # Create all images: product, test, docs)
|
|
|
|
$(info $(_) # (alias for all-images))
|
2018-06-06 20:16:12 +00:00
|
|
|
$(info $(_) make images # Create a complete jdk image)
|
2017-11-14 11:10:28 +00:00
|
|
|
$(info $(_) # (alias for product-images))
|
|
|
|
$(info $(_) make <name>-image # Build just the image for any of: )
|
2019-10-29 19:01:14 +00:00
|
|
|
$(info $(_) # jdk, test, docs, symbols, legacy-jre, static-libs)
|
2015-03-26 15:17:30 +00:00
|
|
|
$(info $(_) make <phase> # Build the specified phase and everything it depends on)
|
2020-03-19 19:34:34 +00:00
|
|
|
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata))
|
2017-11-14 11:10:28 +00:00
|
|
|
$(info $(_) make *-only # Applies to most targets and disables building the)
|
|
|
|
$(info $(_) # dependencies for that target. This is faster but may)
|
2015-03-26 15:17:30 +00:00
|
|
|
$(info $(_) # result in incorrect build results!)
|
|
|
|
$(info $(_) make docs # Create all docs)
|
2017-04-19 08:44:40 +00:00
|
|
|
$(info $(_) make docs-jdk-api # Create just JDK javadocs)
|
2015-03-26 15:17:30 +00:00
|
|
|
$(info $(_) make bootcycle-images # Build images twice, second time with newly built JDK)
|
2018-10-31 08:30:24 +00:00
|
|
|
$(info $(_) make check # Run basic testing (currently tier1))
|
|
|
|
$(info $(_) make test-<test> # Run test, e.g. test-tier1)
|
|
|
|
$(info $(_) make test TEST=<t> # Run test(s) given by TEST specification)
|
|
|
|
$(info $(_) make exploded-test TEST=<t> # Run test(s) on the exploded image instead of)
|
2017-05-29 12:06:24 +00:00
|
|
|
$(info $(_) # the full jdk image)
|
2015-03-26 15:17:30 +00:00
|
|
|
$(info )
|
2022-04-04 21:43:34 +00:00
|
|
|
$(info Targets for troubleshooting)
|
|
|
|
$(info $(_) make help # Give some help on using make)
|
|
|
|
$(info $(_) make doctor # Diagnose build environment problems)
|
|
|
|
$(info $(_) make reconfigure # Rerun configure with the same arguments as last time)
|
|
|
|
$(info )
|
2015-03-26 15:17:30 +00:00
|
|
|
$(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-<outputdir> # Remove the subdir in the output dir with the name)
|
|
|
|
$(info $(_) make clean-<phase> # Remove all build results related to a certain build)
|
|
|
|
$(info $(_) # phase (gensrc, java, libs, launchers))
|
|
|
|
$(info $(_) make clean-<module> # Remove all build results related to a certain module)
|
|
|
|
$(info $(_) make clean-<module>-<phase> # Remove all build results related to a certain)
|
|
|
|
$(info $(_) # module and phase)
|
|
|
|
$(info )
|
2016-11-24 14:27:33 +00:00
|
|
|
$(info Targets for Hotspot)
|
|
|
|
$(info $(_) make hotspot # Build all of hotspot)
|
|
|
|
$(info $(_) make hotspot-<variant> # Build just the specified jvm variant)
|
|
|
|
$(info $(_) make hotspot-gensrc # Only build the gensrc part of hotspot)
|
2017-11-14 11:10:28 +00:00
|
|
|
$(info $(_) make hotspot-<variant>-<phase> # Build the specified phase for the variant)
|
2016-11-24 14:27:33 +00:00
|
|
|
$(info )
|
2015-03-26 15:17:30 +00:00
|
|
|
$(info Targets for specific modules)
|
|
|
|
$(info $(_) make <module> # Build <module> and everything it depends on)
|
|
|
|
$(info $(_) make <module>-<phase> # Compile the specified phase for the specified module)
|
|
|
|
$(info $(_) # and everything it depends on)
|
2020-03-19 19:34:34 +00:00
|
|
|
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata))
|
2015-03-26 15:17:30 +00:00
|
|
|
$(info )
|
|
|
|
$(info Make control variables)
|
2024-02-13 09:51:33 +00:00
|
|
|
$(info $(_) CONF=<selector> # Select which configuration(s) to build)
|
|
|
|
$(info $(_) CONF= # Select all configurations (note, assignment is empty))
|
|
|
|
$(info $(_) CONF_NAME=<string> # Select the configuration with the name <string>)
|
2015-03-26 15:17:30 +00:00
|
|
|
$(info $(_) SPEC=<spec file> # Build the configuration given by the spec file)
|
|
|
|
$(info $(_) LOG=<loglevel> # Change the log level from warn to <loglevel>)
|
|
|
|
$(info $(_) # Available log levels are:)
|
|
|
|
$(info $(_) # 'warn' (default), 'info', 'debug' and 'trace')
|
|
|
|
$(info $(_) # To see executed command lines, use LOG=debug)
|
|
|
|
$(info $(_) JOBS=<n> # Run <n> parallel make jobs)
|
|
|
|
$(info $(_) # Note that -jN does not work as expected!)
|
2015-12-15 10:04:18 +00:00
|
|
|
$(info $(_) TEST_JOBS=<n> # Run <n> parallel test jobs)
|
2015-03-26 15:17:30 +00:00
|
|
|
$(info $(_) CONF_CHECK=<method> # What to do if spec file is out of date)
|
|
|
|
$(info $(_) # method is 'auto', 'ignore' or 'fail' (default))
|
2018-10-31 08:30:24 +00:00
|
|
|
$(info $(_) TEST="test1 ..." # Use the given test descriptor(s) for testing, e.g.)
|
|
|
|
$(info $(_) # make test TEST="jdk_lang gtest:all")
|
2024-11-14 22:01:17 +00:00
|
|
|
$(info $(_) TEST_DEPS="dependency1 ..." # Specify additional dependencies for running tests, e.g docs-jdk)
|
2024-03-05 16:24:54 +00:00
|
|
|
$(info $(_) JTREG="OPT1=x;OPT2=y" # Control the JTREG test harness, use 'make test-only JTREG=help' to list)
|
|
|
|
$(info $(_) GTEST="OPT1=x;OPT2=y" # Control the GTEST test harness, use 'make test-only GTEST=help' to list)
|
|
|
|
$(info $(_) MICRO="OPT1=x;OPT2=y" # Control the MICRO test harness, use 'make test-only MICRO=help' to list)
|
2018-10-31 08:30:24 +00:00
|
|
|
$(info $(_) TEST_OPTS="OPT1=x;..." # Generic control of all test harnesses)
|
|
|
|
$(info $(_) TEST_VM_OPTS="ARG ..." # Same as setting TEST_OPTS to VM_OPTIONS="ARG ...")
|
2015-03-26 15:17:30 +00:00
|
|
|
$(info )
|
2024-09-03 15:31:09 +00:00
|
|
|
$(if $(all_confs), $(info Available configurations in $(build_dir):) $(foreach var,$(all_confs),$(info * $(var))), \
|
2015-04-07 07:06:24 +00:00
|
|
|
$(info No configurations were found in $(build_dir).) $(info Run 'bash configure' to create a configuration.))
|
2015-03-26 15:17:30 +00:00
|
|
|
# We need a dummy rule otherwise make will complain
|
|
|
|
@true
|
|
|
|
|
|
|
|
print-configurations:
|
|
|
|
$(foreach var, $(all_confs), $(info $(var)))
|
|
|
|
# We need a dummy rule otherwise make will complain
|
|
|
|
@true
|
|
|
|
|
2020-02-17 07:59:26 +00:00
|
|
|
test-prebuilt:
|
2017-12-06 12:45:46 +00:00
|
|
|
@( cd $(topdir) && \
|
|
|
|
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
|
2020-02-17 07:59:26 +00:00
|
|
|
test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
|
2017-12-06 12:45:46 +00:00
|
|
|
|
2023-06-05 15:35:42 +00:00
|
|
|
test-prebuilt-with-exit-code:
|
|
|
|
@( cd $(topdir) && \
|
|
|
|
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
|
|
|
|
test-prebuilt-with-exit-code CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
|
|
|
|
|
2020-02-17 07:59:26 +00:00
|
|
|
# Alias for backwards compatibility
|
|
|
|
run-test-prebuilt: test-prebuilt
|
|
|
|
|
|
|
|
ALL_GLOBAL_TARGETS := help print-configurations test-prebuilt run-test-prebuilt
|
2015-03-26 15:17:30 +00:00
|
|
|
|
|
|
|
.PHONY: $(ALL_GLOBAL_TARGETS)
|