31 # affected, however. This is required for correct dependency management. |
31 # affected, however. This is required for correct dependency management. |
32 .NOTPARALLEL: |
32 .NOTPARALLEL: |
33 |
33 |
34 # The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make. |
34 # The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make. |
35 # /usr/ccs/bin/make lacks basically every other flow control mechanism. |
35 # /usr/ccs/bin/make lacks basically every other flow control mechanism. |
36 TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1 |
36 .TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1 |
37 |
37 |
38 # Assume we have GNU make, but check version. |
38 # Assume we have GNU make, but check version. |
39 ifeq ($(strip $(foreach v, 3.81% 3.82% 4.%, $(filter $v, $(MAKE_VERSION)))), ) |
39 ifeq ($(strip $(foreach v, 3.81% 3.82% 4.%, $(filter $v, $(MAKE_VERSION)))), ) |
40 $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.) |
40 $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.) |
41 endif |
41 endif |
44 ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),) |
44 ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),) |
45 makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST)) |
45 makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST)) |
46 else |
46 else |
47 makefile_path:=$(lastword $(MAKEFILE_LIST)) |
47 makefile_path:=$(lastword $(MAKEFILE_LIST)) |
48 endif |
48 endif |
49 root_dir:=$(dir $(makefile_path)) |
49 root_dir:=$(patsubst %/,%,$(dir $(makefile_path))) |
|
50 |
|
51 ifneq ($(findstring qp,$(MAKEFLAGS)),) |
|
52 # When called with -qp, assume an external part (e.g. bash completion) is trying |
|
53 # to understand our targets. |
|
54 # Duplication of global targets, needed before ParseConfAndSpec in case we have |
|
55 # no configurations. |
|
56 help: |
|
57 # If CONF is not set, look for all available configurations |
|
58 CONF?= |
|
59 endif |
50 |
60 |
51 # ... and then we can include our helper functions |
61 # ... and then we can include our helper functions |
52 include $(root_dir)/make/MakeHelpers.gmk |
62 include $(root_dir)/make/MakeHelpers.gmk |
53 |
63 |
54 $(eval $(call ParseLogLevel)) |
64 $(eval $(call ParseLogLevel)) |
141 $(info ) |
152 $(info ) |
142 $(info Common make targets) |
153 $(info Common make targets) |
143 $(info . make [default] # Compile all modules in langtools, hotspot, jaxp, jaxws,) |
154 $(info . make [default] # Compile all modules in langtools, hotspot, jaxp, jaxws,) |
144 $(info . # corba and jdk and create a runnable "exploded" image) |
155 $(info . # corba and jdk and create a runnable "exploded" image) |
145 $(info . make all # Compile everything, all repos, docs and images) |
156 $(info . make all # Compile everything, all repos, docs and images) |
146 $(info . make images # Create complete j2sdk and j2re images) |
157 $(info . make images # Create complete jdk and jre images) |
|
158 $(info . make <phase> # Compile the specified phase and everything it depends on) |
|
159 $(info . # (gensrc, java, copy, libs, launchers, gendata, rmic)) |
|
160 $(info . make *-only # Applies to most targets and disables compling the) |
|
161 $(info . # dependencies for the target. This is faster but may) |
|
162 $(info . # result in incorrect build results!) |
147 $(info . make docs # Create all docs) |
163 $(info . make docs # Create all docs) |
148 $(info . make docs-javadoc # Create just javadocs, depends on less than full docs) |
164 $(info . make docs-javadoc # Create just javadocs, depends on less than full docs) |
149 $(info . make profiles # Create complete j2re compact profile images) |
165 $(info . make profiles # Create complete jre compact profile images) |
150 $(info . make bootcycle-images # Build images twice, second time with newly built JDK) |
166 $(info . make bootcycle-images # Build images twice, second time with newly built JDK) |
151 $(info . make install # Install the generated images locally) |
167 $(info . make install # Install the generated images locally) |
152 $(info . make reconfigure # Rerun configure with the same arguments as last time) |
168 $(info . make reconfigure # Rerun configure with the same arguments as last time) |
|
169 $(info . make help # Give some help on using make) |
|
170 $(info . make test # Run tests, default is all tests (see TEST below)) |
|
171 $(info ) |
|
172 $(info Targets for cleaning) |
153 $(info . make clean # Remove all files generated by make, but not those) |
173 $(info . make clean # Remove all files generated by make, but not those) |
154 $(info . # generated by configure) |
174 $(info . # generated by configure) |
155 $(info . make dist-clean # Remove all files, including configuration) |
175 $(info . make dist-clean # Remove all files, including configuration) |
156 $(info . make help # Give some help on using make) |
176 $(info . make clean-<outputdir> # Remove the subdir in the output dir with the name) |
157 $(info . make test # Run tests, default is all tests (see TEST below)) |
177 $(info . make clean-<phase> # Remove all build results related to a certain build) |
|
178 $(info . # phase (gensrc, java, libs, launchers)) |
|
179 $(info . make clean-<module> # Remove all build results related to a certain module) |
|
180 $(info . make clean-<module>-<phase> # Remove all build results related to a certain) |
|
181 $(info . # module and phase) |
158 $(info ) |
182 $(info ) |
159 $(info Targets for specific modules) |
183 $(info Targets for specific modules) |
160 $(info . make <module> # Build <module> and everything it depends on. ) |
184 $(info . make <module> # Build <module> and everything it depends on. ) |
161 $(info . make <module>-only # Build <module> only, without dependencies. This) |
185 $(info . make <module>-<phase> # Compile the specified phase for the specified module) |
162 $(info . # is faster but can result in incorrect build results!) |
186 $(info . # and everything it depends on) |
163 $(info . make <module>-java # Compile java classes for <module> and everything it) |
187 $(info . # (gensrc, java, copy, libs, launchers, gendata, rmic)) |
164 $(info . # depends on) |
|
165 $(info . make <module>-libs # Build native libraries for <module> and everything it) |
|
166 $(info . # depends on) |
|
167 $(info . make <module>-launchers# Build native executables for <module> and everything it) |
|
168 $(info . # depends on) |
|
169 $(info . make <module>-gensrc # Execute the gensrc step for <module> and everything it) |
|
170 $(info . # depends on) |
|
171 $(info ) |
188 $(info ) |
172 $(info Useful make variables) |
189 $(info Useful make variables) |
173 $(info . make CONF= # Build all configurations (note, assignment is empty)) |
190 $(info . make CONF= # Build all configurations (note, assignment is empty)) |
174 $(info . make CONF=<substring> # Build the configuration(s) with a name matching) |
191 $(info . make CONF=<substring> # Build the configuration(s) with a name matching) |
175 $(info . # <substring>) |
192 $(info . # <substring>) |