Tue, 15 Jul 2014 18:46:37 -0700
8029797: Let jprt run configure when building
Reviewed-by: dholmes
Makefile | file | annotate | diff | comparison | revisions | |
make/Jprt.gmk | file | annotate | diff | comparison | revisions | |
make/Main.gmk | file | annotate | diff | comparison | revisions | |
make/MakeHelpers.gmk | file | annotate | diff | comparison | revisions | |
make/jprt.properties | file | annotate | diff | comparison | revisions |
1.1 --- a/Makefile Mon May 12 06:16:36 2014 -0700 1.2 +++ b/Makefile Tue Jul 15 18:46:37 2014 -0700 1.3 @@ -66,7 +66,7 @@ 1.4 # First, find out the valid targets 1.5 # Run the makefile with an arbitrary SPEC using -p -q (quiet dry-run and dump rules) to find 1.6 # available PHONY targets. Use this list as valid targets to pass on to the repeated calls. 1.7 - all_phony_targets=$(filter-out $(global_targets) bundles bundles-only final-images-only, $(strip $(shell \ 1.8 + all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \ 1.9 cd $(root_dir) && $(MAKE) -p -q FRC SPEC=$(firstword $(SPEC)) | \ 1.10 grep ^.PHONY: | head -n 1 | cut -d " " -f 2-))) 1.11 1.12 @@ -79,10 +79,6 @@ 1.13 endif 1.14 endif 1.15 1.16 -# Include this after a potential spec file has been included so that the bundles target 1.17 -# has access to the spec variables. 1.18 -include $(root_dir)/make/Jprt.gmk 1.19 - 1.20 # Here are "global" targets, i.e. targets that can be executed without specifying a single configuration. 1.21 # If you addd more global targets, please update the variable global_targets in MakeHelpers. 1.22
2.1 --- a/make/Jprt.gmk Mon May 12 06:16:36 2014 -0700 2.2 +++ b/make/Jprt.gmk Tue Jul 15 18:46:37 2014 -0700 2.3 @@ -23,151 +23,7 @@ 2.4 # questions. 2.5 # 2.6 2.7 -# This file is included by the root NewerMakefile and contains targets 2.8 -# and utilities needed by JPRT. 2.9 - 2.10 -# Utilities used in this Makefile. Most of this makefile executes without 2.11 -# the context of a spec file from configure. 2.12 -CAT=cat 2.13 -CMP=cmp 2.14 -CP=cp 2.15 -ECHO=echo 2.16 -MKDIR=mkdir 2.17 -PRINTF=printf 2.18 -PWD=pwd 2.19 -# Insure we have a path that looks like it came from pwd 2.20 -# (This is mostly for Windows sake and drive letters) 2.21 -define UnixPath # path 2.22 -$(shell (cd "$1" && $(PWD))) 2.23 -endef 2.24 - 2.25 -BUILD_DIR_ROOT:=$(root_dir)/build 2.26 - 2.27 -ifdef OPENJDK 2.28 - OPEN_BUILD=true 2.29 -else 2.30 - OPEN_BUILD := $(if $(or $(wildcard $(root_dir)/jdk/src/closed), \ 2.31 - $(wildcard $(root_dir)/jdk/make/closed), \ 2.32 - $(wildcard $(root_dir)/jdk/test/closed), \ 2.33 - $(wildcard $(root_dir)/hotspot/src/closed), \ 2.34 - $(wildcard $(root_dir)/hotspot/make/closed), \ 2.35 - $(wildcard $(root_dir)/hotspot/test/closed)), \ 2.36 - false,true) 2.37 -endif 2.38 - 2.39 -HOTSPOT_AVAILABLE := $(if $(wildcard $(root_dir)/hotspot),true,false) 2.40 - 2.41 -########################################################################### 2.42 -# To help in adoption of the new configure&&make build process, a bridge 2.43 -# build will use the old settings to run configure and do the build. 2.44 - 2.45 -# Build with the configure bridge. After running configure, restart make 2.46 -# to parse the new spec file. 2.47 -BRIDGE_TARGETS := all 2.48 -# Add bootcycle-images target if legacy variable is set. 2.49 -ifeq ($(SKIP_BOOT_CYCLE),false) 2.50 - BRIDGE_TARGETS += bootcycle-images 2.51 -endif 2.52 -bridgeBuild: bridge2configure 2.53 - @cd $(root_dir) && $(MAKE) -f Makefile $(BRIDGE_TARGETS) 2.54 - 2.55 -# Bridge from old Makefile ALT settings to configure options 2.56 -bridge2configure: $(BUILD_DIR_ROOT)/.bridge2configureOpts 2.57 - bash ./configure $(strip $(shell $(CAT) $<)) 2.58 - 2.59 -# Create a file with configure options created from old Makefile mechanisms. 2.60 -$(BUILD_DIR_ROOT)/.bridge2configureOpts: $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest 2.61 - $(RM) $@ 2.62 - $(CP) $< $@ 2.63 - 2.64 -# Use this file to only change when obvious things have changed 2.65 -$(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC 2.66 - $(RM) $@.tmp 2.67 - $(MKDIR) -p $(BUILD_DIR_ROOT) 2.68 - @$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp 2.69 - ifdef ARCH_DATA_MODEL 2.70 - @$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp 2.71 - endif 2.72 - ifeq ($(ARCH_DATA_MODEL),32) 2.73 - @$(ECHO) " --with-jvm-variants=client,server " >> $@.tmp 2.74 - endif 2.75 - ifdef ALT_PARALLEL_COMPILE_JOBS 2.76 - @$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp 2.77 - endif 2.78 - ifdef ALT_BOOTDIR 2.79 - @$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp 2.80 - endif 2.81 - ifdef ALT_CUPS_HEADERS_PATH 2.82 - @$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp 2.83 - endif 2.84 - ifdef ALT_FREETYPE_HEADERS_PATH 2.85 - @$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp 2.86 - endif 2.87 - ifdef ENABLE_SJAVAC 2.88 - @$(ECHO) " --enable-sjavac" >> $@.tmp 2.89 - endif 2.90 - ifdef JDK_UPDATE_VERSION 2.91 - @$(ECHO) " --with-update-version=$(JDK_UPDATE_VERSION)" >> $@.tmp 2.92 - endif 2.93 - ifeq ($(HOTSPOT_AVAILABLE),false) 2.94 - ifdef ALT_JDK_IMPORT_PATH 2.95 - @$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp 2.96 - endif 2.97 - endif 2.98 - ifeq ($(OPEN_BUILD),true) 2.99 - @$(ECHO) " --enable-openjdk-only " >> $@.tmp 2.100 - else 2.101 -# Todo: move to closed? 2.102 - ifdef ALT_MOZILLA_HEADERS_PATH 2.103 - @$(ECHO) " --with-mozilla-headers=$(call UnixPath,$(ALT_MOZILLA_HEADERS_PATH)) " >> $@.tmp 2.104 - endif 2.105 - ifdef ALT_JUNIT_DIR 2.106 - @$(ECHO) " --with-junit-dir=$(call UnixPath,$(ALT_JUNIT_DIR)) " >> $@.tmp 2.107 - endif 2.108 - ifdef ANT_HOME 2.109 - @$(ECHO) " --with-ant-home=$(call UnixPath,$(ANT_HOME)) " >> $@.tmp 2.110 - endif 2.111 - ifdef ALT_JAVAFX_ZIP_DIR 2.112 - @$(ECHO) " --with-javafx-zip-dir=$(call UnixPath,$(ALT_JAVAFX_ZIP_DIR)) " >> $@.tmp 2.113 - endif 2.114 - ifdef ALT_JMC_ZIP_DIR 2.115 - @$(ECHO) " --with-jmc-zip-dir=$(call UnixPath,$(ALT_JMC_ZIP_DIR)) " >> $@.tmp 2.116 - endif 2.117 - ifdef ALT_WIXDIR 2.118 - @$(ECHO) " --with-wix=$(call UnixPath,$(ALT_WIXDIR)) " >> $@.tmp 2.119 - endif 2.120 - ifdef ALT_INSTALL_LZMA_PATH 2.121 - @$(ECHO) " --with-lzma-path=$(call UnixPath,$(ALT_INSTALL_LZMA_PATH)) " >> $@.tmp 2.122 - endif 2.123 - ifdef ALT_INSTALL_UPX_PATH 2.124 - @$(ECHO) " --with-upx-path=$(call UnixPath,$(ALT_INSTALL_UPX_PATH)) " >> $@.tmp 2.125 - endif 2.126 - ifdef ALT_INSTALL_UPX_FILENAME 2.127 - @$(ECHO) " --with-upx-filename=$(call UnixPath,$(ALT_INSTALL_UPX_FILENAME)) " >> $@.tmp 2.128 - endif 2.129 - ifdef ALT_CCSS_SIGNING_DIR 2.130 - @$(ECHO) " --with-ccss-signing=$(call UnixPath,$(ALT_CCSS_SIGNING_DIR)) " >> $@.tmp 2.131 - endif 2.132 - ifdef ALT_SLASH_JAVA 2.133 - @$(ECHO) " --with-java-devtools=$(call UnixPath,$(ALT_SLASH_JAVA)/devtools) " >> $@.tmp 2.134 - endif 2.135 - ifdef ALT_SPARKLE_FRAMEWORK_DIR 2.136 - @$(ECHO) " --with-sparkle-framework=$(call UnixPath,$(ALT_SPARKLE_FRAMEWORK_DIR)) " >> $@.tmp 2.137 - endif 2.138 - endif 2.139 - @if [ -f $@ ] ; then \ 2.140 - if ! $(CMP) $@ $@.tmp > /dev/null ; then \ 2.141 - $(CP) $@.tmp $@ ; \ 2.142 - fi ; \ 2.143 - else \ 2.144 - $(CP) $@.tmp $@ ; \ 2.145 - fi 2.146 - $(RM) $@.tmp 2.147 - 2.148 -PHONY_LIST += bridge2configure bridgeBuild 2.149 - 2.150 -########################################################################### 2.151 -# JPRT targets 2.152 +# This file is contains targets utilities needed by JPRT. 2.153 2.154 ifndef JPRT_ARCHIVE_BUNDLE 2.155 JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip 2.156 @@ -176,23 +32,6 @@ 2.157 JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip 2.158 endif 2.159 2.160 -# These targets execute in a SPEC free context, before calling bridgeBuild 2.161 -# to generate the SPEC. 2.162 -jprt_build_product: DEBUG_LEVEL=release 2.163 -jprt_build_product: BUILD_DIRNAME=*-release 2.164 -jprt_build_product: jprt_build_generic 2.165 - 2.166 -jprt_build_fastdebug: DEBUG_LEVEL=fastdebug 2.167 -jprt_build_fastdebug: BUILD_DIRNAME=*-fastdebug 2.168 -jprt_build_fastdebug: jprt_build_generic 2.169 - 2.170 -jprt_build_debug: DEBUG_LEVEL=slowdebug 2.171 -jprt_build_debug: BUILD_DIRNAME=*-debug 2.172 -jprt_build_debug: jprt_build_generic 2.173 - 2.174 -jprt_build_generic: BRIDGE_TARGETS+=jprt_bundle 2.175 -jprt_build_generic: bridgeBuild 2.176 - 2.177 # This target must be called in the context of a SPEC file 2.178 jprt_bundle: $(JPRT_ARCHIVE_BUNDLE) 2.179 @$(call CheckIfMakeAtEnd) 2.180 @@ -238,14 +77,6 @@ 2.181 @$(call TargetExit) 2.182 2.183 2.184 -# Keep track of phony targets 2.185 -PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \ 2.186 - jprt_build_generic bundles jprt_bundle \ 2.187 - final-images final-images-only 2.188 - 2.189 ########################################################################### 2.190 # Phony targets 2.191 -.PHONY: $(PHONY_LIST) 2.192 - 2.193 -# Force target 2.194 -FRC: 2.195 +.PHONY: jprt_bundle bundles bundles-only final-images final-images-only
3.1 --- a/make/Main.gmk Mon May 12 06:16:36 2014 -0700 3.2 +++ b/make/Main.gmk Tue Jul 15 18:46:37 2014 -0700 3.3 @@ -242,4 +242,6 @@ 3.4 .PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-nashorn clean-images clean-docs clean-test clean-overlay-images clean-bootcycle-build 3.5 .PHONY: profiles profiles-only profiles-oscheck 3.6 3.7 +include $(root_dir)/make/Jprt.gmk 3.8 + 3.9 FRC: # Force target
4.1 --- a/make/MakeHelpers.gmk Mon May 12 06:16:36 2014 -0700 4.2 +++ b/make/MakeHelpers.gmk Tue Jul 15 18:46:37 2014 -0700 4.3 @@ -50,7 +50,7 @@ 4.4 4.5 # Global targets are possible to run either with or without a SPEC. The prototypical 4.6 # global target is "help". 4.7 -global_targets=help jprt% bridgeBuild bridge2configure 4.8 +global_targets=help 4.9 4.10 ############################## 4.11 # Functions
5.1 --- a/make/jprt.properties Mon May 12 06:16:36 2014 -0700 5.2 +++ b/make/jprt.properties Tue Jul 15 18:46:37 2014 -0700 5.3 @@ -151,3 +151,23 @@ 5.4 # Directories to be excluded from the source bundles 5.5 jprt.bundle.exclude.src.dirs=build dist webrev 5.6 5.7 +# Instruct jprt to use configure when building 5.8 +jprt.build.use.configure=true 5.9 +jprt.build.flavor.product.target=jprt_bundle 5.10 +jprt.build.flavor.fastdebug.target=jprt_bundle 5.11 +jprt.build.flavor.debug.target=jprt_bundle 5.12 + 5.13 +# Add these configure args to all builds 5.14 +jprt.build.configure.args= \ 5.15 + --with-boot-jdk=$ALT_BOOTDIR \ 5.16 + --with-jobs=$ALT_PARALLEL_COMPILE_JOBS 5.17 + 5.18 +# Add these configure args to 32 bit builds 5.19 +jprt.i586.build.configure.args= \ 5.20 + --with-target-bits=32 \ 5.21 + --with-jvm-variants=client,server 5.22 + 5.23 +# Use these configure args to define debug level. 5.24 +jprt.product.build.configure.args=--with-debug-level=release 5.25 +jprt.fastdebug.build.configure.args=--with-debug-level=fastdebug 5.26 +jprt.debug.build.configure.args=--with-debug-level=slowdebug