author | ihse |
Thu, 26 Mar 2015 16:17:30 +0100 | |
changeset 29662 | 78c47f0002c3 |
parent 28902 | Makefile@0c09b47449c8 |
child 29788 | b581a3d9db41 |
permissions | -rw-r--r-- |
0 | 1 |
# |
29662 | 2 |
# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. |
0 | 3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
# |
|
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 |
|
5499 | 7 |
# published by the Free Software Foundation. Oracle designates this |
0 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5499 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
0 | 10 |
# |
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). |
|
16 |
# |
|
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. |
|
20 |
# |
|
5499 | 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 |
|
23 |
# questions. |
|
0 | 24 |
# |
25 |
||
29662 | 26 |
### |
27 |
### Global targets for printing help etc. |
|
28 |
### |
|
0 | 29 |
|
28902
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
30 |
# Helper macro to allow $(info) to properly print strings beginning with spaces. |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
31 |
_:= |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
32 |
|
21759 | 33 |
help: |
34 |
$(info ) |
|
35 |
$(info OpenJDK Makefile help) |
|
36 |
$(info =====================) |
|
37 |
$(info ) |
|
38 |
$(info Common make targets) |
|
28902
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
39 |
$(info $(_) make [default] # Compile all modules in langtools, hotspot, jdk, jaxws,) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
40 |
$(info $(_) # jaxp and corba, and create a runnable "exploded" image) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
41 |
$(info $(_) make all # Compile everything, all repos, docs and images) |
29662 | 42 |
$(info $(_) make images # Create complete jdk and jre images) |
28902
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
43 |
$(info $(_) make <phase> # Build the specified phase and everything it depends on) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
44 |
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata, rmic)) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
45 |
$(info $(_) make *-only # Applies to most targets and disables compling the) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
46 |
$(info $(_) # dependencies for the target. This is faster but may) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
47 |
$(info $(_) # result in incorrect build results!) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
48 |
$(info $(_) make docs # Create all docs) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
49 |
$(info $(_) make docs-javadoc # Create just javadocs, depends on less than full docs) |
29662 | 50 |
$(info $(_) make profiles # Create complete jre compact profile images) |
28902
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
51 |
$(info $(_) make bootcycle-images # Build images twice, second time with newly built JDK) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
52 |
$(info $(_) make install # Install the generated images locally) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
53 |
$(info $(_) make reconfigure # Rerun configure with the same arguments as last time) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
54 |
$(info $(_) make help # Give some help on using make) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
55 |
$(info $(_) make test # Run tests, default is all tests (see TEST below)) |
21759 | 56 |
$(info ) |
27560 | 57 |
$(info Targets for cleaning) |
28902
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
58 |
$(info $(_) make clean # Remove all files generated by make, but not those) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
59 |
$(info $(_) # generated by configure) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
60 |
$(info $(_) make dist-clean # Remove all files, including configuration) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
61 |
$(info $(_) make clean-<outputdir> # Remove the subdir in the output dir with the name) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
62 |
$(info $(_) make clean-<phase> # Remove all build results related to a certain build) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
63 |
$(info $(_) # phase (gensrc, java, libs, launchers)) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
64 |
$(info $(_) make clean-<module> # Remove all build results related to a certain module) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
65 |
$(info $(_) make clean-<module>-<phase> # Remove all build results related to a certain) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
66 |
$(info $(_) # module and phase) |
27560 | 67 |
$(info ) |
25854 | 68 |
$(info Targets for specific modules) |
29662 | 69 |
$(info $(_) make <module> # Build <module> and everything it depends on) |
28902
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
70 |
$(info $(_) make <module>-<phase> # Compile the specified phase for the specified module) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
71 |
$(info $(_) # and everything it depends on) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
72 |
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata, rmic)) |
21759 | 73 |
$(info ) |
28902
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
74 |
$(info Make control variables) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
75 |
$(info $(_) CONF= # Build all configurations (note, assignment is empty)) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
76 |
$(info $(_) CONF=<substring> # Build the configuration(s) with a name matching) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
77 |
$(info $(_) # <substring>) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
78 |
$(info $(_) SPEC=<spec file> # Build the configuration given by the spec file) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
79 |
$(info $(_) LOG=<loglevel> # Change the log level from warn to <loglevel>) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
80 |
$(info $(_) # Available log levels are:) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
81 |
$(info $(_) # 'warn' (default), 'info', 'debug' and 'trace') |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
82 |
$(info $(_) # To see executed command lines, use LOG=debug) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
83 |
$(info $(_) JOBS=<n> # Run <n> parallel make jobs) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
84 |
$(info $(_) # Note that -jN does not work as expected!) |
29662 | 85 |
$(info $(_) CONF_CHECK=<method> # What to do if spec file is out of date) |
86 |
$(info $(_) # method is 'auto', 'ignore' or 'fail' (default)) |
|
28902
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
87 |
$(info $(_) make test TEST=<test> # Only run the given test or tests, e.g.) |
0c09b47449c8
8069064: Various improvements and fixes in build system
ihse
parents:
28286
diff
changeset
|
88 |
$(info $(_) # make test TEST="jdk_lang jdk_net") |
21759 | 89 |
$(info ) |
29662 | 90 |
$(if $(all_confs), $(info Available configurations in $(build_dir):) $(foreach var,$(all_confs),$(info * $(var))),\ |
91 |
$(info No configurations were found in $(build_dir).) $(info Run 'bash configure' to create a configuration)) |
|
92 |
# We need a dummy rule otherwise make will complain |
|
93 |
@true |
|
0 | 94 |
|
29662 | 95 |
print-targets: |
96 |
$(if $(any_spec_file), ,\ |
|
97 |
@echo "Note: More targets will be available when at least one configuration exists." 1>&2\ |
|
98 |
) |
|
99 |
@echo $(ALL_TARGETS) |
|
100 |
||
101 |
print-modules: |
|
102 |
$(if $(any_spec_file), \ |
|
103 |
@$(MAKE) -s -f $(topdir)/make/Main.gmk -I $(topdir)/make/common SPEC=$(any_spec_file) print-modules \ |
|
104 |
, \ |
|
105 |
@echo print-modules can currently only be run when at least one configuration exists \ |
|
106 |
) |
|
107 |
||
108 |
print-configurations: |
|
109 |
$(foreach var, $(all_confs), $(info $(var))) |
|
110 |
# We need a dummy rule otherwise make will complain |
|
111 |
@true |
|
112 |
||
113 |
ALL_GLOBAL_TARGETS := help print-modules print-targets print-configurations |
|
114 |
||
115 |
.PHONY: $(ALL_GLOBAL_TARGETS) |