annotate Makefile @ 928:c90c89d6f35a

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