1.1 --- a/common/makefiles/Makefile Thu Dec 27 20:55:53 2012 +0100 1.2 +++ b/common/makefiles/Makefile Fri Dec 28 09:51:15 2012 +0100 1.3 @@ -23,109 +23,4 @@ 1.4 # questions. 1.5 # 1.6 1.7 -# This must be the first rule 1.8 -all: 1.9 - 1.10 -# Inclusion of this pseudo-target will cause make to execute this file 1.11 -# serially, regardless of -j. Recursively called makefiles will not be 1.12 -# affected, however. This is required for correct dependency management. 1.13 -.NOTPARALLEL: 1.14 - 1.15 -# The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make. 1.16 -# /usr/ccs/bin/make lacks basically every other flow control mechanism. 1.17 -TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1 1.18 - 1.19 -# Assume we have GNU make, but check version. 1.20 -ifeq (,$(findstring 3.81,$(MAKE_VERSION))) 1.21 - ifeq (,$(findstring 3.82,$(MAKE_VERSION))) 1.22 - $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.) 1.23 - endif 1.24 -endif 1.25 - 1.26 -# Locate this Makefile 1.27 -ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),) 1.28 - makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST)) 1.29 -else 1.30 - makefile_path:=$(lastword $(MAKEFILE_LIST)) 1.31 -endif 1.32 -root_dir:=$(patsubst %/common/makefiles/Makefile,%,$(makefile_path)) 1.33 - 1.34 -# ... and then we can include our helper functions 1.35 -include $(dir $(makefile_path))/MakeHelpers.gmk 1.36 - 1.37 -$(eval $(call ParseLogLevel)) 1.38 -$(eval $(call ParseConfAndSpec)) 1.39 - 1.40 -# Now determine if we have zero, one or several configurations to build. 1.41 -ifeq ($(SPEC),) 1.42 - # Since we got past ParseConfAndSpec, we must be building a global target. Do nothing. 1.43 -else 1.44 - ifeq ($(words $(SPEC)),1) 1.45 - # We are building a single configuration. This is the normal case. Execute the Main.gmk file. 1.46 - include $(dir $(makefile_path))/Main.gmk 1.47 - else 1.48 - # We are building multiple configurations. 1.49 - # First, find out the valid targets 1.50 - # Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find 1.51 - # available PHONY targets. Use this list as valid targets to pass on to the repeated calls. 1.52 - all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \ 1.53 - $(MAKE) -p -q -f $(makefile_path) SPEC=$(firstword $(SPEC)) | \ 1.54 - grep ^.PHONY: | head -n 1 | cut -d " " -f 2-))) 1.55 - 1.56 -$(all_phony_targets): 1.57 - @$(foreach spec,$(SPEC),($(MAKE) -f $(makefile_path) SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@) &&) true 1.58 - 1.59 - endif 1.60 -endif 1.61 - 1.62 -# Here are "global" targets, i.e. targets that can be executed without specifying a single configuration. 1.63 -# If you addd more global targets, please update the variable global_targets in MakeHelpers. 1.64 - 1.65 -help: 1.66 - $(info ) 1.67 - $(info OpenJDK Makefile help) 1.68 - $(info =====================) 1.69 - $(info ) 1.70 - $(info Common make targets) 1.71 - $(info . make [all] # Compile all code but do not create images) 1.72 - $(info . make images # Create complete j2sdk and j2re images) 1.73 - $(info . make overlay-images # Create limited images for sparc 64 bit platforms) 1.74 - $(info . make bootcycle-images # Build images twice, second time with newly build JDK) 1.75 - $(info . make install # Install the generated images locally) 1.76 - $(info . make clean # Remove all files generated by make, but not those) 1.77 - $(info . # generated by configure) 1.78 - $(info . make dist-clean # Remove all files, including configuration) 1.79 - $(info . make help # Give some help on using make) 1.80 - $(info . make test # Run tests, default is all tests (see TEST below)) 1.81 - $(info ) 1.82 - $(info Targets for specific components) 1.83 - $(info (Component is any of langtools, corba, jaxp, jaxws, hotspot, jdk, images or overlay-images)) 1.84 - $(info . make <component> # Build <component> and everything it depends on. ) 1.85 - $(info . make <component>-only # Build <component> only, without dependencies. This) 1.86 - $(info . # is faster but can result in incorrect build results!) 1.87 - $(info . make clean-<component> # Remove files generated by make for <component>) 1.88 - $(info ) 1.89 - $(info Useful make variables) 1.90 - $(info . make CONF= # Build all configurations (note, assignment is empty)) 1.91 - $(info . make CONF=<substring> # Build the configuration(s) with a name matching) 1.92 - $(info . # <substring>) 1.93 - $(info ) 1.94 - $(info . make LOG=<loglevel> # Change the log level from warn to <loglevel>) 1.95 - $(info . # Available log levels are:) 1.96 - $(info . # 'warn' (default), 'info', 'debug' and 'trace') 1.97 - $(info . # To see executed command lines, use LOG=debug) 1.98 - $(info ) 1.99 - $(info . make JOBS=<n> # Run <n> parallel make jobs) 1.100 - $(info . # Note that -jN does not work as expected!) 1.101 - $(info ) 1.102 - $(info . make test TEST=<test> # Only run the given test or tests, e.g.) 1.103 - $(info . # make test TEST="jdk_lang jdk_net") 1.104 - $(info ) 1.105 - 1.106 -configure: 1.107 - @$(SHELL) $(root_dir)/configure $(CONFIGURE_ARGS) 1.108 - @echo ==================================================== 1.109 - @echo "Note: This is a non-recommended way of running configure." 1.110 - @echo "Instead, run 'sh configure' in the top-level directory" 1.111 - 1.112 -.PHONY: help configure 1.113 +include ../../NewMakefile.gmk