33 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. 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 38 # Assume we have GNU make, but check version. 39 ifeq (,$(findstring 3.81,$(MAKE_VERSION))) 40 ifeq (,$(findstring 3.82,$(MAKE_VERSION))) 41 $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.) 42 endif 43 endif 44 45 # Locate this Makefile 46 ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),) 47 makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST)) 48 else 49 makefile_path:=$(lastword $(MAKEFILE_LIST)) 50 endif 51 root_dir:=$(dir $(makefile_path)) 52 53 include $(root_dir)/common/makefiles/Jprt.gmk 54 55 # ... and then we can include our helper functions 56 include $(root_dir)/common/makefiles/MakeHelpers.gmk 57 58 $(eval $(call ParseLogLevel)) 59 $(eval $(call ParseConfAndSpec)) 60 61 # Now determine if we have zero, one or several configurations to build. 62 ifeq ($(SPEC),) 63 # Since we got past ParseConfAndSpec, we must be building a global target. Do nothing. 64 else 65 ifeq ($(words $(SPEC)),1) 66 # We are building a single configuration. This is the normal case. Execute the Main.gmk file. 67 include $(root_dir)/common/makefiles/Main.gmk 68 else 69 # We are building multiple configurations. 70 # First, find out the valid targets 71 # Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find 72 # available PHONY targets. Use this list as valid targets to pass on to the repeated calls. 73 all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \ 74 $(MAKE) -p -q -f common/makefiles SPEC=$(firstword $(SPEC)) | \ 75 grep ^.PHONY: | head -n 1 | cut -d " " -f 2-))) 76 77 $(all_phony_targets): 78 @$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@) &&) true 79 80 endif 81 endif 82 83 # Here are "global" targets, i.e. targets that can be executed without specifying a single configuration. 84 # If you addd more global targets, please update the variable global_targets in MakeHelpers. 85 86 help: 87 $(info ) 88 $(info OpenJDK Makefile help) 89 $(info =====================) 90 $(info ) 91 $(info Common make targets) 92 $(info . make [default] # Compile all product in langtools, hotspot, jaxp, jaxws,) 93 $(info . # corba and jdk) 94 $(info . make all # Compile everything, all repos and images) 95 $(info . make images # Create complete j2sdk and j2re images) 96 $(info . make overlay-images # Create limited images for sparc 64 bit platforms) 97 $(info . make bootcycle-images # Build images twice, second time with newly build JDK) 98 $(info . make install # Install the generated images locally) 99 $(info . make clean # Remove all files generated by make, but not those) 100 $(info . # generated by configure) 101 $(info . make dist-clean # Remove all files, including configuration) | 33 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. 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 38 # Assume we have GNU make, but check version. 39 ifeq (,$(findstring 3.81,$(MAKE_VERSION))) 40 ifeq (,$(findstring 3.82,$(MAKE_VERSION))) 41 $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.) 42 endif 43 endif 44 45 # Locate this Makefile 46 ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),) 47 makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST)) 48 else 49 makefile_path:=$(lastword $(MAKEFILE_LIST)) 50 endif 51 root_dir:=$(dir $(makefile_path)) 52 53 # ... and then we can include our helper functions 54 include $(root_dir)/common/makefiles/MakeHelpers.gmk 55 56 $(eval $(call ParseLogLevel)) 57 $(eval $(call ParseConfAndSpec)) 58 59 # Now determine if we have zero, one or several configurations to build. 60 ifeq ($(SPEC),) 61 # Since we got past ParseConfAndSpec, we must be building a global target. Do nothing. 62 else 63 ifeq ($(words $(SPEC)),1) 64 # We are building a single configuration. This is the normal case. Execute the Main.gmk file. 65 include $(root_dir)/common/makefiles/Main.gmk 66 else 67 # We are building multiple configurations. 68 # First, find out the valid targets 69 # Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find 70 # available PHONY targets. Use this list as valid targets to pass on to the repeated calls. 71 all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \ 72 $(MAKE) -p -q -f common/makefiles SPEC=$(firstword $(SPEC)) | \ 73 grep ^.PHONY: | head -n 1 | cut -d " " -f 2-))) 74 75 $(all_phony_targets): 76 @$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@) &&) true 77 78 endif 79 endif 80 81 # Include this after a potential spec file has been included so that the bundles target 82 # has access to the spec variables. 83 include $(root_dir)/common/makefiles/Jprt.gmk 84 85 # Here are "global" targets, i.e. targets that can be executed without specifying a single configuration. 86 # If you addd more global targets, please update the variable global_targets in MakeHelpers. 87 88 help: 89 $(info ) 90 $(info OpenJDK Makefile help) 91 $(info =====================) 92 $(info ) 93 $(info Common make targets) 94 $(info . make [default] # Compile all product in langtools, hotspot, jaxp, jaxws,) 95 $(info . # corba and jdk) 96 $(info . make all # Compile everything, all repos and images) 97 $(info . make images # Create complete j2sdk and j2re images) 98 $(info . make overlay-images # Create limited images for sparc 64 bit platforms) 99 $(info . make bootcycle-images # Build images twice, second time with newly build JDK) 100 $(info . make install # Install the generated images locally) 101 $(info . make clean # Remove all files generated by make, but not those) 102 $(info . # generated by configure) 103 $(info . make dist-clean # Remove all files, including configuration) |