2
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
# This code is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 2 only, as
7
# published by the Free Software Foundation. Oracle designates this
8
# particular file as subject to the "Classpath" exception as provided
9
# by Oracle in the LICENSE file that accompanied this code.
11
# This code is distributed in the hope that it will be useful, but WITHOUT
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
# version 2 for more details (a copy is included in the LICENSE file that
15
# accompanied this code).
17
# You should have received a copy of the GNU General Public License version
18
# 2 along with this work; if not, write to the Free Software Foundation,
19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
# or visit www.oracle.com if you need additional information or have any
27
### Global targets for printing help etc.
30
# Helper macro to allow $(info) to properly print strings beginning with spaces.
35
$(info OpenJDK Makefile help)
36
$(info =====================)
38
$(info Common make targets)
39
$(info $(_) make [default] # Compile all modules and create a runnable "exploded")
40
$(info $(_) # image (alias for jdk or exploded-image))
41
$(info $(_) make all # Create all images: product, test, docs)
42
$(info $(_) # (alias for all-images))
43
$(info $(_) make images # Create a complete jdk image)
44
$(info $(_) # (alias for product-images))
45
$(info $(_) make <name>-image # Build just the image for any of: )
46
$(info $(_) # jdk, test, docs, symbols, legacy-jre, static-libs)
47
$(info $(_) make <phase> # Build the specified phase and everything it depends on)
48
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata))
49
$(info $(_) make *-only # Applies to most targets and disables building the)
50
$(info $(_) # dependencies for that target. This is faster but may)
51
$(info $(_) # result in incorrect build results!)
52
$(info $(_) make docs # Create all docs)
53
$(info $(_) make docs-jdk-api # Create just JDK javadocs)
54
$(info $(_) make bootcycle-images # Build images twice, second time with newly built JDK)
55
$(info $(_) make check # Run basic testing (currently tier1))
56
$(info $(_) make test-<test> # Run test, e.g. test-tier1)
57
$(info $(_) make test TEST=<t> # Run test(s) given by TEST specification)
58
$(info $(_) make exploded-test TEST=<t> # Run test(s) on the exploded image instead of)
59
$(info $(_) # the full jdk image)
61
$(info Targets for troubleshooting)
62
$(info $(_) make help # Give some help on using make)
63
$(info $(_) make doctor # Diagnose build environment problems)
64
$(info $(_) make reconfigure # Rerun configure with the same arguments as last time)
66
$(info Targets for cleaning)
67
$(info $(_) make clean # Remove all files generated by make, but not those)
68
$(info $(_) # generated by configure)
69
$(info $(_) make dist-clean # Remove all files, including configuration)
70
$(info $(_) make clean-<outputdir> # Remove the subdir in the output dir with the name)
71
$(info $(_) make clean-<phase> # Remove all build results related to a certain build)
72
$(info $(_) # phase (gensrc, java, libs, launchers))
73
$(info $(_) make clean-<module> # Remove all build results related to a certain module)
74
$(info $(_) make clean-<module>-<phase> # Remove all build results related to a certain)
75
$(info $(_) # module and phase)
77
$(info Targets for Hotspot)
78
$(info $(_) make hotspot # Build all of hotspot)
79
$(info $(_) make hotspot-<variant> # Build just the specified jvm variant)
80
$(info $(_) make hotspot-gensrc # Only build the gensrc part of hotspot)
81
$(info $(_) make hotspot-<variant>-<phase> # Build the specified phase for the variant)
83
$(info Targets for specific modules)
84
$(info $(_) make <module> # Build <module> and everything it depends on)
85
$(info $(_) make <module>-<phase> # Compile the specified phase for the specified module)
86
$(info $(_) # and everything it depends on)
87
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata))
89
$(info Make control variables)
90
$(info $(_) CONF=<selector> # Select which configuration(s) to build)
91
$(info $(_) CONF= # Select all configurations (note, assignment is empty))
92
$(info $(_) CONF_NAME=<string> # Select the configuration with the name <string>)
93
$(info $(_) SPEC=<spec file> # Build the configuration given by the spec file)
94
$(info $(_) LOG=<loglevel> # Change the log level from warn to <loglevel>)
95
$(info $(_) # Available log levels are:)
96
$(info $(_) # 'warn' (default), 'info', 'debug' and 'trace')
97
$(info $(_) # To see executed command lines, use LOG=debug)
98
$(info $(_) JOBS=<n> # Run <n> parallel make jobs)
99
$(info $(_) # Note that -jN does not work as expected!)
100
$(info $(_) TEST_JOBS=<n> # Run <n> parallel test jobs)
101
$(info $(_) CONF_CHECK=<method> # What to do if spec file is out of date)
102
$(info $(_) # method is 'auto', 'ignore' or 'fail' (default))
103
$(info $(_) TEST="test1 ..." # Use the given test descriptor(s) for testing, e.g.)
104
$(info $(_) # make test TEST="jdk_lang gtest:all")
105
$(info $(_) JTREG="OPT1=x;OPT2=y" # Control the JTREG test harness, use 'make test-only JTREG=help' to list)
106
$(info $(_) GTEST="OPT1=x;OPT2=y" # Control the GTEST test harness, use 'make test-only GTEST=help' to list)
107
$(info $(_) MICRO="OPT1=x;OPT2=y" # Control the MICRO test harness, use 'make test-only MICRO=help' to list)
108
$(info $(_) TEST_OPTS="OPT1=x;..." # Generic control of all test harnesses)
109
$(info $(_) TEST_VM_OPTS="ARG ..." # Same as setting TEST_OPTS to VM_OPTIONS="ARG ...")
111
$(if $(all_confs), $(info Available configurations in $(build_dir):) $(foreach var,$(all_confs),$(info * $(var))),\
112
$(info No configurations were found in $(build_dir).) $(info Run 'bash configure' to create a configuration.))
113
# We need a dummy rule otherwise make will complain
117
$(foreach var, $(all_confs), $(info $(var)))
118
# We need a dummy rule otherwise make will complain
123
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
124
test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
126
test-prebuilt-with-exit-code:
128
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
129
test-prebuilt-with-exit-code CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
131
# Alias for backwards compatibility
132
run-test-prebuilt: test-prebuilt
134
ALL_GLOBAL_TARGETS := help print-configurations test-prebuilt run-test-prebuilt
136
.PHONY: $(ALL_GLOBAL_TARGETS)