Wed, 28 Mar 2018 08:47:53 -0700
Added tag jdk8u172-b11 for changeset 4d038b84d113
duke@2 | 1 | # |
ihse@912 | 2 | # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
duke@2 | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@2 | 4 | # |
duke@2 | 5 | # This code is free software; you can redistribute it and/or modify it |
duke@2 | 6 | # under the terms of the GNU General Public License version 2 only, as |
ohair@182 | 7 | # published by the Free Software Foundation. Oracle designates this |
duke@2 | 8 | # particular file as subject to the "Classpath" exception as provided |
ohair@182 | 9 | # by Oracle in the LICENSE file that accompanied this code. |
duke@2 | 10 | # |
duke@2 | 11 | # This code is distributed in the hope that it will be useful, but WITHOUT |
duke@2 | 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@2 | 13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@2 | 14 | # version 2 for more details (a copy is included in the LICENSE file that |
duke@2 | 15 | # accompanied this code). |
duke@2 | 16 | # |
duke@2 | 17 | # You should have received a copy of the GNU General Public License version |
duke@2 | 18 | # 2 along with this work; if not, write to the Free Software Foundation, |
duke@2 | 19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@2 | 20 | # |
ohair@182 | 21 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@182 | 22 | # or visit www.oracle.com if you need additional information or have any |
ohair@182 | 23 | # questions. |
duke@2 | 24 | # |
duke@2 | 25 | |
ihse@912 | 26 | # This must be the first rule |
ihse@912 | 27 | default: |
ohair@478 | 28 | |
ihse@912 | 29 | # Inclusion of this pseudo-target will cause make to execute this file |
ihse@912 | 30 | # serially, regardless of -j. Recursively called makefiles will not be |
ihse@912 | 31 | # affected, however. This is required for correct dependency management. |
ihse@912 | 32 | .NOTPARALLEL: |
ihse@912 | 33 | |
ihse@912 | 34 | # The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make. |
ihse@912 | 35 | # /usr/ccs/bin/make lacks basically every other flow control mechanism. |
ihse@912 | 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 |
ihse@912 | 37 | |
ihse@912 | 38 | # Assume we have GNU make, but check version. |
ihse@912 | 39 | ifeq ($(strip $(foreach v, 3.81% 3.82% 4.%, $(filter $v, $(MAKE_VERSION)))), ) |
ihse@912 | 40 | $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.) |
ohair@570 | 41 | endif |
ohair@570 | 42 | |
ihse@912 | 43 | # Locate this Makefile |
ihse@912 | 44 | ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),) |
ihse@912 | 45 | makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST)) |
ihse@912 | 46 | else |
ihse@912 | 47 | makefile_path:=$(lastword $(MAKEFILE_LIST)) |
ihse@912 | 48 | endif |
ihse@912 | 49 | root_dir:=$(dir $(makefile_path)) |
ohair@478 | 50 | |
ihse@912 | 51 | # ... and then we can include our helper functions |
ihse@912 | 52 | include $(root_dir)/make/MakeHelpers.gmk |
ohair@478 | 53 | |
ihse@912 | 54 | $(eval $(call ParseLogLevel)) |
ihse@912 | 55 | $(eval $(call ParseConfAndSpec)) |
ohair@478 | 56 | |
ihse@912 | 57 | # Now determine if we have zero, one or several configurations to build. |
ihse@912 | 58 | ifeq ($(SPEC),) |
ihse@912 | 59 | # Since we got past ParseConfAndSpec, we must be building a global target. Do nothing. |
ihse@912 | 60 | else |
ihse@912 | 61 | ifeq ($(words $(SPEC)),1) |
ihse@912 | 62 | # We are building a single configuration. This is the normal case. Execute the Main.gmk file. |
ihse@912 | 63 | include $(root_dir)/make/Main.gmk |
ihse@912 | 64 | else |
ihse@912 | 65 | # We are building multiple configurations. |
ihse@912 | 66 | # First, find out the valid targets |
ihse@912 | 67 | # Run the makefile with an arbitrary SPEC using -p -q (quiet dry-run and dump rules) to find |
ihse@912 | 68 | # available PHONY targets. Use this list as valid targets to pass on to the repeated calls. |
mikael@1140 | 69 | all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \ |
ihse@919 | 70 | cd $(root_dir) && $(MAKE) -p -q FRC SPEC=$(firstword $(SPEC)) | \ |
ihse@912 | 71 | grep ^.PHONY: | head -n 1 | cut -d " " -f 2-))) |
ohair@7 | 72 | |
ihse@912 | 73 | $(all_phony_targets): |
ihse@919 | 74 | @$(foreach spec,$(SPEC),(cd $(root_dir) && $(MAKE) SPEC=$(spec) \ |
ihse@912 | 75 | $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true |
ohair@340 | 76 | |
ihse@912 | 77 | .PHONY: $(all_phony_targets) |
ohair@340 | 78 | |
ohair@29 | 79 | endif |
ohair@29 | 80 | endif |
ohair@29 | 81 | |
ihse@912 | 82 | # Here are "global" targets, i.e. targets that can be executed without specifying a single configuration. |
ihse@912 | 83 | # If you addd more global targets, please update the variable global_targets in MakeHelpers. |
ohrstrom@313 | 84 | |
ihse@912 | 85 | help: |
ihse@912 | 86 | $(info ) |
ihse@912 | 87 | $(info OpenJDK Makefile help) |
ihse@912 | 88 | $(info =====================) |
ihse@912 | 89 | $(info ) |
ihse@912 | 90 | $(info Common make targets) |
ihse@912 | 91 | $(info . make [default] # Compile all product in langtools, hotspot, jaxp, jaxws,) |
ihse@912 | 92 | $(info . # corba and jdk) |
ihse@912 | 93 | $(info . make all # Compile everything, all repos and images) |
ihse@912 | 94 | $(info . make images # Create complete j2sdk and j2re images) |
ihse@912 | 95 | $(info . make docs # Create javadocs) |
ihse@912 | 96 | $(info . make overlay-images # Create limited images for sparc 64 bit platforms) |
ihse@912 | 97 | $(info . make profiles # Create complete j2re compact profile images) |
ihse@912 | 98 | $(info . make bootcycle-images # Build images twice, second time with newly build JDK) |
ihse@912 | 99 | $(info . make install # Install the generated images locally) |
ihse@912 | 100 | $(info . make clean # Remove all files generated by make, but not those) |
ihse@912 | 101 | $(info . # generated by configure) |
ihse@912 | 102 | $(info . make dist-clean # Remove all files, including configuration) |
ihse@912 | 103 | $(info . make help # Give some help on using make) |
ihse@912 | 104 | $(info . make test # Run tests, default is all tests (see TEST below)) |
ihse@912 | 105 | $(info ) |
ihse@912 | 106 | $(info Targets for specific components) |
ihse@912 | 107 | $(info (Component is any of langtools, corba, jaxp, jaxws, hotspot, jdk, nashorn, images, overlay-images, docs or test)) |
ihse@912 | 108 | $(info . make <component> # Build <component> and everything it depends on. ) |
ihse@912 | 109 | $(info . make <component>-only # Build <component> only, without dependencies. This) |
ihse@912 | 110 | $(info . # is faster but can result in incorrect build results!) |
ihse@912 | 111 | $(info . make clean-<component> # Remove files generated by make for <component>) |
ihse@912 | 112 | $(info ) |
ihse@912 | 113 | $(info Useful make variables) |
ihse@912 | 114 | $(info . make CONF= # Build all configurations (note, assignment is empty)) |
ihse@912 | 115 | $(info . make CONF=<substring> # Build the configuration(s) with a name matching) |
ihse@912 | 116 | $(info . # <substring>) |
ihse@912 | 117 | $(info ) |
ihse@912 | 118 | $(info . make LOG=<loglevel> # Change the log level from warn to <loglevel>) |
ihse@912 | 119 | $(info . # Available log levels are:) |
ihse@912 | 120 | $(info . # 'warn' (default), 'info', 'debug' and 'trace') |
ihse@912 | 121 | $(info . # To see executed command lines, use LOG=debug) |
ihse@912 | 122 | $(info ) |
ihse@912 | 123 | $(info . make JOBS=<n> # Run <n> parallel make jobs) |
ihse@912 | 124 | $(info . # Note that -jN does not work as expected!) |
ihse@912 | 125 | $(info ) |
ihse@912 | 126 | $(info . make test TEST=<test> # Only run the given test or tests, e.g.) |
ihse@912 | 127 | $(info . # make test TEST="jdk_lang jdk_net") |
ihse@912 | 128 | $(info ) |
ohair@29 | 129 | |
ihse@912 | 130 | .PHONY: help |