8049367: Modular Run-Time Images

Co-authored-by: Alan Bateman <alan.bateman@oracle.com>
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Bradford Wetmore <bradford.wetmore@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Magnus Ihse Bursie <magnus.ihse.bursie@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Paul Sandoz <paul.sandoz@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Reviewed-by: chegar, dfuchs, ihse, joehw, mullan, psandoz, wetmore
This commit is contained in:
Chris Hegarty 2014-12-03 14:22:58 +00:00
parent ed11049d5e
commit 441905cdc7
268 changed files with 11792 additions and 5531 deletions

View File

@ -1,137 +0,0 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
include $(SPEC)
include MakeBase.gmk
default: bundles
# Only macosx has bundles defined.
ifeq ($(OPENJDK_TARGET_OS), macosx)
bundles: jre-bundle jdk-bundle
# JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle
# All these OPENJDK checks are needed since there is no coherency between
# these values in open and closed. Should probably be fixed.
ifndef OPENJDK
BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(JDK_MINOR_VERSION)u$(JDK_UPDATE_VERSION)
else
BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE)
endif
BUNDLE_ID_JRE := $(BUNDLE_ID).jre
BUNDLE_ID_JDK := $(BUNDLE_ID).jdk
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION)
BUNDLE_NAME_JRE := $(BUNDLE_NAME)
BUNDLE_NAME_JDK := $(BUNDLE_NAME)
ifndef OPENJDK
BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_VERSION)
else
BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) ($(JDK_VERSION))
endif
BUNDLE_INFO_JRE := $(BUNDLE_INFO)
BUNDLE_INFO_JDK := $(BUNDLE_INFO)
BUNDLE_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
BUNDLE_VERSION := $(JDK_VERSION)
ifeq ($(COMPANY_NAME), N/A)
BUNDLE_VENDOR := UNDEFINED
else
BUNDLE_VENDOR := $(COMPANY_NAME)
endif
JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR))
JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR))
JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST))
JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST))
# Copy empty directories (jre/lib/applet).
$(JDK_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $(@D)
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
$(JRE_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $(@D)
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
$(JDK_BUNDLE_DIR)/MacOS/libjli.dylib:
$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../Home/jre/lib/jli/libjli.dylib $@
$(JRE_BUNDLE_DIR)/MacOS/libjli.dylib:
$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../Home/lib/jli/libjli.dylib $@
$(JDK_BUNDLE_DIR)/Info.plist: $(SPEC)
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $(@D)
$(SED) -e "s/@@ID@@/$(BUNDLE_ID_JDK)/g" \
-e "s/@@NAME@@/$(BUNDLE_NAME_JDK)/g" \
-e "s/@@INFO@@/$(BUNDLE_INFO_JDK)/g" \
-e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
-e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
-e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
< $(MACOSX_PLIST_SRC)/JDK-Info.plist > $@
$(JRE_BUNDLE_DIR)/Info.plist: $(SPEC)
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $(@D)
$(SED) -e "s/@@ID@@/$(BUNDLE_ID_JRE)/g" \
-e "s/@@NAME@@/$(BUNDLE_NAME_JRE)/g" \
-e "s/@@INFO@@/$(BUNDLE_INFO_JRE)/g" \
-e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
-e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
-e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
< $(MACOSX_PLIST_SRC)/JRE-Info.plist > $@
jdk-bundle: $(JDK_TARGET_LIST) $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib \
$(JDK_BUNDLE_DIR)/Info.plist
$(SETFILE) -a B $(dir $(JDK_BUNDLE_DIR))
jre-bundle: $(JRE_TARGET_LIST) $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib \
$(JRE_BUNDLE_DIR)/Info.plist
$(SETFILE) -a B $(dir $(JRE_BUNDLE_DIR))
else # Not macosx
bundles:
$(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)"
endif # macosx
.PHONY: jdk-bundle jre-bundle bundles

View File

@ -53,7 +53,7 @@ define SetupAppletDemo
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1, \
SETUP := GENERATE_USINGJDKBYTECODE, \
SRC := $(JDK_TOPDIR)/src/$3demo/share/applets/$1, \
BIN := $(JDK_OUTPUTDIR)/demo/applets/$1, \
BIN := $(SUPPORT_OUTPUTDIR)/demo/image/applets/$1, \
COPY := .html .java .xyz .obj .au .gif, \
DISABLE_SJAVAC := $2))
BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1)
@ -118,27 +118,27 @@ define SetupDemo
SETUP := GENERATE_USINGJDKBYTECODE, \
ADD_JAVAC_FLAGS := $3, \
SRC := $$($1_MAIN_SRC) $5, \
BIN := $(JDK_OUTPUTDIR)/democlasses/$2/$1, \
BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/$2/$1, \
COPY := $(PATTERNS_TO_COPY) $(10), \
JAR := $(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE), \
JAR := $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/$$($1_JARFILE), \
JARMAIN := $4, \
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
EXTRA_MANIFEST_ATTR := $(11), \
SRCZIP := $(JDK_OUTPUTDIR)/demo/$2/$1/src.zip, \
SRCZIP := $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/src.zip, \
EXCLUDE_FILES := $9, \
DISABLE_SJAVAC := $(12)))
BUILD_DEMOS += $$(BUILD_DEMO_$1) \
$(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE) \
$(JDK_OUTPUTDIR)/demo/$2/$1/src.zip
$(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/$$($1_JARFILE) \
$(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/src.zip
endif
# Copy files.
$1_COPY_TARGETS := $$(patsubst $$($1_SRC_BASE)/%, \
$(JDK_OUTPUTDIR)/demo/$2/$1/%, \
$(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/%, \
$$(wildcard $$(addprefix $$($1_SRC_BASE)/, $7)))
ifneq ($7, )
$(JDK_OUTPUTDIR)/demo/$2/$1/%: $$($1_SRC_BASE)/%
$(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/%: $$($1_SRC_BASE)/%
$$(call install-file)
$(CHMOD) -f ug+w $$@
@ -148,20 +148,20 @@ define SetupDemo
endef
$(eval $(call SetupDemo,CodePointIM,jfc,,CodePointIM,,,*.html))
$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services: \
$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar \
$(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/_the.services: \
$(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/CodePointIM.jar \
$(DEMO_SHARE_SRC)/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor
(cd $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM && \
(cd $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM && \
$(MKDIR) -p _the.tmp/META-INF/services && \
$(CP) $(DEMO_SHARE_SRC)/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \
cd ./_the.tmp && \
$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \
$(JAR) uf $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \
cd ./META-INF/services && \
$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor)
$(RM) -r $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.tmp
$(JAR) uf $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor)
$(RM) -r $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/_the.tmp
$(TOUCH) $@
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services
BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/_the.services
ifneq ($(OPENJDK_TARGET_OS), solaris)
$(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html *.java))
@ -192,10 +192,10 @@ ifndef OPENJDK
SplashScreen-Image: resources/images/splash.png,true))
BUILD_DEMOS += $(patsubst $(DEMO_CLOSED_SHARE_SRC)/nbproject/%, \
$(JDK_OUTPUTDIR)/demo/nbproject/%, \
$(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%, \
$(call CacheFind, $(DEMO_CLOSED_SHARE_SRC)/nbproject))
$(JDK_OUTPUTDIR)/demo/nbproject/%: $(DEMO_CLOSED_SHARE_SRC)/nbproject/%
$(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%: $(DEMO_CLOSED_SHARE_SRC)/nbproject/%
$(call install-file)
$(CHMOD) -f ug+w $@
endif
@ -266,16 +266,16 @@ define SetupJVMTIDemo
-D "JDK_FNAME=$1.dll" \
-D "JDK_INTERNAL_NAME=$1" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demo/native/jvmti/$1, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib, \
LIBRARY := $1))
$$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1, \
SRC := $(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
EXCLUDE_FILES := $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE), \
ZIP := $(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip))
ZIP := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/src.zip))
$(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt: $(DEMO_SHARE_SRC)/jvmti/$1/README.txt
$(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/README.txt: $(DEMO_SHARE_SRC)/jvmti/$1/README.txt
$$(call install-file)
$(CHMOD) -f ug+w $$@
@ -283,30 +283,30 @@ define SetupJVMTIDemo
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_JVMTI_$1_JAVA, \
SETUP := GENERATE_USINGJDKBYTECODE, \
SRC := $(DEMO_SHARE_SRC)/jvmti/$1, \
BIN := $(JDK_OUTPUTDIR)/democlasses/jvmti/$1, \
BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/jvmti/$1, \
COPY := $(PATTERNS_TO_COPY), \
JAR := $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar, \
JAR := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/$1.jar, \
EXTRA_MANIFEST_ATTR := Main-Class: \n, \
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf))
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar
BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/$1.jar
endif
BUILD_DEMOS += $$(BUILD_DEMO_JVMTI_$1) \
$(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip \
$(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt
$(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/src.zip \
$(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/README.txt
ifeq ($(OPENJDK_TARGET_OS), windows)
# These files normally end up in OBJECT_DIR but for demos they
# are supposed to be included in the distro.
$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib: $$(BUILD_DEMO_JVMTI_$1)
$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.lib $$@
$(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.lib: $$(BUILD_DEMO_JVMTI_$1)
$(CP) $(SUPPORT_OUTPUTDIR)/demo/native/jvmti/$1/$1.lib $$@
$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp: $$(BUILD_DEMO_JVMTI_$1)
$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.exp $$@
$(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.exp: $$(BUILD_DEMO_JVMTI_$1)
$(CP) $(SUPPORT_OUTPUTDIR)/demo/native/jvmti/$1/$1.exp $$@
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib \
$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp
BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.lib \
$(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.exp
endif
endef
@ -321,95 +321,97 @@ $(eval $(call SetupJVMTIDemo,versionCheck, agent_util))
##################################################################################################
$(JDK_OUTPUTDIR)/demo/management/index.html: $(DEMO_SHARE_SRC)/management/index.html
$(SUPPORT_OUTPUTDIR)/demo/image/management/index.html: $(DEMO_SHARE_SRC)/management/index.html
$(call install-file)
$(CHMOD) -f ug+w $@
$(JDK_OUTPUTDIR)/demo/jvmti/index.html: $(DEMO_SHARE_SRC)/jvmti/index.html
$(SUPPORT_OUTPUTDIR)/demo/image/jvmti/index.html: $(DEMO_SHARE_SRC)/jvmti/index.html
$(call install-file)
$(CHMOD) -f ug+w $@
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/management/index.html \
$(JDK_OUTPUTDIR)/demo/jvmti/index.html
BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/management/index.html \
$(SUPPORT_OUTPUTDIR)/demo/image/jvmti/index.html
##################################################################################################
# The netbeans project files are copied into the demo directory.
ifeq ($(OPENJDK_TARGET_OS), solaris)
BUILD_DEMOS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
$(JDK_OUTPUTDIR)/demo/nbproject/%, \
$(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%, \
$(filter-out $(DEMO_SHARE_SRC)/nbproject/jfc/SwingApplet%, \
$(call CacheFind, $(DEMO_SHARE_SRC)/nbproject)))
else
BUILD_DEMOS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
$(JDK_OUTPUTDIR)/demo/nbproject/%, \
$(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%, \
$(call CacheFind, $(DEMO_SHARE_SRC)/nbproject))
endif
$(JDK_OUTPUTDIR)/demo/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
$(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
$(call install-file)
$(CHMOD) -f ug+w $@
##################################################################################################
$(JDK_OUTPUTDIR)/demo/README: $(DEMO_SHARE_SRC)/README
$(SUPPORT_OUTPUTDIR)/demo/image/README: $(DEMO_SHARE_SRC)/README
$(call install-file)
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/README
BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/README
##################################################################################################
ifeq ($(OPENJDK_TARGET_OS), solaris)
$(JDK_OUTPUTDIR)/democlasses/jni/Poller/%: $(DEMO_SOLARIS_SRC)/jni/Poller/%
$(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller/%: $(DEMO_SOLARIS_SRC)/jni/Poller/%
$(call install-file)
$(CHMOD) -f ug+w $@
$(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt: $(DEMO_SOLARIS_SRC)/jni/Poller/README.txt
$(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/README.txt: $(DEMO_SOLARIS_SRC)/jni/Poller/README.txt
$(call install-file)
$(CHMOD) -f ug+w $@
$(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar: \
$(JDK_OUTPUTDIR)/democlasses/jni/Poller/README.txt $(JDK_OUTPUTDIR)/democlasses/jni/Poller/Poller.c
$(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar: \
$(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller/README.txt \
$(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller/Poller.c
$(eval $(call SetupJavaCompilation,BUILD_DEMO_POLLER_JAR, \
SETUP := GENERATE_USINGJDKBYTECODE, \
SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
BIN := $(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
HEADERS := $(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
JAR := $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar, \
BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
HEADERS := $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
JAR := $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar, \
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
SRCZIP := $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip, \
SRCZIP := $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/src.zip, \
COPY := README.txt Poller.c, \
JARMAIN := Client))
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip \
$(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt
BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar \
$(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/src.zip \
$(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/README.txt
$(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER, \
SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(SHARED_LIBRARY_FLAGS) \
-I$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
-I$(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LDFLAGS_SUFFIX_solaris := -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/demoobjs/jni/Poller, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/demoobjs, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demo/native/jni/Poller, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demo/native, \
LIBRARY := Poller))
#
# We can only compile native code after jar has been build (since we depend on generated .h files)
#
$(JDK_OUTPUTDIR)/demoobjs/jni/Poller/Poller.o: $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar
$(SUPPORT_OUTPUTDIR)/demo/native/jni/Poller/Poller.o: $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar
$(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX): \
$(JDK_OUTPUTDIR)/demoobjs/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
$(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX): \
$(SUPPORT_OUTPUTDIR)/demo/native/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
$(call install-file)
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
endif
@ -419,22 +421,22 @@ ifndef OPENJDK
DB_ZIP_DIR := $(wildcard $(JDK_TOPDIR)/src/closed/db)
DB_DEMO_ZIPFILE := $(wildcard $(DB_ZIP_DIR)/*.zip)
$(JDK_OUTPUTDIR)/demo/_the.db.unzipped: $(DB_DEMO_ZIPFILE)
$(SUPPORT_OUTPUTDIR)/demo/image/_the.db.unzipped: $(DB_DEMO_ZIPFILE)
$(MKDIR) -p $(@D)
$(RM) -r $(JDK_OUTPUTDIR)/demo/db $(JDK_OUTPUTDIR)/demo/demo
$(CD) $(JDK_OUTPUTDIR)/demo && $(UNZIP) -q -o $<
$(MV) $(JDK_OUTPUTDIR)/demo/db-derby-*-bin/demo $(JDK_OUTPUTDIR)/demo/db
$(CD) $(JDK_OUTPUTDIR)/demo && $(RM) -r db-derby-*-bin
$(RM) -r $(SUPPORT_OUTPUTDIR)/demo/image/db $(SUPPORT_OUTPUTDIR)/demo/image/demo
$(CD) $(SUPPORT_OUTPUTDIR)/demo/image && $(UNZIP) -q -o $<
$(MV) $(SUPPORT_OUTPUTDIR)/demo/image/db-derby-*-bin/demo $(SUPPORT_OUTPUTDIR)/demo/image/db
$(CD) $(SUPPORT_OUTPUTDIR)/demo/image && $(RM) -r db-derby-*-bin
$(TOUCH) $@
# Copy this after the unzip above to avoid race with directory creation and mv command.
$(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html: \
$(SUPPORT_OUTPUTDIR)/demo/image/db/README-JDK-DEMOS.html: \
$(DB_ZIP_DIR)/README-JDK-DEMOS.html \
| $(JDK_OUTPUTDIR)/demo/_the.db.unzipped
| $(SUPPORT_OUTPUTDIR)/demo/image/_the.db.unzipped
$(MKDIR) -p $(@D)
$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(DB_ZIP_DIR)/COPYRIGHTYEAR)/" > $@
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/_the.db.unzipped $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html
BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/_the.db.unzipped $(SUPPORT_OUTPUTDIR)/demo/image/db/README-JDK-DEMOS.html
endif
##################################################################################################

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -45,7 +45,7 @@ $(eval $(call SetupJavaCompilation,BUILD_INTERIM_RMIC, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(JDK_TOPDIR)/src/jdk.rmic/share/classes, \
INCLUDES := $(RMIC_PKGS), \
BIN := $(JDK_OUTPUTDIR)/interim_rmic_classes, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_classes, \
COPY := .properties, \
JAVAC_SOURCE_PATH_OVERRIDE := $(addprefix $(JDK_TOPDIR)/src/jdk.rmic/share/classes/, $(RMIC_PKGS))))

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -28,7 +28,7 @@ default: all
include $(SPEC)
include MakeBase.gmk
SAMPLE_TARGET_DIR := $(JDK_OUTPUTDIR)/sample
SAMPLE_TARGET_DIR := $(SUPPORT_OUTPUTDIR)/sample
SAMPLE_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/share
SAMPLE_CLOSED_SOURCE_DIR := $(JDK_TOPDIR)/src/closed/sample/share
SAMPLE_SOLARIS_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/solaris

View File

@ -1,795 +0,0 @@
#
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
default: all
include Tools.gmk
JDK_OUT_CLASSES := $(wildcard $(JDK_OUTPUTDIR)/modules/*)
$(eval $(call FillCacheFind, $(JDK_OUT_CLASSES)))
include Profiles.gmk
#
# This makefile...so that altering will trigger rebuilding include/exclude-lists => jars
#
MAKEFILE = $(JDK_TOPDIR)/make/CreateJars.gmk
#
# And similarly for the Profiles
PROFILE_MAKEFILES = $(JDK_TOPDIR)/make/Profiles.gmk $(JDK_TOPDIR)/make/profile-rtjar-includes.txt
MAINMANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf
BEANMANIFEST := $(JDK_TOPDIR)/make/data/swingbeaninfo/manifest.mf
$(eval $(call MakeDir, $(IMAGES_OUTPUTDIR)/lib))
##########################################################################################
$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.jconsole, \
SUFFIXES := .class .gif .png .properties, \
INCLUDES := sun/tools/jconsole com/sun/tools/jconsole, \
JARMAIN := sun.tools.jconsole.JConsole, \
JAR := $(IMAGES_OUTPUTDIR)/lib/jconsole.jar, \
SKIP_METAINF := true))
##########################################################################################
$(eval $(call SetupArchive,BUILD_DNS_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.naming.dns, \
INCLUDES := sun/net/spi/nameservice/dns, \
EXTRA_FILES := META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor, \
JAR := $(IMAGES_OUTPUTDIR)/lib/ext/dnsns.jar, \
SKIP_METAINF := true))
##########################################################################################
LOCALEDATA_INCLUDE_LOCALES := ar be bg ca cs da de el es et fi fr ga hi hr hu in is it \
iw ja ko lt lv mk ms mt nl no pl pt ro ru sk sl sq sr sv \
th tr uk vi zh
LOCALEDATA_INCLUDES := sun/util/resources/provider/NonEnLocaleDataMetaInfo.class
LOCALEDATA_INCLUDES += $(addprefix sun/text/resources/, $(LOCALEDATA_INCLUDE_LOCALES)) \
$(addprefix sun/util/resources/, $(LOCALEDATA_INCLUDE_LOCALES))
LOCALEDATA_SERVICES_DIR := $(IMAGES_OUTPUTDIR)/localemetainfo
LOCALEDATA_METAINF_SERVICES := $(LOCALEDATA_SERVICES_DIR)/META-INF/services/sun.util.locale.provider.LocaleDataMetaInfo
$(LOCALEDATA_METAINF_SERVICES): $(JDK_TOPDIR)/src/jdk.localedata/META-INF/localedata-services/sun.util.locale.provider.LocaleDataMetaInfo
$(install-file)
$(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR, \
$(LOCALEDATA_METAINF_SERVICES), \
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.localedata \
$(LOCALEDATA_SERVICES_DIR), \
SUFFIXES := .class _dict _th, \
INCLUDES := $(LOCALEDATA_INCLUDES), \
EXTRA_FILES := META-INF/services/sun.util.locale.provider.LocaleDataMetaInfo, \
JAR := $(IMAGES_OUTPUTDIR)/lib/ext/localedata.jar, \
SKIP_METAINF := true))
##########################################################################################
#
# Different variants of rt.jar are built based on the current profile. The output
# directory is augmented with the profile name so that the final jar file and all the
# intermediary list files will be in directory. This has the form lib$PROFILE rather than
# lib/$PROFILE so that it won't get copied as part of the image generation process.
# Each profile customizes the RT_JAR_EXCLUDES variable.
#
##########################################################################################
# Full JRE exclude list for rt.jar and resources.jar
# This value should exclude types destined for jars other than rt.jar and resources.jar.
# When building a Profile this value augments the profile specific exclusions
RT_JAR_EXCLUDES += \
com/oracle/security/ucrypto \
com/sun/codemodel \
com/sun/crypto/provider \
com/sun/istack/internal/tools \
com/sun/jarsigner \
com/sun/java/accessibility \
com/sun/javadoc \
com/sun/jdi \
com/sun/net/ssl/internal/ssl \
com/sun/source \
com/sun/tools \
com/sun/xml/internal/dtdparser \
com/sun/xml/internal/rngom \
com/sun/xml/internal/xsom \
javax/crypto \
javax/swing/AbstractButtonBeanInfo.class \
javax/swing/beaninfo \
javax/swing/BoxBeanInfo.class \
javax/swing/JAppletBeanInfo.class \
javax/swing/JButtonBeanInfo.class \
javax/swing/JCheckBoxBeanInfo.class \
javax/swing/JCheckBoxMenuItemBeanInfo.class \
javax/swing/JColorChooserBeanInfo.class \
javax/swing/JComboBoxBeanInfo.class \
javax/swing/JComponentBeanInfo.class \
javax/swing/JDesktopPaneBeanInfo.class \
javax/swing/JDialogBeanInfo.class \
javax/swing/JEditorPaneBeanInfo.class \
javax/swing/JFileChooserBeanInfo.class \
javax/swing/JFormattedTextFieldBeanInfo.class \
javax/swing/JFrameBeanInfo.class \
javax/swing/JInternalFrameBeanInfo.class \
javax/swing/JLabelBeanInfo.class \
javax/swing/JLayeredPaneBeanInfo.class \
javax/swing/JListBeanInfo.class \
javax/swing/JMenuBarBeanInfo.class \
javax/swing/JMenuBeanInfo.class \
javax/swing/JMenuItemBeanInfo.class \
javax/swing/JOptionPaneBeanInfo.class \
javax/swing/JPanelBeanInfo.class \
javax/swing/JPasswordFieldBeanInfo.class \
javax/swing/JPopupMenuBeanInfo.class \
javax/swing/JProgressBarBeanInfo.class \
javax/swing/JRadioButtonBeanInfo.class \
javax/swing/JRadioButtonMenuItemBeanInfo.class \
javax/swing/JScrollBarBeanInfo.class \
javax/swing/JScrollPaneBeanInfo.class \
javax/swing/JSeparatorBeanInfo.class \
javax/swing/JSliderBeanInfo.class \
javax/swing/JSpinnerBeanInfo.class \
javax/swing/JSplitPaneBeanInfo.class \
javax/swing/JTabbedPaneBeanInfo.class \
javax/swing/JTableBeanInfo.class \
javax/swing/JTextAreaBeanInfo.class \
javax/swing/JTextFieldBeanInfo.class \
javax/swing/JTextPaneBeanInfo.class \
javax/swing/JToggleButtonBeanInfo.class \
javax/swing/JToolBarBeanInfo.class \
javax/swing/JTreeBeanInfo.class \
javax/swing/JWindowBeanInfo.class \
javax/swing/SwingBeanInfoBase.class \
javax/swing/text/JTextComponentBeanInfo.class \
jdk/nio/zipfs \
META-INF/services/com.sun.jdi.connect.Connector \
META-INF/services/com.sun.jdi.connect.spi.TransportService \
META-INF/services/com.sun.tools.attach.spi.AttachProvider \
META-INF/services/com.sun.tools.xjc.Plugin \
META-INF/services/javax.script.ScriptEngineFactory \
META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor \
META-INF/services/java.nio.file.spi.FileSystemProvider \
org/relaxng/datatype \
sun/awt/HKSCS.class \
sun/awt/motif/X11GB2312.class \
sun/awt/motif/X11GB2312$$$$Decoder.class \
sun/awt/motif/X11GB2312$$$$Encoder.class \
sun/awt/motif/X11GBK.class \
sun/awt/motif/X11GBK$$$$Encoder.class \
sun/awt/motif/X11KSC5601.class \
sun/awt/motif/X11KSC5601$$$$Decoder.class \
sun/awt/motif/X11KSC5601$$$$Encoder.class \
sun/jvmstat \
sun/net/spi/nameservice/dns \
sun/nio/cs/ext \
sun/rmi/rmic \
sun/security/ec \
sun/security/internal \
sun/security/mscapi \
sun/security/pkcs11 \
sun/security/provider/Sun.class \
sun/security/rsa/SunRsaSign.class \
sun/security/ssl \
sun/security/tools/jarsigner \
sun/swing/BeanInfoUtils.class \
sun/text/resources/cldr \
sun/tools/asm \
sun/tools/attach \
sun/tools/java \
sun/tools/javac \
sun/tools/jcmd \
sun/tools/jconsole \
sun/tools/jinfo \
sun/tools/jmap \
sun/tools/jps \
sun/tools/jstack \
sun/tools/jstat \
sun/tools/jstatd \
sun/tools/native2ascii \
sun/tools/serialver \
sun/tools/tree \
sun/tools/util \
sun/util/resources/provider/NonEnLocaleDataMetaInfo.class \
META-INF/services/sun.util.locale.provider.LocaleDataMetaInfo \
sun/util/resources/cldr \
$(LOCALEDATA_INCLUDES) \
com/oracle/jrockit/jfr \
oracle/jrockit/jfr \
jdk/jfr \
jdk/internal/dynalink \
jdk/nashorn \
sun/jvm \
toolbarButtonGraphics \
sa.properties \
com/sun/java/swing/action \
com/sun/java/swing/ui \
com/oracle/security \
#
# Find all files in the classes dir to use as dependencies. This could be more fine granular.
ALL_FILES_IN_CLASSES := $(call not-containing, _the., $(filter-out %javac_state, \
$(call CacheFind, $(JDK_OUT_CLASSES))))
RT_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar_manifest
RESOURCE_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar_manifest
$(RT_JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
$(MAINMANIFEST) >> $@.tmp
$(ECHO) >> $@.tmp
$(CAT) $(BEANMANIFEST) >> $@.tmp
$(MV) $@.tmp $@
$(RESOURCE_JAR_MANIFEST_FILE): $(MAINMANIFEST)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
$(MAINMANIFEST) >> $@.tmp
$(MV) $@.tmp $@
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude: $(MAKEFILE) $(PROFILE_MAKEFILES)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(call ListPathsSafely,RT_JAR_EXCLUDES,\n, >> $@.tmp)
$(MV) $@.tmp $@
$(IMAGES_OUTPUTDIR)/lib/classlist: $(JDK_TOPDIR)/make/data/classlist/classlist.$(OPENJDK_TARGET_OS) \
$(MAKEFILE)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(TOOL_ADDJSUM) $< $@.tmp
$(MV) $@.tmp $@
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents: $(BUILD_TOOLS_JDK) $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude \
$(ALL_FILES_IN_CLASSES) $(IMAGES_OUTPUTDIR)/lib/classlist
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
($(CD) $(JDK_OUTPUTDIR)/modules && \
$(TOOL_JARREORDER) -m \
-o $@.tmp $(IMAGES_OUTPUTDIR)/lib/classlist $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude . )
$(MV) $@.tmp $@
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(GREP) -e '\.class$$' $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
ifneq ($(PROFILE), )
# Add back classes from excluded packages (fixing the $ substitution in the process)
# This currently won't work with modular build layout, but there currently are no
# types needing to be re added.
for type in $(subst \$$,\, $(RT_JAR_INCLUDE_TYPES)) ; do \
$(ECHO) $$type >> $@.tmp ; \
done
endif
$(MV) $@.tmp $@
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(GREP) -v -e '\.class$$' \
-e '/_the\.' -e '^_the\.' -e '\\_the\.' -e ' _the\.' -e 'javac_state' \
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
ifneq ($(PROFILE), )
# Strip out all META-INF/services/ entries
$(GREP) -v -e 'META-INF/services/' $@.tmp > $@.tmp2
# Add back the required services
# FIXME: On Solaris if PROFILE_INCLUDE_METAINF_SERVICES is not defined
# we get a syntax error from sh. That doesn't happen on linux
# Preserve any -C <dir> part of the original include line.
for service in $(PROFILE_INCLUDE_METAINF_SERVICES) ; do \
$(GREP) -e "$$service" $@.tmp >> $@.tmp2; \
done
$(MV) $@.tmp2 $@.tmp
endif
$(MV) $@.tmp $@
# This is a hack but I don't know how to make this fit into the existing scheme
$(PROFILE_VERSION_CLASS_TARGETS): $(PROFILE_VERSION_JAVA_TARGETS)
@$(JAVAC) -d $(@D)/../../ $(@D)/$(VERSION_JAVA_FILE)
RT_JAR_CREATE_OPTIONS := c0fm
RT_JAR_UPDATE_OPTIONS := u0f
ifeq ($(COMPRESS_JARS), true)
RT_JAR_CREATE_OPTIONS := cfm
RT_JAR_UPDATE_OPTIONS := uf
endif
# This defines a target-specific variables to make the shell logic easier to see.
# We need to find the Version.class file for the profile currently being built
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/rt.jar: \
CLASS_FILE = $(if $(PROFILE), $(strip $(foreach class, $(PROFILE_VERSION_CLASS_TARGETS), $(if $(findstring $(PROFILE), $(class)), $(class)))), NO_SUCH_FILE)
# This is the real target
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/rt.jar: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents $(RT_JAR_MANIFEST_FILE) $(PROFILE_VERSION_CLASS_TARGETS)
$(ECHO) Creating rt.jar $(PROFILE) Compressed=$(COMPRESS_JARS)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(CD) $(JDK_OUTPUTDIR)/modules && \
$(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RT_JAR_MANIFEST_FILE) \
@$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents && \
if [ -f $(CLASS_FILE) ]; then \
$(ECHO) Updating rt.jar $(PROFILE) && \
$(CD) $(patsubst %$(VERSION_CLASS_PATH), %, $(CLASS_FILE)) && \
$(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(VERSION_CLASS_PATH); \
fi
$(MV) $@.tmp $@
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/resources.jar: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents \
$(RESOURCE_JAR_MANIFEST_FILE)
$(ECHO) Creating resources.jar
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(CD) $(JDK_OUTPUTDIR)/modules && \
$(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RESOURCE_JAR_MANIFEST_FILE) \
@$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents
$(MV) $@.tmp $@
##########################################################################################
ifneq ($(OPENJDK_TARGET_OS), windows)
CHARSETS_EXTRA_FILES := sun/awt/motif/X11GBK.class \
sun/awt/motif/X11GB2312$$$$Decoder.class \
sun/awt/motif/X11GB2312.class \
sun/awt/motif/X11KSC5601$$$$Decoder.class \
sun/awt/motif/X11KSC5601$$$$Encoder.class \
sun/awt/motif/X11GB2312$$$$Encoder.class \
sun/awt/motif/X11GBK$$$$Encoder.class \
sun/awt/motif/X11KSC5601.class
endif
$(eval $(call SetupArchive,BUILD_CHARSETS_JAR, , \
SRCS := $(JDK_OUT_CLASSES), \
SUFFIXES := .class .dat, \
INCLUDES := sun/nio/cs/ext, \
EXTRA_FILES := sun/awt/HKSCS.class \
$(CHARSETS_EXTRA_FILES), \
JAR := $(IMAGES_OUTPUTDIR)/lib/charsets.jar, \
SKIP_METAINF := true, \
CHECK_COMPRESS_JAR := true))
##########################################################################################
$(eval $(call SetupArchive,BUILD_ZIPFS_JAR, , \
SRCS := $(JDK_OUT_CLASSES), \
INCLUDES := jdk/nio/zipfs, \
EXTRA_FILES := META-INF/services/java.nio.file.spi.FileSystemProvider, \
JAR := $(IMAGES_OUTPUTDIR)/lib/ext/zipfs.jar, \
SKIP_METAINF := true, \
CHECK_COMPRESS_JAR := true))
##########################################################################################
ifndef OPENJDK
ifeq ($(ENABLE_JFR), true)
$(eval $(call SetupArchive,BUILD_JFR_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.jfr, \
SUFFIXES := .class .jfc .xsd, \
INCLUDES := com/oracle/jrockit/jfr \
oracle/jrockit/jfr \
jdk/jfr, \
JAR := $(IMAGES_OUTPUTDIR)/lib/jfr.jar, \
SKIP_METAINF := true, \
MANIFEST := $(MAINMANIFEST), \
CHECK_COMPRESS_JAR := true))
endif
endif
##########################################################################################
$(eval $(call SetupArchive,BUILD_JSSE_JAR, , \
SRCS := $(JDK_OUT_CLASSES), \
INCLUDES := sun/security/provider/Sun.class \
sun/security/rsa/SunRsaSign.class \
sun/security/ssl \
com/sun/net/ssl/internal/ssl, \
JAR := $(IMAGES_OUTPUTDIR)/lib/jsse.jar, \
SKIP_METAINF := true, \
MANIFEST := $(MAINMANIFEST), \
CHECK_COMPRESS_JAR := true))
##########################################################################################
$(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/modules/java.desktop, \
SUFFIXES := BeanInfo.class .gif, \
INCLUDES := javax/swing sun/swing, \
EXCLUDES := javax/swing/plaf, \
EXTRA_FILES := javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class, \
JAR := $(IMAGES_OUTPUTDIR)/lib/dt.jar, \
SKIP_METAINF := true))
##########################################################################################
# Get the CLDRVERSION
include gensrc/GensrcCLDR.gmk
CLDRDATA_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar
CLDR_SERVICES_DIR := $(IMAGES_OUTPUTDIR)/cldrmetainfo
CLDR_METAINF_SERVICES := $(CLDR_SERVICES_DIR)/META-INF/services/sun.util.locale.provider.LocaleDataMetaInfo
$(CLDR_METAINF_SERVICES): $(JDK_TOPDIR)/src/jdk.localedata/META-INF/cldrdata-services/sun.util.locale.provider.LocaleDataMetaInfo
$(install-file)
$(eval $(call SetupArchive,BUILD_CLDRDATA_JAR, \
$(CLDR_METAINF_SERVICES), \
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.localedata \
$(CLDR_SERVICES_DIR), \
SUFFIXES := .class, \
INCLUDES := sun/text/resources/cldr \
sun/util/resources/cldr, \
EXTRA_FILES := META-INF/services/sun.util.locale.provider.LocaleDataMetaInfo, \
JAR := $(CLDRDATA_JAR_DST), \
EXTRA_MANIFEST_ATTR := CLDR-Version: $(CLDRVERSION), \
SKIP_METAINF := true))
##########################################################################################
TOOLS_JAR_INCLUDES := \
com/sun/codemodel \
com/sun/istack/internal/tools \
com/sun/jarsigner \
com/sun/javadoc \
com/sun/jdi \
com/sun/source \
com/sun/tools/attach \
com/sun/tools/classfile \
com/sun/tools/corba \
com/sun/tools/doclets \
com/sun/tools/doclint \
com/sun/tools/example/debug/expr \
com/sun/tools/example/debug/tty \
com/sun/tools/hat \
com/sun/tools/internal/jxc \
com/sun/tools/internal/jxc/ap \
com/sun/tools/internal/ws \
com/sun/tools/internal/ws/wscompile/plugin/at_generated \
com/sun/tools/internal/xjc \
com/sun/tools/javac \
com/sun/tools/javadoc \
com/sun/tools/javah \
com/sun/tools/javap \
com/sun/tools/jdeps \
com/sun/tools/jdi \
com/sun/tools/script/shell \
com/sun/xml/internal/dtdparser \
com/sun/xml/internal/rngom \
com/sun/xml/internal/xsom \
org/relaxng/datatype \
sun/applet \
sun/jvmstat \
sun/rmi/rmic \
sun/security/tools/jarsigner \
sun/tools/asm \
sun/tools/attach \
sun/tools/jar \
sun/tools/java \
sun/tools/javac \
sun/tools/jcmd \
sun/tools/jinfo \
sun/tools/jmap \
sun/tools/jps \
sun/tools/jstack \
sun/tools/jstat \
sun/tools/jstatd \
sun/tools/native2ascii \
sun/tools/serialver \
sun/tools/tree \
sun/tools/util
# The sjavac tools is not ready for public consumption.
TOOLS_JAR_EXCLUDES = com/sun/tools/sjavac
TOOLS_JAR_SRC := $(addprefix $(JDK_OUTPUTDIR)/modules/,\
java.corba \
java.desktop \
jdk.attach \
jdk.compiler \
jdk.dev \
jdk.javadoc \
jdk.jconsole \
jdk.jcmd \
jdk.jdi \
jdk.jvmstat \
jdk.rmic \
jdk.runtime \
jdk.xml.bind \
jdk.xml.ws \
)
#
$(eval $(call SetupArchive,BUILD_TOOLS_JAR, , \
SRCS := $(TOOLS_JAR_SRC), \
SUFFIXES := .class .prp .gif .properties .xml .css .xsd .js .html .txt .java \
Tool aliasmap options, \
INCLUDES := $(TOOLS_JAR_INCLUDES), \
EXCLUDES := $(TOOLS_JAR_EXCLUDES), \
EXTRA_FILES := \
$(JDK_OUTPUTDIR)/modules/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \
META-INF/services/com.sun.jdi.connect.spi.TransportService \
META-INF/services/com.sun.tools.attach.spi.AttachProvider \
META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
META-INF/services/com.sun.tools.internal.xjc.Plugin, \
JAR := $(IMAGES_OUTPUTDIR)/lib/tools.jar, \
SKIP_METAINF := true, \
CHECK_COMPRESS_JAR := true))
##########################################################################################
include CORE_PKGS.gmk
include NON_CORE_PKGS.gmk
# The compiler should not issue a "Proprietary" warning when compiling
# classes in the com.sun.java.swing.plaf packages, since we've always
# allowed, and even advocated, extending them (see bug 6476749).
#
# This approach is NOT to be used as a general purpose way to avoid such
# compiler warnings for non-core packages. The correct way is to document
# the packages in NON_CORE_PKGS.gmk, and include them in the NON_CORE_PKGS
# definition.
#
# Swing has taken this approach only as a temporary measure to avoid
# the compiler warnings until we can properly document these packages.
# This is covered under 6491853.
EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows \
com.sun.java.swing.plaf.motif \
com.sun.java.swing.plaf.gtk
#
# Include the exported private packages in ct.sym.
# This is an interim solution until the ct.sym is replaced
# with a new module system (being discussed for JDK 8).
#
EXPORTED_PRIVATE_PKGS = com.oracle.net \
com.oracle.nio
$(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(IMAGES_OUTPUTDIR)/lib/rt.jar
$(RM) -r $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
$(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
$(JAVA) $(NEW_JAVAC) \
-bootclasspath "$(IMAGES_OUTPUTDIR)/lib/rt.jar" \
-XDprocess.packages -proc:only \
-processor com.sun.tools.javac.sym.CreateSymbols \
-Acom.sun.tools.javac.sym.Jar=$(IMAGES_OUTPUTDIR)/lib/rt.jar \
-Acom.sun.tools.javac.sym.Dest=$(IMAGES_OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
-Acom.sun.tools.javac.sym.Profiles=profile-rtjar-includes.txt \
$(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) $(EXPORTED_PRIVATE_PKGS)
$(TOUCH) $@
$(eval $(call MakeDir, $(IMAGES_OUTPUTDIR)/symbols))
$(eval $(call SetupArchive,BUILD_CT_SYM, $(IMAGES_OUTPUTDIR)/symbols/_the.symbols, \
SRCS := $(IMAGES_OUTPUTDIR)/symbols, \
INCLUDES := META-INF/sym, \
JAR := $(IMAGES_OUTPUTDIR)/lib/ct.sym, \
CHECK_COMPRESS_JAR := true))
##########################################################################################
ifdef OPENJDK
SRC_ZIP_INCLUDES = \
com \
java \
javax \
jdk \
org \
sun \
#
SRC_ZIP_EXCLUDES =
else
SRC_ZIP_INCLUDES = \
com/sun/corba \
com/sun/image/codec/jpeg \
com/sun/imageio \
com/sun/java_cup \
com/sun/javadoc \
com/sun/java/swing \
com/sun/jmx \
com/sun/naming \
com/sun/org/apache \
com/sun/security/auth \
com/sun/security/jgss \
com/sun/source \
java \
javax/accessibility \
javax/annotation \
javax/imageio \
javax/lang \
javax/management \
javax/naming \
javax/print \
javax/rmi \
javax/script \
javax/security \
javax/sound \
javax/sql \
javax/swing \
javax/tools \
javax/xml \
org/ietf \
org/omg \
org/w3c/dom \
org/xml/sax \
#
SRC_ZIP_EXCLUDES = javax/swing/beaninfo
endif
SRC_ZIP_SRCS := $(wildcard \
$(JDK_TOPDIR)/src/*/share/classes \
$(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS)/classes \
$(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_API_DIR)/classes \
$(LANGTOOLS_TOPDIR)/src/*/share/classes \
$(CORBA_TOPDIR)/src/*/share/classes \
$(JAXP_TOPDIR)/src/*/share/classes \
$(JAXWS_TOPDIR)/src/*/share/classes \
$(JDK_OUTPUTDIR)/gensrc/j* \
$(JDK_OUTPUTDIR)/gendocsrc_rmic \
$(CORBA_OUTPUTDIR)/gensrc/j* \
) \
#
ifndef OPENJDK
SRC_ZIP_SRCS += $(wildcard $(JDK_TOPDIR)/src/closed/*/share/classes)
endif
# Need to copy launcher src files into desired directory structure
# before zipping the sources.
$(eval $(call SetupCopyFiles,COPY_LAUNCHER_SRC, \
SRC := $(JDK_TOPDIR)/src/java.base, \
DEST := $(IMAGES_OUTPUTDIR)/src/launcher, \
FLATTEN := true, \
FILES := $(wildcard \
$(JDK_TOPDIR)/src/java.base/share/native/launcher/* \
$(JDK_TOPDIR)/src/java.base/share/native/libjli/* \
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjli/java_md*)))
LAUNCHER_ZIP_SRC := $(COPY_LAUNCHER_SRC)
$(IMAGES_OUTPUTDIR)/src.zip: $(LAUNCHER_ZIP_SRC)
# This dir needs to exist before macro is evaluated to avoid warning from find.
$(eval $(call MakeDir, $(IMAGES_OUTPUTDIR)/src))
$(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \
SRC := $(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src, \
INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \
EXCLUDES := $(SRC_ZIP_EXCLUDES), \
SUFFIXES := .java .c .h, \
ZIP := $(IMAGES_OUTPUTDIR)/src.zip, \
EXTRA_DEPS := $(LAUNCHER_ZIP_SRC)))
##########################################################################################
# This file is imported from hotspot in Import.gmk. Copying it into images/lib so that
# all jars can be found in one place when creating images in Images.gmk. It needs to be
# done here so that clean targets can be simple and accurate.
$(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar: $(HOTSPOT_DIST)/lib/sa-jdi.jar
$(install-file)
##########################################################################################
#
# sec-bin.zip is used by builds where the corresponding sources are not available
#
$(eval $(call SetupZipArchive,BUILD_SEC_BIN_ZIP, \
SRC := $(JDK_OUTPUTDIR), \
INCLUDES := \
modules/java.base/javax/crypto \
modules/java.base/javax/crypto/spec \
modules/java.base/sun/security/internal/interfaces \
modules/java.base/sun/security/internal/spec \
modules/java.base/com/sun/crypto/provider \
modules/jdk.crypto.ec/sun/security/ec \
modules/jdk.crypto.mscapi/sun/security/mscapi \
modules/jdk.crypto.pkcs11/sun/security/pkcs11 \
modules/jdk.crypto.pkcs11/sun/security/pkcs11/wrapper \
modules/jdk.crypto.ucrypto/com/oracle/security/ucrypto \
modules/java.base/javax/net \
modules/java.base/javax/security/cert \
modules/java.base/com/sun/net/ssl \
modules/java.base/com/sun/security/cert \
modules/java.base/sun/net/www/protocol/https \
modules/java.base/sun/security/pkcs12 \
modules/java.base/sun/security/ssl \
modules/java.security.jgss/sun/security/krb5 \
modules/java.security.jgss/sun/security/krb5/internal \
modules/java.security.jgss/sun/security/krb5/internal/ccache \
modules/java.security.jgss/sun/security/krb5/internal/crypto \
modules/java.security.jgss/sun/security/krb5/internal/ktab \
modules/java.security.jgss/sun/security/krb5/internal/rcache \
modules/java.security.jgss/sun/security/krb5/internal/util, \
INCLUDE_FILES := modules/java.security.jgss/sun/security/jgss/spi/GSSContextSpi.class, \
EXCLUDES := modules/java.security.jgss/sun/security/krb5/internal/tools, \
ZIP := $(IMAGES_OUTPUTDIR)/sec-bin.zip))
JARS += $(IMAGES_OUTPUTDIR)/sec-bin.zip
##########################################################################################
#
# Windows specific binary security packages.
#
ifeq ($(OPENJDK_TARGET_OS), windows)
# sec-windows-bin.zip is used by builds where the corresponding sources are not available
$(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP, \
SRC := $(JDK_OUTPUTDIR), \
INCLUDES := modules/java.security.jgss/sun/security/krb5/internal/tools, \
ZIP := $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip))
JARS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip
# JGSS files contain the native Kerberos library
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
JGSS_ZIP_NAME = jgss-windows-x64-bin.zip
else
JGSS_ZIP_NAME = jgss-windows-i586-bin.zip
endif
$(eval $(call SetupZipArchive,BUILD_JGSS_BIN_ZIP, \
SRC := $(JDK_OUTPUTDIR), \
INCLUDE_FILES := bin/w2k_lsa_auth.dll \
bin/w2k_lsa_auth.map \
bin/w2k_lsa_auth.pdb, \
ZIP := $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)))
JARS += $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)
endif
##########################################################################################
# This rule copies all jars from jdk/lib/... to images/lib/... to avoid having to track
# which jars are where
$(IMAGES_OUTPUTDIR)/lib/%: $(JDK_OUTPUTDIR)/lib/%
$(install-file)
##########################################################################################
# Import nashorn.jar from nashorn dist dir.
$(IMAGES_OUTPUTDIR)/lib/ext/nashorn.jar: $(NASHORN_DIST)/nashorn.jar
$(install-file)
##########################################################################################
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, jdk, CreateJars.gmk))
##########################################################################################
all: $(JARS)
.PHONY: default all

View File

@ -1,195 +0,0 @@
#
# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
##########################################################################################
# Create manifest for security jars
#
# Include these extra attributes for now, should probably take out.
#
MAINMANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf
JCE_MANIFEST := $(JDK_OUTPUTDIR)/jce/unsigned/_the.security.manifest.mf
$(JCE_MANIFEST): $(MAINMANIFEST)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
$(MAINMANIFEST) >> $@.tmp
$(ECHO) "Extension-Name: javax.crypto" >> $@.tmp
$(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp
$(ECHO) "Release-Version: $(RELEASE)" >> $@.tmp
$(MV) $@.tmp $@
##########################################################################################
# For crypto jars, always build the jar.
#
# The source for the crypto jars is not available for all licensees.
# The BUILD_CRYPTO variable is set to no if these jars can't be built
# to skip that step of the build.
SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
SUNPKCS11_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunpkcs11.jar
$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.pkcs11, \
SUFFIXES := .class, \
INCLUDES := sun/security/pkcs11, \
JAR := $(SUNPKCS11_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST)
$(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED)
$(install-file)
TARGETS += $(SUNPKCS11_JAR_UNSIGNED) $(SUNPKCS11_JAR_DST)
##########################################################################################
SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar
SUNEC_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunec.jar
$(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ec, \
SUFFIXES := .class, \
INCLUDES := sun/security/ec, \
JAR := $(SUNEC_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST)
$(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED)
$(install-file)
TARGETS += $(SUNEC_JAR_UNSIGNED) $(SUNEC_JAR_DST)
##########################################################################################
SUNJCE_PROVIDER_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunjce_provider.jar
SUNJCE_PROVIDER_JAR_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/sunjce_provider.jar
ifneq ($(BUILD_CRYPTO), no)
$(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/modules/java.base, \
SUFFIXES := .class, \
INCLUDES := com/sun/crypto/provider, \
JAR := $(SUNJCE_PROVIDER_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
TARGETS += $(SUNJCE_PROVIDER_JAR_UNSIGNED)
endif
$(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED)
$(install-file)
TARGETS += $(SUNJCE_PROVIDER_JAR_DST)
##########################################################################################
JCE_JAR_DST := $(JDK_OUTPUTDIR)/lib/jce.jar
JCE_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/jce.jar
ifneq ($(BUILD_CRYPTO), no)
$(eval $(call SetupArchive,BUILD_JCE_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/modules/java.base, \
SUFFIXES := .class, \
INCLUDES := javax/crypto sun/security/internal, \
JAR := $(JCE_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
TARGETS += $(JCE_JAR_UNSIGNED)
endif
$(JCE_JAR_DST): $(JCE_JAR_UNSIGNED)
$(install-file)
TARGETS += $(JCE_JAR_DST)
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar
SUNMSCAPI_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunmscapi.jar
$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.mscapi, \
SUFFIXES := .class, \
INCLUDES := sun/security/mscapi, \
JAR := $(SUNMSCAPI_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST)
$(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED)
$(install-file)
TARGETS += $(SUNMSCAPI_JAR_UNSIGNED) $(SUNMSCAPI_JAR_DST)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), solaris)
UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar
UCRYPTO_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/ucrypto.jar
$(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ucrypto, \
SUFFIXES := .class, \
INCLUDES := com/oracle/security/ucrypto, \
JAR := $(UCRYPTO_JAR_UNSIGNED), \
MANIFEST := $(JCE_MANIFEST), \
SKIP_METAINF := true))
$(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
$(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_UNSIGNED)
$(install-file)
TARGETS += $(UCRYPTO_JAR_UNSIGNED) $(UCRYPTO_JAR_DST)
endif
all: $(TARGETS)
.PHONY: default all

View File

@ -1,782 +0,0 @@
#
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
default: images
# Prepare the find cache.
$(eval $(call FillCacheFind, \
$(wildcard $(JDK_OUTPUTDIR)/bin \
$(JDK_OUTPUTDIR)/lib \
$(IMAGES_OUTPUTDIR)/lib \
$(JDK_OUTPUTDIR)/include \
$(JDK_OUTPUTDIR)/sample \
$(JDK_OUTPUTDIR)/demo)))
include Tools.gmk
include Profiles.gmk
# Note: This double-colon rule is intentional, to support
# custom make file integration.
images:: jre-image jdk-image
overlay-images: jre-overlay-image jdk-overlay-image
# Processing license files from source area to image area
# These will be modified to have the platform specific EOL chars.
define process-doc-file
$(ECHO) $(LOG_INFO) Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $(@D)
$(RM) $@
LC_ALL=C $(SED) 's/$$//g' $< > $@
$(CHMOD) 444 $@
endef
define AddFileToCopy
# Param 1 - src root dir
# Param 2 - dest root dir
# Param 3 - src file
# Param 4 - variable to add targets to
# Remove src dir root from src file
$2_$3_FILE := $$(patsubst $1/%,%,$3)
$2/$$($2_$3_FILE): $3
$(ECHO) $(LOG_INFO) Copying $$(patsubst $(OUTPUT_ROOT)/%,%,$$@)
$$(install-file)
$4 += $2/$$($2_$3_FILE)
endef
################################################################################
#
# JRE and JDK build rules
#
################################################################################
#
# Variable prefixes explained:
# JRE_ refers to files in the j2re-*-image.
# JDK_ refers to files in the j2sdk-image outside of the jre subdir.
# JDKJRE_ refers to files in the j2sdk-image inside the jre subdir.
#
################################################################################
# /bin dir
ifeq ($(PROFILE), )
NOT_JRE_BIN_FILES := \
appletviewer$(EXE_SUFFIX) \
idlj$(EXE_SUFFIX) \
jar$(EXE_SUFFIX) \
jarsigner$(EXE_SUFFIX) \
java-rmi.cgi \
javac$(EXE_SUFFIX) \
javadoc$(EXE_SUFFIX) \
javah$(EXE_SUFFIX) \
javap$(EXE_SUFFIX) \
jdeps$(EXE_SUFFIX) \
jcmd$(EXE_SUFFIX) \
jdb$(EXE_SUFFIX) \
jps$(EXE_SUFFIX) \
jrunscript$(EXE_SUFFIX) \
jstat$(EXE_SUFFIX) \
jstatd$(EXE_SUFFIX) \
jstack$(EXE_SUFFIX) \
packagebean$(SCRIPT_SUFFIX) \
rmic$(EXE_SUFFIX) \
serialver$(EXE_SUFFIX) \
unregbean$(EXE_SUFFIX) \
jconsole$(EXE_SUFFIX) \
jinfo$(EXE_SUFFIX) \
jmap$(EXE_SUFFIX) \
native2ascii$(EXE_SUFFIX) \
xjc$(EXE_SUFFIX) \
wsgen$(EXE_SUFFIX) \
wsimport$(EXE_SUFFIX) \
schemagen$(EXE_SUFFIX) \
jsadebugd$(EXE_SUFFIX) \
jhat$(EXE_SUFFIX)
endif
WINDOWS_JDK_BIN_FILES = \
$(EXE_SUFFIX) \
$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
$(notdir $(MSVCR_DLL))
WINDOWS_JDKJRE_BIN_FILES := \
$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \
$(SALIB_NAME)
# Find all files in bin dir
ALL_BIN_LIST := $(call CacheFind, $(JDK_OUTPUTDIR)/bin)
# Prevent sjavac from entering the images.
ALL_BIN_LIST := $(filter-out %/sjavac, $(ALL_BIN_LIST))
# For unknown reason the debuginfo files for executables are not put into images
# e.g filter them out
ifneq ($(OPENJDK_TARGET_OS), windows)
ALL_BIN_LIST := $(filter-out %.debuginfo %.diz, $(ALL_BIN_LIST))
else
# On windows, the libraries are in the bin dir, only filter out debuginfo files
# for executables. "java" is both a library and executable.
ALL_BIN_EXEC_FILES := $(filter-out java.exe, $(notdir $(filter %.exe, $(ALL_BIN_LIST))))
ALL_BIN_DEBUG_FILTER := $(addprefix %, $(patsubst %.exe, %.debuginfo, $(ALL_BIN_EXEC_FILES)) \
$(patsubst %.exe, %.diz, $(ALL_BIN_EXEC_FILES))) %.pdb
ALL_BIN_LIST := $(filter-out $(ALL_BIN_DEBUG_FILTER), $(ALL_BIN_LIST))
endif
JDKJRE_BIN_LIST := $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES)), $(ALL_BIN_LIST))
JRE_BIN_LIST := $(filter-out $(addprefix %, $(WINDOWS_JDKJRE_BIN_FILES)), $(JDKJRE_BIN_LIST))
ifeq ($(OPENJDK_TARGET_OS), windows)
JDK_BIN_LIST := $(filter $(addprefix %, $(WINDOWS_JDK_BIN_FILES)), $(ALL_BIN_LIST))
# On windows x86, the server jvm is filtered out from the j2re image. This could possibly
# be handled by profiles in the future. If no client jvm is built, leave server in.
ifeq ($(OPENJDK_TARGET_CPU), x86)
ifeq ($(JVM_VARIANT_CLIENT), true)
JRE_BIN_LIST := $(filter-out $(JDK_OUTPUTDIR)/bin/server/%, $(JRE_BIN_LIST))
endif
endif
else
JDK_BIN_LIST := $(ALL_BIN_LIST)
endif
ifneq ($(OPENJDK_TARGET_CPU_ISADIR), )
OVERLAY_FILTER := $(JDK_OUTPUTDIR)/bin$(OPENJDK_TARGET_CPU_ISADIR)%
endif
$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_BIN_TARGETS)))
$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_BIN_TARGETS)))
$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS)))
$(foreach f,$(filter $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_BIN_TARGETS)))
$(foreach f,$(filter $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_BIN_TARGETS)))
$(foreach f,$(filter $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS)))
################################################################################
# /lib dir
ifneq ($(OPENJDK_TARGET_OS), macosx)
JDKJRE_LIB_FILES := \
$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \
$(SALIB_NAME)
endif
ifeq ($(PROFILE), )
NOT_JRE_LIB_FILES := \
tools.jar \
jconsole.jar \
sa-jdi.jar \
dt.jar \
ct.sym
ifeq ($(OPENJDK_TARGET_OS), windows)
NOT_JRE_LIB_FILES += jawt.lib jvm.lib
endif
endif
JDK_LIB_FILES := $(NOT_JRE_LIB_FILES)
ifeq ($(OPENJDK_TARGET_OS), linux)
JDK_LIB_FILES += jexec
endif
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),) # If Linux or Solaris
JDK_LIB_FILES += $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)
endif
# Find all files to copy from $(JDK_OUTPUTDIR)/lib
# Jar files are not expected to be here
ALL_JDKOUT_LIB_LIST := $(call not-containing,_the., $(filter-out %.jar, \
$(call CacheFind, $(JDK_OUTPUTDIR)/lib)))
# Find all files to copy from $(IMAGES_OUTPUTDIR)/lib
# This is were the jar files are and might not exist if building overlay-images
ifneq ($(wildcard $(IMAGES_OUTPUTDIR)/lib), )
ALL_IMAGES_LIB_LIST := $(call not-containing,_the., \
$(call CacheFind, $(IMAGES_OUTPUTDIR)/lib))
endif
# Filter files to copy for each destination
JRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \
$(ALL_JDKOUT_LIB_LIST))
JDKJRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES)), $(ALL_JDKOUT_LIB_LIST))
JDK_JDKOUT_LIB_LIST := $(filter $(addprefix %, $(JDK_LIB_FILES)), $(ALL_JDKOUT_LIB_LIST))
JRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \
$(ALL_IMAGES_LIB_LIST))
JDKJRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES)), $(ALL_IMAGES_LIB_LIST))
JDK_IMAGES_LIB_LIST := $(filter $(addprefix %, $(JDK_LIB_FILES)), $(ALL_IMAGES_LIB_LIST))
# Iterate over files to copy to create rules for each one
$(foreach f,$(JRE_JDKOUT_LIB_LIST), \
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS)))
$(foreach f,$(JDK_JDKOUT_LIB_LIST), \
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS)))
$(foreach f,$(JDKJRE_JDKOUT_LIB_LIST), \
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS)))
$(foreach f,$(JRE_IMAGES_LIB_LIST), \
$(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS)))
$(foreach f,$(JDK_IMAGES_LIB_LIST), \
$(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS)))
$(foreach f,$(JDKJRE_IMAGES_LIB_LIST), \
$(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS)))
$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JRE_JDKOUT_LIB_LIST)), \
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_OVERLAY_LIB_TARGETS)))
$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDK_JDKOUT_LIB_LIST)), \
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_OVERLAY_LIB_TARGETS)))
$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDKJRE_JDKOUT_LIB_LIST)), \
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_OVERLAY_LIB_TARGETS)))
ifneq ($(PROFILE), )
# Files in lib$(PROFILE) are excluded from the generic copying routines so
# we have to add them back in here
$(foreach f,$(CUSTOM_PROFILE_JARS), \
$(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR)/lib$(PROFILE),$(JRE_IMAGE_DIR)/lib,$f,JRE_LIB_TARGETS)))
endif
# CTE plugin security change require new empty directory lib/applet
$(JRE_IMAGE_DIR)/lib/applet:
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $@
$(JDK_IMAGE_DIR)/jre/lib/applet:
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $@
$(JRE_IMAGE_DIR)/lib/meta-index: $(JRE_LIB_TARGETS)
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
$(JDK_IMAGE_DIR)/jre/lib/meta-index: $(JDKJRE_LIB_TARGETS)
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
$(JRE_IMAGE_DIR)/lib/ext/meta-index: $(JRE_LIB_TARGETS)
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
$(JDK_IMAGE_DIR)/jre/lib/ext/meta-index: $(JDKJRE_LIB_TARGETS)
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
################################################################################
# /man dir
#
# All variables in this section are assigned with simple =, without :, to enable
# more selective overriding from the custom version of this file.
#
# Avoid evaluating this whole section on windows for speed and stability
ifneq ($(OPENJDK_TARGET_OS), windows)
JRE_MAN_PAGES = \
java.1 \
jjs.1 \
keytool.1 \
orbd.1 \
pack200.1 \
policytool.1 \
rmid.1 \
rmiregistry.1 \
servertool.1 \
tnameserv.1 \
unpack200.1
ifndef OPENJDK
ifneq ($(OPENJDK_TARGET_OS), solaris)
JRE_MAN_PAGES += javaws.1
endif
endif
JDK_MAN_PAGES = \
$(JRE_MAN_PAGES) \
appletviewer.1 \
idlj.1 \
jar.1 \
jarsigner.1 \
javac.1 \
javadoc.1 \
javah.1 \
javap.1 \
jconsole.1 \
jcmd.1 \
jdb.1 \
jdeps.1 \
jhat.1 \
jinfo.1 \
jmap.1 \
jps.1 \
jrunscript.1 \
jsadebugd.1 \
jstack.1 \
jstat.1 \
jstatd.1 \
native2ascii.1 \
rmic.1 \
schemagen.1 \
serialver.1 \
wsgen.1 \
wsimport.1 \
xjc.1
# This variable is potentially overridden in the closed makefile.
MAN_SRC_BASEDIR ?= $(JDK_TOPDIR)/src
ifeq ($(OPENJDK_TARGET_OS), linux)
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/linux/doc
MAN1_SUBDIR = man
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/solaris/doc
MAN1_SUBDIR = sun/man/man1
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/bsd/doc
MAN1_SUBDIR = man
endif
$(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
$(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
$(JRE_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/%
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
$(JDK_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/%
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
define install-ja-manpage
$(MKDIR) -p $(@D)
$(CAT) $< \
| $(NATIVE2ASCII) -encoding eucJP \
| $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \
| $(NATIVE2ASCII) -reverse -encoding $1 \
> $@
endef
$(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(call install-ja-manpage, UTF-8)
$(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(call install-ja-manpage, UTF-8)
$(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(call install-ja-manpage, PCK)
$(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(call install-ja-manpage, PCK)
ifeq ($(OPENJDK_TARGET_OS), solaris)
$(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
$(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
$(JRE_IMAGE_DIR)/man/ja:
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
$(JDK_IMAGE_DIR)/man/ja:
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(JRE_IMAGE_DIR)/man/ja:
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
$(JDK_IMAGE_DIR)/man/ja:
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
$(JRE_IMAGE_DIR)/man/ja
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
$(JDK_IMAGE_DIR)/man/ja
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/, $(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JRE_MAN_PAGES))
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
$(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/, $(JDK_MAN_PAGES)) \
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES))
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
$(JRE_IMAGE_DIR)/man/ja
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
$(JDK_IMAGE_DIR)/man/ja
endif
endif # Windows
################################################################################
# /demo dir
# FIXME: demo/applets/GraphLayout/GraphPanel$2.class is sometimes not copied.
# The db demo contains an empty dir that needs to be copied. The other
# directories will always trigger the rule for recompile since
# _the.list_of_packages files are touched.
$(JDK_IMAGE_DIR)/demo/%: $(JDK_OUTPUTDIR)/demo/%
if [ ! -d "$@" ]; then \
$(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \
$(MKDIR) -p $(@D); \
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) '$<' '$@'; fi \
fi
# Find all files including directories
JDK_DEMO_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/demo/%, $(JDK_IMAGE_DIR)/demo/%, \
$(shell $(FIND) $(JDK_OUTPUTDIR)/demo ! \( -name "_the*" -o -name "javac_state" \) ))
# Param 1 is source file
define CreateOverlayDemoRule
$1_TARGET := $$(subst $(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR), \
$$(dir $1)$(OPENJDK_TARGET_CPU_ISADIR)/$$(notdir $1))
$$($1_TARGET): $1
$(ECHO) $(LOG_INFO) Copying '$$(patsubst $(OUTPUT_ROOT)/%,%,$$@)'
$$(call install-file)
JDK_OVERLAY_DEMO_TARGETS += $$($1_TARGET)
endef
JDK_OVERLAY_DEMO_SOURCES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(JDK_OUTPUTDIR)/demo))
$(foreach lib, $(JDK_OVERLAY_DEMO_SOURCES), $(eval $(call CreateOverlayDemoRule, $(lib))))
################################################################################
# /sample dir
$(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/sample), \
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_SAMPLE_TARGETS)))
################################################################################
# /db dir
ifndef OPENJDK
DB_ZIP_DIR := $(wildcard $(JDK_TOPDIR)/src/closed/db)
$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped: $(DB_ZIP_DIR)/%
$(ECHO) Unzipping $(patsubst $(SRC_ROOT)/%,%,$<)
$(RM) -r $(JDK_IMAGE_DIR)/db
$(MKDIR) -p $(JDK_IMAGE_DIR)/db
cd $(JDK_IMAGE_DIR)/db && $(UNZIP) -q -o $< -x */index.html */KEYS */test/* *javadoc/* */docs/* */demo/* 2> /dev/null
cd $(JDK_IMAGE_DIR)/db && $(MV) db-derby-*-bin/* . && $(RM) -r db-derby-*-bin
$(MKDIR) -p $(@D)
$(TOUCH) $@
$(JDK_IMAGE_DIR)/db/README-JDK.html: $(DB_ZIP_DIR)/README-JDK.html
$(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
$(MKDIR) -p $(@D)
$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(DB_ZIP_DIR)/COPYRIGHTYEAR)/" > $@
$(JDK_IMAGE_DIR)/db/3RDPARTY: $(DB_ZIP_DIR)/3RDPARTY
$(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
$(MKDIR) -p $(@D)
$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(DB_ZIP_DIR)/COPYRIGHTYEAR)/" > $@
JDK_DB_TARGETS := $(patsubst $(DB_ZIP_DIR)/%, $(IMAGES_OUTPUTDIR)/_unzip/%.unzipped, \
$(wildcard $(DB_ZIP_DIR)/*.zip)) \
$(JDK_IMAGE_DIR)/db/README-JDK.html $(JDK_IMAGE_DIR)/db/3RDPARTY
endif
################################################################################
# /include dir
$(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/include), \
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_INCLUDE_TARGETS)))
################################################################################
# doc files
ifdef OPENJDK
JRE_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
JDK_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
JRE_DOC_LOCATION := $(JDK_TOPDIR)
JDK_DOC_LOCATION := $(JDK_TOPDIR)
else
JRE_DOC_FILES := COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt
JDK_DOC_FILES := COPYRIGHT README.html LICENSE THIRDPARTYLICENSEREADME.txt
ifeq ($(OPENJDK_TARGET_OS), windows)
JRE_DOC_FILES += README.txt
else
JRE_DOC_FILES += README
endif
JDK_DOC_FILES += demo/DEMOS_LICENSE sample/SAMPLES_LICENSE
JRE_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/doc/jre
JDK_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/doc/jdk
endif
JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/, $(JRE_DOC_FILES))
JDKJRE_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/jre/, $(JRE_DOC_FILES))
JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/, $(JDK_DOC_FILES))
$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/%
$(process-doc-file)
$(JDK_IMAGE_DIR)/jre/%: $(JRE_DOC_LOCATION)/%
$(process-doc-file)
$(JRE_IMAGE_DIR)/README.txt: $(JRE_DOC_LOCATION)/README
$(process-doc-file)
$(JDK_IMAGE_DIR)/jre/README.txt: $(JRE_DOC_LOCATION)/README
$(process-doc-file)
$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/%
$(process-doc-file)
$(JDK_IMAGE_DIR)/demo/%: $(JDK_DOC_LOCATION)/%
$(process-doc-file)
$(JDK_IMAGE_DIR)/sample/%: $(JDK_DOC_LOCATION)/%
$(process-doc-file)
JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release
JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release
JRE_OVERLAY_INFO_FILE := $(JRE_OVERLAY_IMAGE_DIR)/release
JDK_OVERLAY_INFO_FILE := $(JDK_OVERLAY_IMAGE_DIR)/release
# Common way to emit a line into the release or info file
define info-file-item # name value
$(PRINTF) '%s="%s"\n' $1 $2 >> $@
endef
define create-info-file
$(MKDIR) -p $(@D)
$(RM) $@
$(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)")
$(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)")
$(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)")
$(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)")
if [ -n "$(JDK_ARCH_ABI_PROP_NAME)" ]; then $(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"); fi
$(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)")
endef
ALL_SOURCE_TIPS = $(shell \
if [ -f $(OUTPUT_ROOT)/source_tips ] ; then \
$(CAT) $(OUTPUT_ROOT)/source_tips ; \
fi)
$(JRE_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(call create-info-file)
ifneq ($(PROFILE), )
$(call info-file-item, "JAVA_PROFILE", "$(call profile_name, $(call profile_number, $(PROFILE)))")
endif
$(JDK_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(call create-info-file)
$(JRE_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(call create-info-file)
$(JDK_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(call create-info-file)
$(JDK_IMAGE_DIR)/src.zip: $(IMAGES_OUTPUTDIR)/src.zip
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
################################################################################
# Post processing (strip etc)
ifneq ($(POST_STRIP_CMD), )
ifeq ($(OPENJDK_TARGET_OS), windows)
EXEC_LIST_BIN := $(filter-out %$(notdir $(MSVCR_DLL)), $(filter %.exe %.dll, $(ALL_BIN_LIST)))
else
# Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed
EXEC_LIST_BIN := $(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX) ! -name \*.debuginfo` \
| $(EGREP) 'ELF' | $(CUT) -d':' -f1)
# On mac, the old build searches for static libraries for stripping instead of shared.
# Not clear if it's intentional.
ifneq ($(OPENJDK_TARGET_OS), macosx)
EXEC_LIST_LIB := $(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f -name \*$(SHARED_LIBRARY_SUFFIX))
endif
endif
# Filter out sjavac
EXEC_LIST_BIN := $(filter-out %sjavac$(EXE_SUFFIX), $(EXEC_LIST_BIN))
# Filter out the overlay specific bin files
EXEC_LIST := $(filter-out $(OVERLAY_FILTER), $(EXEC_LIST_BIN)) $(EXEC_LIST_LIB)
EXEC_LIST_OVERLAY := $(filter $(OVERLAY_FILTER), $(EXEC_LIST_BIN)) $(EXEC_LIST_LIB)
# Filter out non JRE files and convert to unique touch files to depend on
JRE_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, $(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped, \
$(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \
$(EXEC_LIST)))
JDKJRE_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \
$(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped, \
$(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST)))
JDK_BIN_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \
$(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped, \
$(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST)))
# Do the same for overlay image
JRE_OVERLAY_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, $(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped, \
$(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \
$(EXEC_LIST_OVERLAY)))
JDKJRE_OVERLAY_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \
$(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/jre/%.stripped, \
$(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST_OVERLAY)))
JDK_OVERLAY_BIN_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \
$(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped, \
$(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST_OVERLAY)))
define mcs-file
$(if $(POST_MCS_CMD), $(POST_MCS_CMD) $<)
endef
define strip-file
$(ECHO) Stripping $(LOG_INFO) $(patsubst $(OUTPUT_ROOT)/%,%,$<)
$(CHMOD) u+w $<
$(POST_STRIP_CMD) $<
$(call mcs-file)
$(CHMOD) go-w $<
$(MKDIR) -p $(@D)
$(TOUCH) $@
endef
# Setup a rule for stripping files based on touch files
$(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped: $(JRE_IMAGE_DIR)/%
$(call strip-file)
$(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped: $(JDK_IMAGE_DIR)/%
$(call strip-file)
$(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped: $(JRE_OVERLAY_IMAGE_DIR)/%
$(call strip-file)
$(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped: $(JDK_OVERLAY_IMAGE_DIR)/%
$(call strip-file)
endif
################################################################################
# Include the custom makefile right here, after all variables have been defined
# so that they may be overridden, but before the main targets are declared, so
# that overriding has an effect.
$(eval $(call IncludeCustomExtension, jdk, Images.gmk))
################################################################################
# Main targets
jre-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) $(JRE_IMAGE_DIR)/lib/applet \
$(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \
$(JRE_MAN_PAGE_LIST) $(JRE_DOC_TARGETS) $(JRE_INFO_FILE) $(JRE_STRIP_LIST) \
$(JRE_BIN_ISADIR_LINK_TARGETS)
jdk-image: $(JDK_BIN_TARGETS) $(JDKJRE_BIN_TARGETS) \
$(JDK_LIB_TARGETS) $(JDKJRE_LIB_TARGETS) \
$(JDK_IMAGE_DIR)/jre/lib/applet \
$(JDK_DEMO_TARGETS) \
$(JDK_IMAGE_DIR)/jre/lib/meta-index $(JDK_IMAGE_DIR)/jre/lib/ext/meta-index \
$(JDK_MAN_PAGE_LIST) $(JDK_SAMPLE_TARGETS) \
$(JDK_DB_TARGETS) $(JDK_INCLUDE_TARGETS) \
$(JDKJRE_DOC_TARGETS) $(JDK_DOC_TARGETS) \
$(JDK_INFO_FILE) $(JDKJRE_STRIP_LIST) $(JDK_BIN_STRIP_LIST) \
$(JDK_IMAGE_DIR)/src.zip \
$(JDK_BIN_ISADIR_LINK_TARGETS) $(JDKJRE_BIN_ISADIR_LINK_TARGETS)
jre-overlay-image: $(JRE_OVERLAY_BIN_TARGETS) $(JRE_OVERLAY_LIB_TARGETS) \
$(JRE_OVERLAY_INFO_FILE) $(JRE_OVERLAY_STRIP_LIST)
jdk-overlay-image: $(JDK_OVERLAY_BIN_TARGETS) $(JDKJRE_OVERLAY_BIN_TARGETS) \
$(JDK_OVERLAY_LIB_TARGETS) $(JDKJRE_OVERLAY_LIB_TARGETS) \
$(JDK_OVERLAY_DEMO_TARGETS) $(JDK_OVERLAY_INFO_FILE) \
$(JDKJRE_OVERLAY_STRIP_LIST) $(JDK_OVERLAY_BIN_STRIP_LIST)
ifneq ($(PROFILE), )
PROFILE_IMAGE_JARS := $(filter %.jar, $(JRE_LIB_TARGETS))
PROFILE_IMAGE_JARS_CHECKED := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_jars_checked
$(PROFILE_IMAGE_JARS_CHECKED) : $(PROFILE_IMAGE_JARS)
$(TOOL_CHECKDEPS) $(JRE_IMAGE_DIR) \
$(call profile_name, $(call profile_number, $(PROFILE)))
$(TOUCH) $@
profile-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) \
$(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \
$(JRE_INFO_FILE) $(JRE_STRIP_LIST) $(PROFILE_IMAGE_JARS_CHECKED)
.PHONY: profile-image
endif # Profile
################################################################################
.PHONY: default images jre-image jdk-image

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -31,34 +31,53 @@ include MakeBase.gmk
################################################################################
# Put the libraries here. Different locations for different target apis.
ifeq ($(OPENJDK_TARGET_OS_API), posix)
INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
ifneq ($(OPENJDK_TARGET_OS), windows)
HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)
BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
SA_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent$(OPENJDK_TARGET_CPU_LIBDIR)
else
INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/bin
HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/jre/bin
BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
SA_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent
endif
################################################################################
define CopyDir
$1_SRC_FILES := $(shell $(FIND) $2 -type f -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE),$4) \))
$1_DST_FILES := $$(patsubst $2/%,$3/%,$$($1_SRC_FILES))
HOTSPOT_IMPORT_TARGET_FILES += $$($1_DST_FILES)
$3/%: $2/%
$(ECHO) $(LOG_INFO) Copying $$(@F)
$$(install-file)
endef
################################################################################
#
# Import hotspot
#
HOTSPOT_IMPORT_FILES := $(addprefix $(LIBRARY_PREFIX), jvm.* saproc.* jsig.* sawindbg.* jvm_db.* jvm_dtrace.*) \
Xusage.txt sa-jdi.jar
$(eval $(call CopyDir,HOTSPOT0, $(HOTSPOT_LIB_DIR), $(INSTALL_LIBRARIES_HERE), $(HOTSPOT_IMPORT_FILES)))
$(eval $(call CopyDir,HOTSPOT1, $(HOTSPOT_DIST)/lib, $(JDK_OUTPUTDIR)/lib, $(HOTSPOT_IMPORT_FILES)))
HOTSPOT_BASE_IMPORT_FILES := \
$(addprefix $(LIBRARY_PREFIX), jvm.* jsig.* jvm_db.* jvm_dtrace.*) \
Xusage.txt \
#
HOTSPOT_SA_IMPORT_FILES := \
$(addprefix $(LIBRARY_PREFIX), saproc.* sawindbg.*) \
#
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE, \
SRC := $(HOTSPOT_LIB_DIR), \
DEST := $(BASE_INSTALL_LIBRARIES_HERE), \
FILES := $(shell $(FIND) $(HOTSPOT_LIB_DIR) -type f \
-a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE), $(HOTSPOT_BASE_IMPORT_FILES)) \) )))
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE_JVMLIB, \
SRC := $(HOTSPOT_DIST)/lib, \
DEST := $(BASE_INSTALL_LIBRARIES_HERE), \
FILES := $(wildcard $(HOTSPOT_DIST)/lib/*.lib)))
endif
BASE_TARGETS := $(COPY_HOTSPOT_BASE) $(COPY_HOTSPOT_BASE_JVMLIB)
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_SA, \
SRC := $(HOTSPOT_LIB_DIR), \
DEST := $(SA_INSTALL_LIBRARIES_HERE), \
FILES := $(shell $(FIND) $(HOTSPOT_LIB_DIR) -type f \
-a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE), $(HOTSPOT_SA_IMPORT_FILES)) \) )))
SA_TARGETS := $(COPY_HOTSPOT_SA)
################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig$(SHARED_LIBRARY_SUFFIX).dSYM) \
@ -70,39 +89,39 @@ endif
ifneq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(JVM_VARIANT_SERVER), true)
HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
ifneq (, $(JSIG_DEBUGINFO))
HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
endif
endif
ifeq ($(JVM_VARIANT_CLIENT), true)
HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
ifneq (, $(JSIG_DEBUGINFO))
HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
endif
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
ifeq ($(JVM_VARIANT_MINIMAL1), true)
HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
ifneq (,$(JSIG_DEBUGINFO))
HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
endif
endif
endif
endif
$(INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
$(BASE_INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX): $(BASE_INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(INSTALL_LIBRARIES_HERE)/server/%.dSYM : $(INSTALL_LIBRARIES_HERE)/%.dSYM
$(BASE_INSTALL_LIBRARIES_HERE)/server/%.dSYM : $(BASE_INSTALL_LIBRARIES_HERE)/%.dSYM
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/server/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
$(BASE_INSTALL_LIBRARIES_HERE)/server/%.diz : $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
@ -111,12 +130,12 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
$(RM) $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
$(MV) $@.tmp $@
else
$(INSTALL_LIBRARIES_HERE)/server/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
$(BASE_INSTALL_LIBRARIES_HERE)/server/%.debuginfo: $(BASE_INSTALL_LIBRARIES_HERE)/%.debuginfo
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/server/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
$(BASE_INSTALL_LIBRARIES_HERE)/server/%.diz: $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@).debuginfo
@ -126,18 +145,18 @@ else
$(MV) $@.tmp $@
endif
$(INSTALL_LIBRARIES_HERE)/client/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
$(BASE_INSTALL_LIBRARIES_HERE)/client/%$(SHARED_LIBRARY_SUFFIX): $(BASE_INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(INSTALL_LIBRARIES_HERE)/client/%.dSYM : $(INSTALL_LIBRARIES_HERE)/%.dSYM
$(BASE_INSTALL_LIBRARIES_HERE)/client/%.dSYM : $(BASE_INSTALL_LIBRARIES_HERE)/%.dSYM
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/client/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
$(BASE_INSTALL_LIBRARIES_HERE)/client/%.diz : $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
@ -146,12 +165,12 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
$(RM) $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
$(MV) $@.tmp $@
else
$(INSTALL_LIBRARIES_HERE)/client/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
$(BASE_INSTALL_LIBRARIES_HERE)/client/%.debuginfo: $(BASE_INSTALL_LIBRARIES_HERE)/%.debuginfo
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/client/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
$(BASE_INSTALL_LIBRARIES_HERE)/client/%.diz: $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@).debuginfo
@ -161,18 +180,18 @@ else
$(MV) $@.tmp $@
endif
$(INSTALL_LIBRARIES_HERE)/minimal/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
$(BASE_INSTALL_LIBRARIES_HERE)/minimal/%$(SHARED_LIBRARY_SUFFIX): $(BASE_INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
ifneq ($(OPENJDK_TARGET_OS), macosx)
$(INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
$(BASE_INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo: $(BASE_INSTALL_LIBRARIES_HERE)/%.debuginfo
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/minimal/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
$(BASE_INSTALL_LIBRARIES_HERE)/minimal/%.diz: $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@).debuginfo
@ -182,10 +201,69 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
$(MV) $@.tmp $@
endif
##########################################################################################
################################################################################
hotspot: $(HOTSPOT_IMPORT_TARGET_FILES)
$(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/_the.sa.jar.unpacked: $(HOTSPOT_DIST)/lib/sa-jdi.jar \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
$(ECHO) $(LOG_INFO) Unzipping $(<F)
$(RM) -r $(@D)
$(MKDIR) -p $(@D)
$(CD) $(@D) && $(UNZIP) $< -x META-INF/MANIFEST.MF $(LOG_DEBUG)
# We must move the service provider file out of the way so that
# Gensrc-jdk.jdi.gmk can combine them.
$(MKDIR) -p $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent
$(MV) $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
$(TOUCH) $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
$(TOUCH) $@
all: hotspot
# Declaring this dependency guarantees that _the.sa.services will be rebuilt
# even if zip is already unpacked.
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services: $(HOTSPOT_DIST)/lib/sa-jdi.jar
.PHONY: hotspot all
SA_TARGETS += $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/_the.sa.jar.unpacked \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupCopyFiles,BASE_COPY_LIBS_BIN, \
SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
DEST := $(JDK_OUTPUTDIR)/bin, \
FILES := $(filter-out %.lib, $(BASE_TARGETS))))
$(eval $(call SetupCopyFiles,BASE_COPY_LIBS_LIB, \
SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
DEST := $(JDK_OUTPUTDIR)/lib, \
FILES := $(filter %.lib, $(BASE_TARGETS))))
$(eval $(call SetupCopyFiles,SA_COPY_LIBS, \
SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent, \
DEST := $(JDK_OUTPUTDIR)/lib, \
FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent/%, \
$(SA_TARGETS))))
$(eval $(call SetupCopyFiles,SA_COPY_LIBS, \
SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent, \
DEST := $(JDK_OUTPUTDIR)/bin, \
FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent/%, \
$(SA_TARGETS))))
else
$(eval $(call SetupCopyFiles,BASE_COPY_LIBS, \
SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
DEST := $(JDK_OUTPUTDIR)/lib, \
FILES := $(BASE_TARGETS)))
$(eval $(call SetupCopyFiles,SA_COPY_LIBS, \
SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent, \
DEST := $(JDK_OUTPUTDIR)/lib, \
FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent/%, $(SA_TARGETS))))
endif
################################################################################
all: $(BASE_TARGETS) $(SA_TARGETS) \
$(BASE_COPY_LIBS_BIN) $(BASE_COPY_LIBS_LIB) \
$(BASE_COPY_LIBS) $(SA_COPY_LIBS)
.PHONY: default all

View File

@ -1,63 +0,0 @@
#
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# This was split out from Profiles.gmk to allow GenSrcMisc.gmk to include it
# without attempting to generate lists for output files that don't exist yet
# These are the external names of each profile
PROFILE_NAMES := compact1 compact2 compact3
# The include files use 1,2,3 for simplicity and conciseness. Internally we
# use profile_1, profile_2 and profile_3.
ALL_PROFILES := profile_1 profile_2 profile_3
# This defines targets to generate per-profile Version.java/class files into
# distinct locations
VERSION_JAVA_DIR := sun/misc
VERSION_JAVA_FILE := Version.java
VERSION_JAVA_PATH := $(VERSION_JAVA_DIR)/$(VERSION_JAVA_FILE)
VERSION_CLASS_PATH := $(VERSION_JAVA_PATH:.java=.class)
PROFILE_VERSION_JAVA_TARGETS := $(foreach i, $(ALL_PROFILES), $(subst XXX,$i, $(JDK_OUTPUTDIR)/gen_XXX/$(VERSION_JAVA_PATH)))
PROFILE_VERSION_CLASS_TARGETS := $(foreach i, $(PROFILE_VERSION_JAVA_TARGETS), $(i:.java=.class))
# Function to map from profile designator, profile_1 etc, to its number
profile_number = $(if $(patsubst profile_%,%, $(1)), $(patsubst profile_%,%, $(1)), $(words $(PROFILE_NAMES) extra))
# Function to map from profile number, 1, 2 etc, to the corresponding name
# An invalid number maps to an empty name
profile_name = $(word $(1), $(PROFILE_NAMES))
# Function to isolate a profile number from a Version.java target
# Evaluates to the arg if the arg is not a profile version target
profile_version_number = $(patsubst $(JDK_OUTPUTDIR)/gen_profile_%/$(VERSION_JAVA_PATH), %, $(1))
# Function to go from a profile Version.java target to profile name. If not
# a profile version target then we need a number that maps to an empty name
profile_version_name = $(word $(if $(filter-out $(call profile_version_number, $(1)), $(1)), $(call profile_version_number, $(1)), $(words $(PROFILE_NAMES) extra)), $(PROFILE_NAMES))

View File

@ -1,324 +0,0 @@
#
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
include ProfileNames.gmk
# This defines the include lists for each profile, categorized as lib, bin
# and other. We can use these to define the file lists for each profile
# directly, rather than constructing a set of files to exclude from the
# set of all files. But initially we will stick with generating exclude lists
# as that is how the main build process already works.
include profile-includes.txt
###############################################################################
# Per profile Jar lists
#
# These are the jar files to be built. In some builds these have to be
# imported (signed jars) rather than built.
#
# The incoming lists, eg PROFILE_1_JRE_JARS_FILES, are the jars to be
# included in this profile. They have the jar name relative to the lib
# directory. We have to turn these into targets by adding the
# $(IMAGES_OUTPUTDIR)/lib prefix
#
# Note that some jars may be optional depending on the type of build (jdk vs.
# openjdk) and the platform.
#
# WARNING: incoming lists are currently validated for linux only!
###############################################################################
# These are jar files for which the contents vary depending on the profile
CUSTOM_JARS := rt.jar resources.jar
# This is used in Images.gmk
CUSTOM_PROFILE_JARS := $(addprefix $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/, $(CUSTOM_JARS))
# These are the common jar files built for and included with this profile
# Filter out the custom jars and turn them into targets.
PROFILE_1_JARS := \
$(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(filter-out $(CUSTOM_JARS), $(PROFILE_1_JRE_JAR_FILES)))
PROFILE_2_JARS := \
$(if $(PROFILE_2_JRE_JAR_FILES), $(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(PROFILE_2_JRE_JAR_FILES))) \
$(PROFILE_1_JARS)
PROFILE_3_JARS := \
$(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(PROFILE_3_JRE_JAR_FILES)) \
$(PROFILE_2_JARS)
ifneq ($(ENABLE_JFR), true)
FULL_JRE_JAR_FILES := $(filter-out jfr.jar, $(FULL_JRE_JAR_FILES))
endif
FULL_JRE_JARS := \
$(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(FULL_JRE_JAR_FILES)) \
$(PROFILE_3_JARS)
# The full set of "jar" files needed for a complete JDK (ct.sym and src.zip
# are also included.)
# Note we need to add back the regular form of all the custom profile jars e.g.
# rt.jar and resources.jar that we filtered out above
ALL_JARS := $(FULL_JRE_JARS) \
$(IMAGES_OUTPUTDIR)/lib/rt.jar \
$(IMAGES_OUTPUTDIR)/lib/resources.jar \
$(IMAGES_OUTPUTDIR)/lib/jconsole.jar \
$(IMAGES_OUTPUTDIR)/lib/dt.jar \
$(IMAGES_OUTPUTDIR)/lib/tools.jar \
$(IMAGES_OUTPUTDIR)/lib/ct.sym \
$(IMAGES_OUTPUTDIR)/src.zip
ifeq ($(INCLUDE_SA), true)
ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifndef OPENJDK
ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar
endif
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
endif
ifeq ($(PROFILE), profile_1)
PROFILE_JARS := $(PROFILE_1_JARS)
else ifeq ($(PROFILE), profile_2)
PROFILE_JARS := $(PROFILE_2_JARS)
else ifeq ($(PROFILE), profile_3)
PROFILE_JARS := $(PROFILE_3_JARS)
endif
ifneq ($(PROFILE), )
JARS := $(CUSTOM_PROFILE_JARS) $(PROFILE_JARS)
else
JARS := $(ALL_JARS)
endif
###############################################################################
# JRE contents
###############################################################################
# we don't need to do anything if not building a profile
ifneq ($(PROFILE), )
# Need all files to generate the exclude lists
NEW_ALL_BIN_LIST := $(patsubst $(JDK_OUTPUTDIR)/bin/%,%,$(shell $(FIND) $(JDK_OUTPUTDIR)/bin \( -type f -o -type l \) ! -name "sjavac"))
ALL_JRE_BIN_FILES := \
$(PROFILE_1_JRE_BIN_FILES) \
$(PROFILE_2_JRE_BIN_FILES) \
$(PROFILE_3_JRE_BIN_FILES) \
$(FULL_JRE_BIN_FILES)
NOT_JRE_BIN_FILES := $(filter-out $(ALL_JRE_BIN_FILES), $(NEW_ALL_BIN_LIST))
# Additional exclusions for profile JRE
ifeq ($(PROFILE), profile_1)
NOT_JRE_BIN_FILES += \
$(PROFILE_2_JRE_BIN_FILES) \
$(PROFILE_3_JRE_BIN_FILES) \
$(FULL_JRE_BIN_FILES)
endif
ifeq ($(PROFILE), profile_2)
NOT_JRE_BIN_FILES += \
$(PROFILE_3_JRE_BIN_FILES) \
$(FULL_JRE_BIN_FILES)
endif
ifeq ($(PROFILE), profile_3)
NOT_JRE_BIN_FILES += \
$(FULL_JRE_BIN_FILES)
endif
NOT_JRE_BIN_FILES := $(addprefix $(JDK_OUTPUTDIR)/bin/, $(NOT_JRE_BIN_FILES))
# Need all files to generate the exclude lists
NEW_ALL_LIB_LIST := $(patsubst $(JDK_OUTPUTDIR)/lib/%,%,$(shell $(FIND) $(JDK_OUTPUTDIR)/lib \( -type f -o -type l \) -a ! \( -name "_the*" -o -name "javac_state " \) ))
NEW_ALL_LIB_LIST += $(patsubst $(IMAGES_OUTPUTDIR)/lib/%,%,$(shell $(FIND) $(IMAGES_OUTPUTDIR)/lib \( -type f -o -type l \) -a ! \( -name "_the*" -o -name "javac_state " \) ))
ALL_JRE_LIB_FILES := \
$(PROFILE_1_JRE_LIB_FILES) \
$(PROFILE_2_JRE_LIB_FILES) \
$(PROFILE_3_JRE_LIB_FILES) \
$(FULL_JRE_LIB_FILES)
NOT_JRE_LIB_FILES := $(filter-out $(ALL_JRE_LIB_FILES), $(NEW_ALL_LIB_LIST))
# Although these are NOT JRE lib files we have to filter them from the list
# (ie cause them to be added them back in here) because the logic in
# Images.gmk expects them to be there and handles them differently.
# If we don't, they end up in the wrong place in the JDK image.
# This needs fixing.
NOT_JRE_LIB_FILES := $(filter-out $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(SALIB_NAME), $(NOT_JRE_LIB_FILES))
# Additional exclusions for profile JREs
ifeq ($(PROFILE), profile_1)
NOT_JRE_LIB_FILES += \
$(PROFILE_2_JRE_LIB_FILES) \
$(PROFILE_3_JRE_LIB_FILES) \
$(FULL_JRE_LIB_FILES)
endif
ifeq ($(PROFILE), profile_2)
NOT_JRE_LIB_FILES += \
$(PROFILE_3_JRE_LIB_FILES) \
$(FULL_JRE_LIB_FILES)
endif
ifeq ($(PROFILE), profile_3)
NOT_JRE_LIB_FILES += \
$(FULL_JRE_LIB_FILES)
endif
# Exclude the custom jar files as these will be added back via a special rule
NOT_JRE_LIB_FILES += $(CUSTOM_JARS)
###############################################################################
# Customization of rt.jar file contents
# These are expressed as exclusions from everything found in the
# JDK_OUTPUTDIR/classes directory
###############################################################################
# The main set of excluded types/packages (ie everything not destined to be
# part of rt.jar or resources.jar is captured in the CreateJars.gmk RT_JAR_EXCLUDES
# variable. We add to that for the per-profile exclusion lists
# For each profile we have four variables:
#
# - PROFILE_n_RTJAR_INCLUDE_PACKAGES
#
# This is a package prefix indicating that all classes in that package
# and conditionally its subpackages are included in rt.jar for this profile.
# The subpackages will be included as long as they do not appear in the
# include list of a higher profile
#
# - PROFILE_n_RTJAR_INCLUDE_TYPES
#
# These are specific types that must be included within a package.
# There are two cases:
# - individual types in a package that is otherwise excluded at this
# profile level. The only arises if there are split packages.
#
# - A higher-level package is included in a high profile where a subpackage
# is included in a lower profile. Including the package in the high profile
# would exclude it and all subpackages from the lower profile, so instead
# the classes in the package are listed for that higher profile (as *.class)
#
# These types are explicitly added back into the rt.jar content lists.
#
# - PROFILE_n_RTJAR_EXCLUDE_TYPES
#
# These are specific types that must be excluded even though most of the
# containing package is include. Again this occurs with split packges.
#
# So the exclude list for each profile consists of the include lists
# for all profiles above it, together with any explicitly excluded types.
# This is then combined with the overall RT_JAR_EXCLUDES list (which covers
# things that go into other jar files).
#
# We also have to define the types to be explicitly included. This
# accumulates up the profiles ie profile 3 has to include the types
# that profiles 1 and 2 had to include. This is unnecessary if, for example,
# profile 3 includes the entire package, but it is harmless to add them
# explicitly, and complex to determine if we still need to include them.
#
# Need a way to express:
# for (int i = profile+1; i < 4; i++)
# RT_JAR_EXCLUDES += PROFILE_$i_RTJAR_INCLUDE_PACKAGES
#
# Do it the long way for now
#
# - PROFILE_n_INCLUDE_METAINF_SERVICES
#
# These are META-INF/services/ entries found in resources.jar. Together
# resources.jar and rt.jar hold the contents of the classes directory, (the
# classes in rt.jar and everything else in resources.jar).Hence the
# include/exclude information for resources.jar is tied to that of rt.jar
include profile-rtjar-includes.txt
# Function to expand foo/*.class into the set of classes
# NOTE: Files found by wildcard are stipped of extra $, so call DoubleDollar
# to keep the file names compatible with make.
# But note that if you echo these values they will NOT display as expected.
class_list = $(foreach dir, $(JDK_OUT_CLASSES), $(patsubst $(dir)/%,%, \
$(foreach i, $(1), $(call DoubleDollar, $(wildcard $(dir)/$i)))))
ifeq ($(PROFILE), profile_1)
RT_JAR_EXCLUDES += \
$(call class_list, $(PROFILE_1_RTJAR_EXCLUDE_TYPES)) \
$(PROFILE_2_RTJAR_INCLUDE_PACKAGES) \
$(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES)) \
$(PROFILE_3_RTJAR_INCLUDE_PACKAGES) \
$(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES)) \
$(FULL_JRE_RTJAR_INCLUDE_PACKAGES) \
$(call class_list, $(FULL_JRE_RTJAR_INCLUDE_TYPES))
RT_JAR_INCLUDE_TYPES := \
$(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES))
PROFILE_INCLUDE_METAINF_SERVICES := \
$(PROFILE_1_INCLUDE_METAINF_SERVICES)
endif
ifeq ($(PROFILE), profile_2)
RT_JAR_EXCLUDES += \
$(call class_list, $(PROFILE_2_RTJAR_EXCLUDE_TYPES)) \
$(PROFILE_3_RTJAR_INCLUDE_PACKAGES) \
$(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES)) \
$(FULL_JRE_RTJAR_INCLUDE_PACKAGES) \
$(call class_list, $(FULL_JRE_RTJAR_INCLUDE_TYPES))
RT_JAR_INCLUDE_TYPES := \
$(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES)) \
$(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES))
PROFILE_INCLUDE_METAINF_SERVICES := \
$(PROFILE_1_INCLUDE_METAINF_SERVICES) \
$(PROFILE_2_INCLUDE_METAINF_SERVICES)
endif
ifeq ($(PROFILE), profile_3)
RT_JAR_EXCLUDES += \
$(call class_list, $(PROFILE_3_RTJAR_EXCLUDE_TYPES)) \
$(FULL_JRE_RTJAR_INCLUDE_PACKAGES) \
$(call class_list, $(FULL_JRE_RTJAR_INCLUDE_TYPES))
RT_JAR_INCLUDE_TYPES := \
$(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES)) \
$(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES)) \
$(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES))
PROFILE_INCLUDE_METAINF_SERVICES := \
$(PROFILE_1_INCLUDE_METAINF_SERVICES) \
$(PROFILE_2_INCLUDE_METAINF_SERVICES) \
$(PROFILE_3_INCLUDE_METAINF_SERVICES)
endif
# Filter out non-OpenJDK services
ifdef OPENJDK
EXCLUDED_SERVICES := META-INF/services/javax.script.ScriptEngineFactory
PROFILE_INCLUDE_METAINF_SERVICES := $(filter-out $(EXCLUDED_SERVICES), $(PROFILE_INCLUDE_METAINF_SERVICES))
endif
endif # profile

View File

@ -38,104 +38,124 @@ include SetupJavaCompilers.gmk
ifeq (, $(BUILD_TOOLS_JDK))
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
SETUP := GENERATE_OLDBYTECODE, \
ADD_JAVAC_FLAGS := "-Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes", \
SRC := $(JDK_TOPDIR)/make/src/classes, \
BIN := $(JDK_OUTPUTDIR)/btclasses))
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
COPY := boot.modules ext.modules))
endif
$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/%.template: \
$(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources/%.template: \
$(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/%.template
$(call install-file)
BUILD_TOOLS_JDK += $(foreach i, $(wildcard $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template), $(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i))
BUILD_TOOLS_JDK += $(foreach i, $(wildcard $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template), $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources/$(notdir $i))
# Resource used by CheckDeps tool
$(JDK_OUTPUTDIR)/btclasses/build/tools/deps/refs.allowed: \
$(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/deps/refs.allowed: \
$(JDK_TOPDIR)/make/data/checkdeps/refs.allowed
$(call install-file)
BUILD_TOOLS_JDK += $(JDK_OUTPUTDIR)/btclasses/build/tools/deps/refs.allowed
BUILD_TOOLS_JDK += $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/deps/refs.allowed
# Add a checksum ("jsum") to the end of a text file. Prevents trivial tampering with class lists.
TOOL_ADDJSUM = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_ADDJSUM = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.addjsum.AddJsum
# The buildmetaindex tool creates a meta-index to make core class loaders lazier.
TOOL_BUILDMETAINDEX = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_BUILDMETAINDEX = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.buildmetaindex.BuildMetaIndex
TOOL_COMPILEFONTCONFIG = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_COMPILEFONTCONFIG = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.compilefontconfig.CompileFontConfig
TOOL_COMPILEPROPERTIES = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_COMPILEPROPERTIES = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.compileproperties.CompileProperties
TOOL_JARREORDER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_JARREORDER = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.jarreorder.JarReorder
TOOL_GENERATECHARACTER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_GENERATECHARACTER = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.generatecharacter.GenerateCharacter
TOOL_CHARACTERNAME = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_CHARACTERNAME = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.generatecharacter.CharacterName
TOOL_DTDBUILDER = $(JAVA_SMALL) -Ddtd_home=$(JDK_TOPDIR)/make/data/dtdbuilder \
-Djava.awt.headless=true \
-cp $(JDK_OUTPUTDIR)/btclasses build.tools.dtdbuilder.DTDBuilder
-cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.tools.dtdbuilder.DTDBuilder
TOOL_GENERATEBREAKITERATORDATA = $(JAVA_SMALL) \
-cp $(JDK_OUTPUTDIR)/btclasses \
-cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.generatebreakiteratordata.GenerateBreakIteratorData
TOOL_GENERATECURRENCYDATA = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_GENERATECURRENCYDATA = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.generatecurrencydata.GenerateCurrencyData
TOOL_HASHER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_HASHER = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.hasher.Hasher
TOOL_TZDB = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_TZDB = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.tzdb.TzdbZoneRulesCompiler
TOOL_BLACKLISTED_CERTS = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_BLACKLISTED_CERTS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.blacklistedcertsconverter.BlacklistedCertsConverter
TOOL_MAKEJAVASECURITY = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_MAKEJAVASECURITY = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.makejavasecurity.MakeJavaSecurity
# TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml
# and nbproject/project.properties in the same dir. Needs to be looked at.
TOOL_JDWPGEN = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.jdwpgen.Main
TOOL_JDWPGEN = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.tools.jdwpgen.Main
# TODO: Lots of files in jdk/make/tools/CharsetMapping dir
TOOL_CHARSETMAPPING = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_CHARSETMAPPING = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.charsetmapping.Main $(LOG_INFO)
TOOL_SPP = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp
TOOL_SPP = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.tools.spp.Spp
# Nimbus is used somewhere in the swing build.
TOOL_GENERATENIMBUS = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_GENERATENIMBUS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.generatenimbus.Generator
TOOL_WRAPPERGENERATOR = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_WRAPPERGENERATOR = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.x11wrappergen.WrapperGenerator
TOOL_AWT_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_AWT_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.icondata.awt.ToBin
TOOL_OSX_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_OSX_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.icondata.osxapp.ToBin
TOOL_CLDRCONVERTER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_CLDRCONVERTER = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.cldrconverter.CLDRConverter
TOOL_CHECKDEPS = $(JAVA_SMALL) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \
-cp "$(JDK_OUTPUTDIR)/btclasses$(PATH_SEP)$(JDK_OUTPUTDIR)" \
-cp "$(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes$(PATH_SEP)$(JDK_OUTPUTDIR)" \
build.tools.deps.CheckDeps
TOOL_GENMODULESXML = $(JAVA_SMALL) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \
-cp "$(JDK_OUTPUTDIR)/btclasses$(PATH_SEP)$(JDK_OUTPUTDIR)" \
-cp "$(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes$(PATH_SEP)$(JDK_OUTPUTDIR)" \
build.tools.module.GenJdepsModulesXml
TOOL_IMAGEBUILDER = $(JAVA_SMALL) -Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes \
-cp "$(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes$(PATH_SEP)$(JDK_OUTPUTDIR)" \
build.tools.module.ImageBuilder
##########################################################################################
JIMAGE_PKGS := \
jdk/internal/jimage \
jdk/internal/jrtfs \
#
$(eval $(call SetupJavaCompilation,BUILD_INTERIM_JIMAGE, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
INCLUDES := $(JIMAGE_PKGS), \
EXCLUDES := jdk/internal/jimage/concurrent, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes))
##########################################################################################
# Tools needed on solaris because OBJCOPY is broken.
@ -147,8 +167,8 @@ $(eval $(call SetupNativeCompilation,ADD_GNU_DEBUGLINK, \
CC := $(BUILD_CC), \
LDEXE := $(BUILD_LD), \
LDFLAGS := -lelf, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/add_gnu_debuglink, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/btbin, \
OBJECT_DIR := $(BUILDTOOLS_OUTPUTDIR)/objs/add_gnu_debuglink, \
OUTPUT_DIR := $(BUILDTOOLS_OUTPUTDIR)/bin, \
PROGRAM := add_gnu_debuglink))
$(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS, \
@ -157,11 +177,13 @@ $(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS, \
CC := $(BUILD_CC), \
LDEXE := $(BUILD_LD), \
LDFLAGS := -lelf, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/fix_empty_sec_hdr_flags, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/btbin, \
OBJECT_DIR := $(BUILDTOOLS_OUTPUTDIR)/objs/fix_empty_sec_hdr_flags, \
OUTPUT_DIR := $(BUILDTOOLS_OUTPUTDIR)/bin, \
PROGRAM := fix_empty_sec_hdr_flags))
endif
$(BUILD_TOOLS_JDK): $(BUILD_INTERIM_JIMAGE)
java-tools: $(BUILD_TOOLS_JDK)
all: java-tools

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -37,33 +37,44 @@ JGSS_WIN64_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/jgss-windows-x64-bin.zip
define unzip-sec-file
$(ECHO) Unzipping $(<F)
$(MKDIR) -p $(@D)
$(MKDIR) -p $(@D) $(JDK_OUTPUTDIR)
$(RM) $@
($(CD) $(JDK_OUTPUTDIR) && $(UNZIP) -q -o $< > $@.tmp)
$(MV) $@.tmp $@
endef
$(JDK_OUTPUTDIR)/classes/_the.sec-bin.unzipped: $(SEC_FILES_ZIP)
define unzip-native-sec-file
$(ECHO) Unzipping $(<F)
$(MKDIR) -p $(@D)
$(RM) $@
($(CD) $(SUPPORT_OUTPUTDIR) && $(UNZIP) -q -o $< > $@.tmp)
$(MV) $@.tmp $@
endef
$(SUPPORT_OUTPUTDIR)/_the.sec-bin.unzipped: $(SEC_FILES_ZIP)
$(call unzip-sec-file)
$(JDK_OUTPUTDIR)/classes/_the.sec-windows-bin.unzipped: $(SEC_FILES_WIN_ZIP)
# Trying to unzip both of the sec files at the same time may cause a race
# when creating directories common to both files.
$(SUPPORT_OUTPUTDIR)/_the.sec-windows-bin.unzipped: $(SEC_FILES_WIN_ZIP) \
| $(SUPPORT_OUTPUTDIR)/_the.sec-bin.unzipped
$(call unzip-sec-file)
$(JDK_OUTPUTDIR)/classes/_the.jgss-windows-i586-bin.unzipped: $(JGSS_WIN32_FILES_ZIP)
$(call unzip-sec-file)
$(SUPPORT_OUTPUTDIR)/_the.jgss-windows-i586-bin.unzipped: $(JGSS_WIN32_FILES_ZIP)
$(call unzip-native-sec-file)
$(JDK_OUTPUTDIR)/classes/_the.jgss-windows-x64-bin.unzipped: $(JGSS_WIN64_FILES_ZIP)
$(call unzip-sec-file)
$(SUPPORT_OUTPUTDIR)/_the.jgss-windows-x64-bin.unzipped: $(JGSS_WIN64_FILES_ZIP)
$(call unzip-native-sec-file)
ifneq ($(wildcard $(SEC_FILES_ZIP)), )
IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.sec-bin.unzipped
IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.sec-bin.unzipped
ifeq ($(OPENJDK_TARGET_OS), windows)
IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.sec-windows-bin.unzipped
IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.sec-windows-bin.unzipped
ifeq ($(OPENJDK_TARGET_CPU), x86)
IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-i586-bin.unzipped
IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.jgss-windows-i586-bin.unzipped
endif
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-x64-bin.unzipped
IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.jgss-windows-x64-bin.unzipped
endif
endif
endif

View File

@ -31,7 +31,7 @@ $(eval $(call IncludeCustomExtension, jdk, copy/Copy-java.base.gmk))
#
# Copy exported header files to outputdir.
#
JAVA_BASE_HEADERS := \
TARGETS += \
$(INCLUDE_DST_DIR)/jni.h \
$(INCLUDE_DST_DIR)/jvmti.h \
$(INCLUDE_DST_DIR)/jvmticmlr.h \
@ -55,7 +55,7 @@ ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),)
$(LIB_DST_DIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
$(call install-file)
BASE_CONF_FILES += $(LIB_DST_DIR)/tzmappings
TARGETS += $(LIB_DST_DIR)/tzmappings
endif
@ -63,11 +63,13 @@ endif
# Copy msvcrXX.dll on windows
ifeq ($(OPENJDK_TARGET_OS), windows)
MSVCR_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCR_DLL))
MSVCR_TARGET := $(LIB_DST_DIR)/$(notdir $(MSVCR_DLL))
# Chmod to avoid permission issues if bundles are unpacked on unix platforms.
$(MSVCR_TARGET): $(MSVCR_DLL)
$(call install-file)
$(CHMOD) a+rx $@
TARGETS += $(MSVCR_TARGET)
endif
################################################################################
@ -85,7 +87,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
else
JVMCFG_SRC := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/conf/$(JVMCFG_ARCH)/jvm.cfg
endif
JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
JVMCFG_DIR := $(LIB_DST_DIR)$(OPENJDK_TARGET_CPU_LIBDIR)
JVMCFG := $(JVMCFG_DIR)/jvm.cfg
# To do: should this also support -zeroshark?
@ -143,12 +145,12 @@ else
endif
endif
BASE_CONF_FILES += $(JVMCFG)
TARGETS += $(JVMCFG)
################################################################################
POLICY_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/java.policy
POLICY_DST := $(JDK_OUTPUTDIR)/lib/security/java.policy
POLICY_DST := $(CONF_DST_DIR)/security/java.policy
POLICY_SRC_LIST :=
@ -167,40 +169,34 @@ $(POLICY_DST): $(POLICY_SRC_LIST)
$(foreach f,$(POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
$(MV) $@.tmp $@
BASE_CONF_FILES += $(POLICY_DST)
TARGETS += $(POLICY_DST)
################################################################################
ifeq ($(CACERTS_FILE), )
CACERTS_FILE := $(JDK_TOPDIR)/src/java.base/share/conf/security/cacerts
endif
CACERTS_DST := $(JDK_OUTPUTDIR)/lib/security/cacerts
CACERTS_DST := $(LIB_DST_DIR)/security/cacerts
$(CACERTS_DST): $(CACERTS_FILE)
$(call install-file)
BASE_CONF_FILES += $(CACERTS_DST)
TARGETS += $(CACERTS_DST)
################################################################################
$(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/java.base/share/conf/net.properties
$(CONF_DST_DIR)/net.properties: $(JDK_TOPDIR)/src/java.base/share/conf/net.properties
$(ECHO) $(LOG_INFO) Copying $(@F)
$(call install-file)
NET_CONF_FILES += $(JDK_OUTPUTDIR)/lib/net.properties
TARGETS += $(CONF_DST_DIR)/net.properties
ifeq ($(OPENJDK_TARGET_OS), solaris)
$(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template: $(JDK_TOPDIR)/src/java.base/${OPENJDK_TARGET_OS_API_DIR}/conf/sdp/sdp.conf.template
$(CONF_DST_DIR)/sdp/sdp.conf.template: $(JDK_TOPDIR)/src/java.base/${OPENJDK_TARGET_OS_API_DIR}/conf/sdp/sdp.conf.template
$(ECHO) $(LOG_INFO) Copying $(@F)
$(call install-file)
NET_CONF_FILES += $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template
TARGETS += $(CONF_DST_DIR)/sdp/sdp.conf.template
endif
################################################################################
java.base: $(BASE_CONF_FILES) $(NET_CONF_FILES) $(JAVA_BASE_HEADERS) $(MSVCR_TARGET)
all: java.base
.PHONY: all java.base

View File

@ -29,7 +29,7 @@ $(eval $(call IncludeCustomExtension, jdk, copy/Copy-java.desktop.gmk))
################################################################################
JAVA_DESKTOP_HEADERS := \
TARGETS += \
$(INCLUDE_DST_DIR)/jawt.h \
$(INCLUDE_DST_OS_DIR)/jawt_md.h \
#
@ -62,9 +62,9 @@ ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
#TODO: rework this to avoid hardcoding library name in the makefile
#
ifeq ($(OPENJDK_TARGET_OS), windows)
FREETYPE_TARGET_LIB := $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
FREETYPE_TARGET_LIB := $(LIB_DST_DIR)/$(call SHARED_LIBRARY,freetype)
else
FREETYPE_TARGET_LIB := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
FREETYPE_TARGET_LIB := $(LIB_DST_DIR)$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
endif
# We can't use $(install-file) in this rule because it preserves symbolic links and
@ -75,14 +75,16 @@ ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
ifeq ($(OPENJDK_BUILD_OS), windows)
$(CHMOD) +rx $@
endif
TARGETS += $(FREETYPE_TARGET_LIB)
endif
################################################################################
$(JDK_OUTPUTDIR)/lib/sound.properties: $(JDK_TOPDIR)/src/java.desktop/share/conf/sound.properties
$(CONF_DST_DIR)/sound.properties: $(JDK_TOPDIR)/src/java.desktop/share/conf/sound.properties
$(call install-file)
DESKTOP_CONF_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties
TARGETS += $(CONF_DST_DIR)/sound.properties
################################################################################
#
@ -95,7 +97,7 @@ PSFONTPROPFILE_TARGET_FILES := $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIB_DST_DIR),
$(LIB_DST_DIR)/%: $(PSFONTPROPFILE_SRC_DIR)/%
$(call install-file)
DESKTOP_CONF_FILES += $(PSFONTPROPFILE_TARGET_FILES)
TARGETS += $(PSFONTPROPFILE_TARGET_FILES)
################################################################################
#
@ -113,7 +115,7 @@ CURSORS_OPENJDK_TARGET_OS_LIB_SRC := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TA
$(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_OPENJDK_TARGET_OS_LIB_SRC)/cursors.properties
$(call install-file)
DESKTOP_CONF_FILES += $(CURSORS_DEST_DIR)/cursors.properties
TARGETS += $(CURSORS_DEST_DIR)/cursors.properties
CURSORS_LIB_SRC := $(JDK_TOPDIR)/src/java.desktop/share/conf/images/cursors
ifeq ($(OPENJDK_TARGET_OS), windows)
@ -126,12 +128,6 @@ CURSORS_TARGET_FILES := $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS
$(CURSORS_DEST_DIR)/%: $(CURSORS_LIB_SRC)/%
$(call install-file)
DESKTOP_CONF_FILES += $(CURSORS_TARGET_FILES)
TARGETS += $(CURSORS_TARGET_FILES)
################################################################################
java.desktop: $(DESKTOP_CONF_FILES) $(FREETYPE_TARGET_LIB) $(JAVA_DESKTOP_HEADERS)
all: java.desktop
.PHONY: all java.desktop

View File

@ -29,15 +29,9 @@ include CopyCommon.gmk
LOGGING_LIB_SRC := $(JDK_TOPDIR)/src/java.logging/share/conf
$(LIB_DST_DIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
$(CONF_DST_DIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
$(call install-file)
LOGGING_CONF_FILES := $(LIB_DST_DIR)/logging.properties
TARGETS := $(CONF_DST_DIR)/logging.properties
################################################################################
java.logging: $(LOGGING_CONF_FILES)
all: java.logging
.PHONY: all java.logging

View File

@ -27,30 +27,24 @@ include CopyCommon.gmk
################################################################################
MGMT_LIBDIR := $(LIB_DST_DIR)/management
MGMT_LIB_SRC := $(JDK_TOPDIR)/src/java.management/share/conf
MGMT_SRC_FILES := $(wildcard $(MGMT_LIB_SRC)/*)
MGMT_TARGET_FILES := $(subst $(MGMT_LIB_SRC),$(MGMT_LIBDIR),$(MGMT_SRC_FILES))
MGMT_CONF_DIR := $(CONF_DST_DIR)/management
MGMT_CONF_SRC := $(JDK_TOPDIR)/src/java.management/share/conf
MGMT_SRC_FILES := $(wildcard $(MGMT_CONF_SRC)/*)
MGMT_TARGET_FILES := $(subst $(MGMT_CONF_SRC),$(MGMT_CONF_DIR),$(MGMT_SRC_FILES))
$(MGMT_LIBDIR)/management.properties: $(MGMT_LIB_SRC)/management.properties
$(MGMT_CONF_DIR)/management.properties: $(MGMT_CONF_SRC)/management.properties
$(call install-file)
$(CHMOD) 644 $@
# this file has different permissions...don't know why...
$(MGMT_LIBDIR)/jmxremote.access: $(MGMT_LIB_SRC)/jmxremote.access
$(MGMT_CONF_DIR)/jmxremote.access: $(MGMT_CONF_SRC)/jmxremote.access
$(call install-file)
$(CHMOD) 644 $@
$(MGMT_LIBDIR)/%: $(MGMT_LIB_SRC)/%
$(MGMT_CONF_DIR)/%: $(MGMT_CONF_SRC)/%
$(call install-file)
$(CHMOD) 444 $@
MANAGEMENT_CONF_FILES := $(MGMT_TARGET_FILES)
TARGETS := $(MGMT_TARGET_FILES)
################################################################################
java.management: $(MANAGEMENT_CONF_FILES)
all: java.management
.PHONY: all java.management

View File

@ -31,20 +31,15 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
SUNPKCS11_CFG_SRC := \
$(JDK_TOPDIR)/src/jdk.crypto.pkcs11/solaris/conf/security/sunpkcs11-solaris.cfg
SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
SUNPKCS11_CFG_DST := $(CONF_DST_DIR)/security/sunpkcs11-solaris.cfg
$(SUNPKCS11_CFG_DST): $(SUNPKCS11_CFG_SRC)
$(call install-file)
SECURITY_PKCS11_CONF_FILES += $(SUNPKCS11_CFG_DST)
TARGETS := $(SUNPKCS11_CFG_DST)
endif
################################################################################
jdk.crypto.pkcs11: $(SECURITY_PKCS11_CONF_FILES)
all: jdk.crypto.pkcs11
.PHONY: all jdk.crypto.pkcs11

View File

@ -30,20 +30,13 @@ include CopyCommon.gmk
ifeq ($(OPENJDK_TARGET_OS), solaris)
UCRYPTO_CFG_SRC := $(JDK_TOPDIR)/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg
UCRYPTO_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/ucrypto-solaris.cfg
UCRYPTO_CFG_DST := $(CONF_DST_DIR)/security/ucrypto-solaris.cfg
$(UCRYPTO_CFG_DST): $(UCRYPTO_CFG_SRC)
$(call install-file)
SECURITY_UCRYPTO_CONF_FILES += $(UCRYPTO_CFG_DST)
TARGETS += $(UCRYPTO_CFG_DST)
endif
################################################################################
jdk.crypto.ucrypto: $(SECURITY_UCRYPTO_CONF_FILES)
all: jdk.crypto.ucrypto
.PHONY: all jdk.crypto.ucrypto

View File

@ -32,12 +32,6 @@ HPROF_SRC := $(JDK_TOPDIR)/src/jdk.hprof.agent/share/native/libhprof/jvm.hprof.t
$(LIB_DST_DIR)/jvm.hprof.txt: $(HPROF_SRC)
$(call install-file)
HPROF_CONF_FILES := $(LIB_DST_DIR)/jvm.hprof.txt
TARGETS := $(LIB_DST_DIR)/jvm.hprof.txt
################################################################################
jdk.hprof.agent: $(HPROF_CONF_FILES)
all: jdk.hprof.agent
.PHONY: all jdk.hprof.agent

View File

@ -27,16 +27,9 @@ include CopyCommon.gmk
################################################################################
JDK_DEBUG_AGENT_HEADERS := $(INCLUDE_DST_DIR)/jdwpTransport.h
TARGETS := $(INCLUDE_DST_DIR)/jdwpTransport.h
$(INCLUDE_DST_DIR)/%.h: $(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/include/%.h
$(call install-file)
################################################################################
jdk.jdwp.agent: $(JDK_DEBUG_AGENT_HEADERS)
all: jdk.jdwp.agent
.PHONY: all jdk.jdwp.agent

View File

@ -23,13 +23,9 @@
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
INCLUDE_DST_DIR := $(JDK_OUTPUTDIR)/include
LIB_DST_DIR := $(JDK_OUTPUTDIR)/lib
INCLUDE_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE)
LIB_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)
CONF_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE)
INCLUDE_DST_OS_DIR := $(INCLUDE_DST_DIR)/$(OPENJDK_TARGET_OS)

View File

@ -29,15 +29,14 @@ include GendataCommon.gmk
$(eval $(call IncludeCustomExtension, jdk, gendata/Gendata-java.base.gmk))
include GendataBreakIterator.gmk
GENDATA += $(BREAK_ITERATOR)
include GendataTZDB.gmk
GENDATA += $(GENDATA_TZDB)
include GendataBlacklistedCerts.gmk
GENDATA += $(GENDATA_BLACKLISTED_CERTS)
##########################################################################################
include GendataPolicyJars.gmk
################################################################################
GENDATA_UNINAME := $(JDK_OUTPUTDIR)/modules/java.base/java/lang/uniName.dat
@ -45,9 +44,9 @@ $(GENDATA_UNINAME): $(JDK_TOPDIR)/make/data/unicodedata/UnicodeData.txt $(BUILD_
$(MKDIR) -p $(@D)
$(TOOL_CHARACTERNAME) $< $@
GENDATA += $(GENDATA_UNINAME)
TARGETS += $(GENDATA_UNINAME)
##########################################################################################
################################################################################
GENDATA_CURDATA := $(JDK_OUTPUTDIR)/modules/java.base/java/util/currency.data
@ -58,12 +57,12 @@ $(GENDATA_CURDATA): $(JDK_TOPDIR)/make/data/currency/CurrencyData.properties $(B
$(MV) $@.tmp $@
$(CHMOD) 444 $@
GENDATA += $(GENDATA_CURDATA)
TARGETS += $(GENDATA_CURDATA)
##########################################################################################
################################################################################
GENDATA_JAVA_SECURITY_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/java.security
GENDATA_JAVA_SECURITY := $(JDK_OUTPUTDIR)/lib/security/java.security
GENDATA_JAVA_SECURITY := $(SUPPORT_OUTPUTDIR)/modules_conf/java.base/security/java.security
# RESTRICTED_PKGS_SRC is optionally set in custom extension for this makefile
@ -73,14 +72,17 @@ $(GENDATA_JAVA_SECURITY): $(BUILD_TOOLS) $(GENDATA_JAVA_SECURITY_SRC) $(RESTRICT
$(TOOL_MAKEJAVASECURITY) $(GENDATA_JAVA_SECURITY_SRC) $@ $(OPENJDK_TARGET_OS) \
$(RESTRICTED_PKGS_SRC) || exit 1
GENDATA += $(GENDATA_JAVA_SECURITY)
TARGETS += $(GENDATA_JAVA_SECURITY)
##########################################################################################
################################################################################
$(GENDATA): $(BUILD_TOOLS_JDK)
$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/classlist: \
$(JDK_TOPDIR)/make/data/classlist/classlist.$(OPENJDK_TARGET_OS)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(TOOL_ADDJSUM) $< $@.tmp
$(MV) $@.tmp $@
java.base: $(GENDATA)
TARGETS += $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/classlist
all: java.base
.PHONY: all java.base
################################################################################

View File

@ -26,15 +26,5 @@
include GendataCommon.gmk
include GendataFontConfig.gmk
GENDATA += $(GENDATA_FONT_CONFIG)
include GendataHtml32dtd.gmk
GENDATA += $(GENDATA_HTML32DTD)
$(GENDATA): $(BUILD_TOOLS_JDK)
java.desktop: $(GENDATA)
all: $(GENDATA)
.PHONY: all java.desktop

View File

@ -27,20 +27,16 @@ include GendataCommon.gmk
$(eval $(call IncludeCustomExtension, jdk, gendata/Gendata-jdk.dev.gmk))
GENDATA := $(JDK_OUTPUTDIR)/modules/jdk.dev/com/sun/tools/jdeps/resources/jdeps-modules.xml
METADATA_FILES += $(TOPDIR)/modules.xml
JDEPS_MODULES_XML := $(JDK_OUTPUTDIR)/modules/jdk.dev/com/sun/tools/jdeps/resources/jdeps-modules.xml
MODULES_XML += $(TOPDIR)/modules.xml
#
# Generate modules.xml for jdeps to use
# It augments $(TOPDIR)/modules.xml to include module membership
#
$(GENDATA): $(BUILD_TOOLS_JDK) $(METADATA_FILES)
$(JDEPS_MODULES_XML): $(BUILD_TOOLS_JDK) $(MODULES_XML)
$(MKDIR) -p $(@D)
$(RM) $@
$(TOOL_GENMODULESXML) -o $@ -mp $(JDK_OUTPUTDIR)/modules $(METADATA_FILES)
$(TOOL_GENMODULESXML) -o $@ -mp $(JDK_OUTPUTDIR)/modules $(MODULES_XML)
jdk.dev: $(GENDATA)
all: $(GENDATA)
.PHONY: all jdk.dev
TARGETS += $(JDEPS_MODULES_XML)

View File

@ -24,7 +24,7 @@
#
GENDATA_BLACKLISTED_CERTS_SRC := $(JDK_TOPDIR)/make/data/blacklistedcertsconverter/blacklisted.certs.pem
GENDATA_BLACKLISTED_CERTS := $(JDK_OUTPUTDIR)/lib/security/blacklisted.certs
GENDATA_BLACKLISTED_CERTS := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/security/blacklisted.certs
ifndef OPENJDK
GENDATA_BLACKLISTED_CERTS_SRC += $(wildcard $(JDK_TOPDIR)/make/closed/data/blacklistedcertsconverter/blacklisted.certs.pem)
@ -34,3 +34,5 @@ $(GENDATA_BLACKLISTED_CERTS): $(BUILD_TOOLS) $(GENDATA_BLACKLISTED_CERTS_SRC)
$(ECHO) "Generating blacklisted certs"
$(MKDIR) -p $(@D)
($(CAT) $(GENDATA_BLACKLISTED_CERTS_SRC) | $(TOOL_BLACKLISTED_CERTS) > $@) || exit 1
TARGETS += $(GENDATA_BLACKLISTED_CERTS)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -33,17 +33,16 @@
# They are used at JDK build phase in order to create $(BIFILES) which
# are used on runtime instead.
#
TEXT_SRCDIR = $(JDK_TOPDIR)/src/java.base/share/classes \
TEXT_SRCDIR := $(JDK_TOPDIR)/src/java.base/share/classes \
$(JDK_TOPDIR)/src/jdk.localedata/share/classes
TEXT_PKG = sun/text/resources
TEXT_SOURCES = $(TEXT_PKG)/BreakIteratorRules.java \
TEXT_PKG := sun/text/resources
TEXT_SOURCES := $(TEXT_PKG)/BreakIteratorRules.java \
$(TEXT_PKG)/BreakIteratorInfo.java \
$(TEXT_PKG)/th/BreakIteratorRules_th.java \
$(TEXT_PKG)/th/BreakIteratorInfo_th.java
# Generate BreakIteratorData
BREAK_ITERATOR_DIR = $(JDK_OUTPUTDIR)/break_iterator
BREAK_ITERATOR_CLASSES = $(BREAK_ITERATOR_DIR)/classes
BREAK_ITERATOR_CLASSES := $(BUILDTOOLS_OUTPUTDIR)/break_iterator_classes
# JAVAC_SOURCE_PATH_OVERRIDE is set to isolate the compile to just those
# two files in that directory and not get anything implicit from
@ -62,16 +61,16 @@ $(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR, \
# Generate data resource files.
# input
UNICODEDATA = $(JDK_TOPDIR)/make/data/unicodedata/UnicodeData.txt
UNICODEDATA := $(JDK_TOPDIR)/make/data/unicodedata/UnicodeData.txt
# output
BASE_DATA_PKG_DIR = $(JDK_OUTPUTDIR)/modules/java.base/sun/text/resources
SL_DATA_PKG_DIR = $(JDK_OUTPUTDIR)/modules/jdk.localedata/sun/text/resources
BIFILES = $(BASE_DATA_PKG_DIR)/CharacterBreakIteratorData \
BASE_DATA_PKG_DIR := $(JDK_OUTPUTDIR)/modules/java.base/sun/text/resources
SL_DATA_PKG_DIR := $(JDK_OUTPUTDIR)/modules/jdk.localedata/sun/text/resources
BIFILES := $(BASE_DATA_PKG_DIR)/CharacterBreakIteratorData \
$(BASE_DATA_PKG_DIR)/WordBreakIteratorData \
$(BASE_DATA_PKG_DIR)/LineBreakIteratorData \
$(BASE_DATA_PKG_DIR)/SentenceBreakIteratorData
BIFILES_TH = $(SA_DATA_PKG_DIR)/th/WordBreakIteratorData_th \
BIFILES_TH := $(SA_DATA_PKG_DIR)/th/WordBreakIteratorData_th \
$(SA_DATA_PKG_DIR)/th/LineBreakIteratorData_th
$(BIFILES): $(BASE_DATA_PKG_DIR)/_the.bifiles
@ -97,5 +96,4 @@ $(SL_DATA_PKG_DIR)/_the.bifiles_th: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKI
-language th
$(TOUCH) $@
BREAK_ITERATOR += $(BIFILES) $(BIFILES_TH)
TARGETS += $(BIFILES) $(BIFILES_TH)

View File

@ -23,10 +23,6 @@
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include SetupJavaCompilers.gmk
# We need the tools.

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
# questions.
#
GENDATA_FONT_CONFIG_DST := $(JDK_OUTPUTDIR)/lib
GENDATA_FONT_CONFIG_DST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)
GENDATA_FONT_CONFIG_DATA_DIR := $(JDK_TOPDIR)/make/data/fontconfig
ifndef OPENJDK
@ -42,7 +42,7 @@ $(GENDATA_FONT_CONFIG_DST)/%.src: \
$(GENDATA_FONT_CONFIG_DST)/%.bfc: \
$(GENDATA_FONT_CONFIG_DATA_DIR)/$(OPENJDK_TARGET_OS).%.properties \
$(BUILD_TOOLS)
$(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(RM) $@
$(TOOL_COMPILEFONTCONFIG) $< $@
@ -54,5 +54,5 @@ GENDATA_FONT_CONFIGS := $(patsubst $(GENDATA_FONT_CONFIG_DATA_DIR)/$(OPENJDK_TAR
GENDATA_BFONT_CONFIGS := $(patsubst $(GENDATA_FONT_CONFIG_DATA_DIR)/$(OPENJDK_TARGET_OS).%.properties, \
$(GENDATA_FONT_CONFIG_DST)/%.bfc, $(GENDATA_FONT_CONFIG_SRC_FILES))
GENDATA_FONT_CONFIG := $(GENDATA_FONT_CONFIGS) $(GENDATA_BFONT_CONFIGS)
TARGETS := $(GENDATA_FONT_CONFIGS) $(GENDATA_BFONT_CONFIGS)

View File

@ -26,10 +26,10 @@
GENDATA_HTML32DTD :=
HTML32DTD = $(JDK_OUTPUTDIR)/modules/java.desktop/javax/swing/text/html/parser/html32.bdtd
$(HTML32DTD): $(BUILD_TOOLS)
$(HTML32DTD): $(BUILD_TOOLS_JDK)
$(ECHO) "Generating HTML DTD file"
$(MKDIR) -p $(@D)
$(RM) $@
($(TOOL_DTDBUILDER) $(LOG_INFO) html32 > $@) || exit 1
GENDATA_HTML32DTD += $(HTML32DTD)
TARGETS += $(HTML32DTD)

View File

@ -32,14 +32,15 @@ include JavaCompilation.gmk
################################################################################
US_EXPORT_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar
US_EXPORT_POLICY_JAR_DST := \
$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/security/US_export_policy.jar
ifneq ($(BUILD_CRYPTO), no)
US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/US_export_policy.jar
US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy.jar
US_EXPORT_POLICY_JAR_LIMITED := \
$(SUPPORT_OUTPUTDIR)/jce/policy/limited/US_export_policy.jar
US_EXPORT_POLICY_JAR_UNLIMITED := \
$(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/US_export_policy.jar
ifndef OPENJDK
#
@ -53,7 +54,8 @@ ifneq ($(BUILD_CRYPTO), no)
# file in their environment. Users/deployers simply need to overwrite
# the files. Consult README.txt (below) for more info.
#
UNLIMITED_POLICY_DIR := $(JDK_OUTPUTDIR)/lib/security/unlimited_policy
UNLIMITED_POLICY_DIR := \
$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/security/unlimited_policy
endif
#
@ -68,7 +70,7 @@ ifneq ($(BUILD_CRYPTO), no)
US_EXPORT_POLICY_JAR_SRC_DIR := \
$(JDK_TOPDIR)/make/data/cryptopolicy/unlimited
US_EXPORT_POLICY_JAR_TMP := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy_jar.tmp
$(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/US_export_policy_jar.tmp
$(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
$(install-file)
@ -80,32 +82,31 @@ ifneq ($(BUILD_CRYPTO), no)
$(US_EXPORT_POLICY_JAR_DEPS), \
SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
SUFFIXES := .policy, \
JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED), \
JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
SKIP_METAINF := true))
$(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED): \
$(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
$(US_EXPORT_POLICY_JAR_LIMITED): \
$(US_EXPORT_POLICY_JAR_UNLIMITED)
$(ECHO) $(LOG_INFO) \
Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED) \
$(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED) $(US_EXPORT_POLICY_JAR_UNLIMITED)
endif
ifeq ($(UNLIMITED_CRYPTO), true)
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED)
$(install-file)
else
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED)
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED)
$(install-file)
endif
ifndef OPENJDK
ifneq ($(UNLIMITED_CRYPTO), true)
$(UNLIMITED_POLICY_DIR)/US_export_policy.jar: \
$(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
$(US_EXPORT_POLICY_JAR_UNLIMITED)
$(install-file)
TARGETS += $(UNLIMITED_POLICY_DIR)/US_export_policy.jar
endif
@ -115,23 +116,24 @@ POLICY_JARS += $(US_EXPORT_POLICY_JAR_DST)
################################################################################
LOCAL_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/local_policy.jar
LOCAL_POLICY_JAR_DST := \
$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/security/local_policy.jar
ifneq ($(BUILD_CRYPTO), no)
LOCAL_POLICY_JAR_LIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy.jar
LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy.jar
LOCAL_POLICY_JAR_LIMITED := \
$(SUPPORT_OUTPUTDIR)/jce/policy/limited/local_policy.jar
LOCAL_POLICY_JAR_UNLIMITED := \
$(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/local_policy.jar
#
# TODO fix so that SetupArchive does not write files into SRCS
# then we don't need this extra copying
#
LOCAL_POLICY_JAR_LIMITED_TMP := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy_jar.tmp
$(SUPPORT_OUTPUTDIR)/jce/policy/limited/local_policy_jar.tmp
LOCAL_POLICY_JAR_UNLIMITED_TMP := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy_jar.tmp
$(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/local_policy_jar.tmp
$(LOCAL_POLICY_JAR_LIMITED_TMP)/%: \
$(JDK_TOPDIR)/make/data/cryptopolicy/limited/%
@ -146,7 +148,7 @@ ifneq ($(BUILD_CRYPTO), no)
$(LOCAL_POLICY_JAR_LIMITED_TMP)/default_local.policy, \
SRCS := $(LOCAL_POLICY_JAR_LIMITED_TMP), \
SUFFIXES := .policy, \
JAR := $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED), \
JAR := $(LOCAL_POLICY_JAR_LIMITED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: limited, \
SKIP_METAINF := true))
@ -154,12 +156,11 @@ ifneq ($(BUILD_CRYPTO), no)
$(LOCAL_POLICY_JAR_UNLIMITED_TMP)/default_local.policy, \
SRCS := $(LOCAL_POLICY_JAR_UNLIMITED_TMP), \
SUFFIXES := .policy, \
JAR := $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED), \
JAR := $(LOCAL_POLICY_JAR_UNLIMITED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
SKIP_METAINF := true))
TARGETS += $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) \
$(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
TARGETS += $(LOCAL_POLICY_JAR_LIMITED) $(LOCAL_POLICY_JAR_UNLIMITED)
ifndef OPENJDK
ifneq ($(UNLIMITED_CRYPTO), true)
@ -173,17 +174,17 @@ ifneq ($(BUILD_CRYPTO), no)
endif
ifeq ($(UNLIMITED_CRYPTO), true)
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED)
$(install-file)
else
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED)
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED)
$(install-file)
endif
ifndef OPENJDK
ifneq ($(UNLIMITED_CRYPTO), true)
$(UNLIMITED_POLICY_DIR)/local_policy.jar: \
$(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
$(LOCAL_POLICY_JAR_UNLIMITED)
$(install-file)
TARGETS += $(UNLIMITED_POLICY_DIR)/local_policy.jar
endif
@ -194,5 +195,3 @@ TARGETS += $(POLICY_JARS)
################################################################################
all: $(TARGETS)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -32,11 +32,11 @@ TZDATA_DIR := $(JDK_TOPDIR)/make/data/tzdata
TZDATA_TZFILE := africa antarctica asia australasia europe northamerica pacificnew southamerica backward etcetera gmt jdk11_backward
TZDATA_TZFILES := $(addprefix $(TZDATA_DIR)/,$(TZDATA_TZFILE))
GENDATA_TZDB_DAT := $(JDK_OUTPUTDIR)/lib/tzdb.dat
GENDATA_TZDB_DAT := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/tzdb.dat
$(GENDATA_TZDB_DAT): $(TZDATA_TZFILES)
$(RM) $(GENDATA_TZDB_DAT)
$(MKDIR) -p $(@D)
$(TOOL_TZDB) -srcdir $(TZDATA_DIR) -dstfile $(GENDATA_TZDB_DAT) $(TZDATA_TZFILE)
GENDATA_TZDB += $(GENDATA_TZDB_DAT)
TARGETS += $(GENDATA_TZDB_DAT)

View File

@ -30,7 +30,7 @@ include GensrcCommon.gmk
# Generate files using the charsetmapping tool
#
CHARSET_DATA_DIR := $(JDK_TOPDIR)/make/data/charsetmapping
CHARSET_GENSRC_JAVA_DIR_CS := $(JDK_OUTPUTDIR)/gensrc/jdk.charsets/sun/nio/cs/ext
CHARSET_GENSRC_JAVA_DIR_CS := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.charsets/sun/nio/cs/ext
CHARSET_DONE_CS := $(CHARSET_GENSRC_JAVA_DIR_CS)/_the.charsetmapping
CHARSET_COPYRIGHT_HEADER := $(JDK_TOPDIR)/make/src/classes/build/tools/charsetmapping
CHARSET_TEMPLATES := \

View File

@ -31,7 +31,9 @@ include GensrcProperties.gmk
$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \
$(filter %.properties, \
$(call CacheFind, $(JDK_TOPDIR)/src/jdk.dev/share/classes/sun/tools/jar/resources)), \
$(call CacheFind, \
$(JDK_TOPDIR)/src/jdk.dev/share/classes/jdk/tools/jimage/resources \
$(JDK_TOPDIR)/src/jdk.dev/share/classes/sun/tools/jar/resources)), \
ListResourceBundle))
TARGETS += $(COMPILE_PROPERTIES)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -28,7 +28,7 @@ include GensrcCommon.gmk
##########################################################################################
# Version file for jconsole
$(JDK_OUTPUTDIR)/gensrc/jdk.jconsole/sun/tools/jconsole/Version.java: \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jconsole/sun/tools/jconsole/Version.java: \
$(JDK_TOPDIR)/src/jdk.jconsole/share/classes/sun/tools/jconsole/Version.java.template
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
@ -36,7 +36,7 @@ $(JDK_OUTPUTDIR)/gensrc/jdk.jconsole/sun/tools/jconsole/Version.java: \
$(SED) -e 's/@@jconsole_version@@/$(FULL_VERSION)/g' $< > $@.tmp
$(MV) $@.tmp $@
GENSRC_JDK_JCONSOLE += $(JDK_OUTPUTDIR)/gensrc/jdk.jconsole/sun/tools/jconsole/Version.java
GENSRC_JDK_JCONSOLE += $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jconsole/sun/tools/jconsole/Version.java
jdk.jconsole: $(GENSRC_JDK_JCONSOLE)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -30,27 +30,34 @@ include GensrcCommon.gmk
# and a JDWPCommands.h C-header file.
JDWP_SPEC_FILE := $(JDK_TOPDIR)/make/data/jdwp/jdwp.spec
HEADER_FILE := $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
JAVA_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java
$(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h: $(JDWP_SPEC_FILE)
# Both the header and java file are created using the same recipe. By declaring
# this rule and adding header file to dependencies for java file, both are
# rebuilt if either is missing
$(HEADER_FILE): $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK)
$(JDK_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java: \
$(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK)
# Touch the target of this rule at the end to avoid triggering false rebuilds
$(JAVA_FILE): $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK) $(HEADER_FILE)
$(MKDIR) -p $(@D)
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_jdwp_headers
$(RM) $@ $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
$(MKDIR) -p $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent
$(RM) $@ $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
$(ECHO) $(LOG_INFO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
$(TOOL_JDWPGEN) $< -jdi $@ -include $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
$(TOOL_JDWPGEN) $< -jdi $@ -include \
$(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
$(TOUCH) $@
$(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html: $(JDWP_SPEC_FILE) \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html: $(JDWP_SPEC_FILE) \
$(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(RM) $@
$(ECHO) $(LOG_INFO) Creating $(@F) from jdwp.spec
$(TOOL_JDWPGEN) $< -doc $@
GENSRC_JDWP := $(JDK_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java \
$(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h \
$(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html
GENSRC_JDWP := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java \
$(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
GENSRC_JDK_JDI += $(GENSRC_JDWP)
################################################################################
@ -61,11 +68,18 @@ define process-provider
endef
# Filter com.sun.jdi.connect.Connector
$(JDK_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector: \
$(JDK_TOPDIR)/src/jdk.jdi/share/classes/META-INF/services/com.sun.jdi.connect.Connector
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector: \
$(JDK_TOPDIR)/src/jdk.jdi/share/classes/META-INF/services/com.sun.jdi.connect.Connector \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
$(process-provider)
GENSRC_JDK_JDI += $(JDK_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector
# Copy the same service file into jdk.hotspot.agent so that they are kept the same.
$(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector: \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector
$(install-file)
GENSRC_JDK_JDI += $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \
$(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector
################################################################################

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -25,8 +25,7 @@
GENSRC_BUFFER :=
GENSRC_BUFFER_TMP := $(JDK_OUTPUTDIR)/gensrc
GENSRC_BUFFER_DST := $(JDK_OUTPUTDIR)/gensrc/java.base/java/nio
GENSRC_BUFFER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio
GENSRC_BUFFER_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/java/nio

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
CLDRVERSION := 21.0.1
CLDRSRCDIR := $(JDK_TOPDIR)/src/jdk.localedata/share/classes/sun/util/cldr/resources/$(subst .,_,$(CLDRVERSION))
GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc/jdk.localedata
GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata
CLDR_METAINFO_FILE := $(GENSRC_DIR)/sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo.java

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,7 @@
#
#
# Rules to create $(JDK_OUTPUTDIR)/gensrc/sun/lang/CharacterData*.java
# Rules to create $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/lang/CharacterData*.java
#
GENSRC_CHARACTERDATA :=
@ -33,7 +33,8 @@ CHARACTERDATA = $(JDK_TOPDIR)/make/data/characterdata
UNICODEDATA = $(JDK_TOPDIR)/make/data/unicodedata
define SetupCharacterData
$(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java: $(CHARACTERDATA)/$1.java.template $(BUILD_TOOLS_JDK)
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java: \
$(CHARACTERDATA)/$1.java.template
$(MKDIR) -p $$(@D)
$(ECHO) $(LOG_INFO) Generating $1.java
$(TOOL_GENERATECHARACTER) $2 \
@ -41,10 +42,10 @@ define SetupCharacterData
-spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \
-proplist $(UNICODEDATA)/PropList.txt \
-o $(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java -string \
-o $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java -string \
-usecharforbyte $3
GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java
GENSRC_CHARACTERDATA += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java
endef
$(eval $(call SetupCharacterData,CharacterDataLatin1, , -latin1 8))
@ -54,12 +55,12 @@ $(eval $(call SetupCharacterData,CharacterData02, -plane 2, 11 4 1))
$(eval $(call SetupCharacterData,CharacterData0E, -plane 14, 11 4 1))
# Copy two Java files that need no preprocessing.
$(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/%.java: $(CHARACTERDATA)/%.java.template
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/%.java: $(CHARACTERDATA)/%.java.template
$(ECHO) $(LOG_INFO) Generating $(@F)
$(call install-file)
GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/CharacterDataUndefined.java \
$(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/CharacterDataPrivateUse.java
GENSRC_CHARACTERDATA += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/CharacterDataUndefined.java \
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/CharacterDataPrivateUse.java
GENSRC_JAVA_BASE += $(GENSRC_CHARACTERDATA)
$(GENSRC_CHARACTERDATA): $(BUILD_TOOLS_JDK)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -25,14 +25,13 @@
GENSRC_CHARSETCODER :=
GENSRC_CHARSETCODER_TMP := $(JDK_OUTPUTDIR)/gensrc
GENSRC_CHARSETCODER_DST := $(JDK_OUTPUTDIR)/gensrc/java.base/java/nio/charset
GENSRC_CHARSETCODER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio/charset
GENSRC_CHARSETCODER_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/java/nio
GENSRC_CHARSETCODER_TEMPLATE := $(GENSRC_CHARSETCODER_SRC)/charset/Charset-X-Coder.java.template
###
################################################################################
$(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
$(MKDIR) -p $(@D)
@ -67,7 +66,7 @@ $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java
###
################################################################################
$(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
$(MKDIR) -p $(@D)
@ -103,6 +102,6 @@ $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java
GENSRC_JAVA_BASE += $(GENSRC_CHARSETCODER)
###
################################################################################
$(GENSRC_CHARSETCODER): $(BUILD_TOOLS_JDK)

View File

@ -28,7 +28,7 @@
# Generate files using the charsetmapping tool
#
CHARSET_DATA_DIR := $(JDK_TOPDIR)/make/data/charsetmapping
CHARSET_GENSRC_JAVA_DIR_BASE := $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/cs
CHARSET_GENSRC_JAVA_DIR_BASE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/cs
CHARSET_DONE_BASE := $(CHARSET_GENSRC_JAVA_DIR_BASE)/_the.charsetmapping
CHARSET_TEMPLATES := \
$(CHARSET_DATA_DIR)/SingleByte-X.java.template \
@ -46,7 +46,7 @@ GENSRC_JAVA_BASE += $(CHARSET_DONE_BASE)-sbcs
#
# Generate the sun/nio/cs/StandardCharsets.java file
#
CHARSET_STANDARD_GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc/standardcharsets
CHARSET_STANDARD_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_standardcharsets
CHARSET_STANDARD_DATA := $(CHARSET_DATA_DIR)/standard-charsets
CHARSET_STANDARD_JAVA := sun/nio/cs/StandardCharsets.java
@ -118,7 +118,7 @@ $(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet: $(CHARSET_STANDARD_GENSRC
$(eval $(call SetupTextFileProcessing, BUILD_CHARSET_STANDARD, \
SOURCE_FILES := $(JDK_TOPDIR)/src/java.base/share/classes/$(CHARSET_STANDARD_JAVA).template, \
OUTPUT_FILE := $(JDK_OUTPUTDIR)/gensrc/java.base/$(CHARSET_STANDARD_JAVA), \
OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/$(CHARSET_STANDARD_JAVA), \
INCLUDES := \
_INCLUDE_ALIASES_TABLES_ => $(CHARSET_STANDARD_GENSRC_DIR)/aliases-tables.java.snippet ; \
_INCLUDE_ALIASES_MAP_ => $(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet ; \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -25,8 +25,7 @@
GENSRC_EXCEPTIONS :=
GENSRC_EXCEPTIONS_TMP := $(JDK_OUTPUTDIR)/gensrc
GENSRC_EXCEPTIONS_DST := $(JDK_OUTPUTDIR)/gensrc/java.base/java/nio
GENSRC_EXCEPTIONS_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio
GENSRC_EXCEPTIONS_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/java/nio
GENSRC_EXCEPTIONS_CMD := $(JDK_TOPDIR)/make/scripts/genExceptions.sh

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -25,8 +25,8 @@
GENSRC_AWT_ICONS :=
GENSRC_AWT_ICONS_SRC :=
GENSRC_AWT_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc
GENSRC_AWT_ICONS_DST := $(GENSRC_AWT_ICONS_TMP)/java.desktop/sun/awt/
GENSRC_AWT_ICONS_TMP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop
GENSRC_AWT_ICONS_DST := $(GENSRC_AWT_ICONS_TMP)/sun/awt/
ifdef OPENJDK
X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)
@ -62,14 +62,14 @@ GENSRC_AWT_ICONS_FILES := $(notdir $(GENSRC_AWT_ICONS_SRC))
GENSRC_AWT_ICONS_SHORT_NAME = $(subst .,_,$(subst -,_,$(1)))
GENSRC_AWT_ICONS_DST_NAME = AWTIcon$(2)_$(subst .,_,$(subst -,_,$(1)))
###
################################################################################
$(GENSRC_AWT_ICONS_TMP)/_the.icons.dir:
$(ECHO) Generating icon classes
$(MKDIR) -p $(GENSRC_AWT_ICONS_DST)
$(TOUCH) $@
###
################################################################################
define SetupGensrcAWTIcon
# param 1 is for src-file
@ -107,11 +107,11 @@ $(foreach I, $(GENSRC_AWT_ICONS_SRC), $(eval $(call SetupGensrcAWTIcon,$(notdir
GENSRC_JAVA_DESKTOP += $(GENSRC_AWT_ICONS)
###
################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
GENSRC_OSX_ICONS_DST := $(JDK_OUTPUTDIR)/gensrc_headers_icons
GENSRC_OSX_ICONS_DST := $(SUPPORT_OUTPUTDIR)/headers/java.desktop
GENSRC_OSX_ICONS := $(GENSRC_OSX_ICONS_DST)/AWTIconData.h
ifdef OPENJDK

View File

@ -42,14 +42,14 @@ LOCALE_FILES := $(shell $(FIND) $(JDK_TOPDIR)/src/java.base/share/classes \
LOCALE_RESOURCES := $(sort $(subst .properties,,$(subst .java,,$(notdir $(LOCALE_FILES)))))
# Include the list of resources found during the previous compile.
-include $(JDK_OUTPUTDIR)/gensrc/_the.locale_resources
-include $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_the.locale_resources
MISSING_RESOURCES := $(filter-out $(LOCALE_RESOURCES), $(PREV_LOCALE_RESOURCES))
NEW_RESOURCES := $(filter-out $(PREV_LOCALE_RESOURCES), $(LOCALE_RESOURCES))
ifneq (, $(MISSING_RESOURCES)$(NEW_RESOURCES))
# There is a difference in the number of supported resources. Trigger a regeneration.
$(shell $(RM) $(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java)
$(shell $(RM) $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/LocaleDataMetaInfo.java)
endif
# The EN locales
@ -116,26 +116,28 @@ $(eval $(call CaptureLocale,CalendarData))
SED_ENARGS += -e 's/$(HASH)AvailableLocales_Locales$(HASH)/$(sort $(ALL_EN_LOCALES))/g'
SED_NONENARGS += -e 's/$(HASH)AvailableLocales_Locales$(HASH)/$(sort $(ALL_NON_EN_LOCALES))/g'
$(JDK_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/EnLocaleDataMetaInfo.java: \
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/EnLocaleDataMetaInfo.java: \
$(JDK_TOPDIR)/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
$(MKDIR) -p $(@D)
$(ECHO) Creating sun/util/locale/provider/EnLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" > $(JDK_OUTPUTDIR)/gensrc/_the.locale_resources
$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" \
> $(SUPPORT_OUTPUTDIR)/gensrc/_the.locale_resources
$(SED) $(SED_ENARGS) $< > $@
$(JDK_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonEnLocaleDataMetaInfo.java: \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonEnLocaleDataMetaInfo.java: \
$(JDK_TOPDIR)/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
$(MKDIR) -p $(@D)
$(ECHO) Creating sun/util/resources/provider/NonEnLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" > $(JDK_OUTPUTDIR)/gensrc/_the.locale_resources
$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" \
> $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/_the.locale_resources
$(SED) $(SED_NONENARGS) $< > $@
GENSRC_BASELOCALEDATA := $(JDK_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/EnLocaleDataMetaInfo.java
GENSRC_LOCALEDATA := $(JDK_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonEnLocaleDataMetaInfo.java
GENSRC_BASELOCALEDATA := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/EnLocaleDataMetaInfo.java
GENSRC_LOCALEDATA := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonEnLocaleDataMetaInfo.java
################################################################################
GENSRC_CRBC_DST := $(JDK_OUTPUTDIR)/gensrc/java.base/sun/util/CoreResourceBundleControl.java
GENSRC_CRBC_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/CoreResourceBundleControl.java
GENSRC_CRBC_CMD := $(JDK_TOPDIR)/make/scripts/localelist.sh
JRE_NONEXIST_LOCALES := en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -23,37 +23,32 @@
# questions.
#
include ProfileNames.gmk
##########################################################################################
# Install the launcher name, release version string, full version
# string and the runtime name into the Version.java file.
# To be printed by java -version
$(JDK_OUTPUTDIR)/gensrc/java.base/sun/misc/Version.java \
$(PROFILE_VERSION_JAVA_TARGETS): \
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/misc/Version.java: \
$(JDK_TOPDIR)/src/java.base/share/classes/sun/misc/Version.java.template
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(ECHO) Generating sun/misc/Version.java $(call profile_version_name, $@)
$(ECHO) Generating sun/misc/Version.java
$(SED) -e 's/@@launcher_name@@/$(LAUNCHER_NAME)/g' \
-e 's/@@java_version@@/$(RELEASE)/g' \
-e 's/@@java_runtime_version@@/$(FULL_VERSION)/g' \
-e 's/@@java_runtime_name@@/$(RUNTIME_NAME)/g' \
-e 's/@@java_profile_name@@/$(call profile_version_name, $@)/g' \
$< > $@.tmp
$(MV) $@.tmp $@
GENSRC_JAVA_BASE += $(JDK_OUTPUTDIR)/gensrc/java.base/sun/misc/Version.java \
$(PROFILE_VERSION_JAVA_TARGETS)
GENSRC_JAVA_BASE += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/misc/Version.java
##########################################################################################
GENSRC_JAVA_BASE += $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java
GENSRC_JAVA_BASE += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java
GENSRC_SOR_SRC := $(JDK_TOPDIR)/make/src/native/genconstants/ch
GENSRC_SOR_SRC_FILE := genSocketOptionRegistry.c
GENSRC_SOR_BIN := $(JDK_OUTPUTDIR)/btnative/genSocketOptionRegistry
GENSRC_SOR_BIN := $(BUILDTOOLS_OUTPUTDIR)/native/genSocketOptionRegistry
SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOR_SRC)/$(GENSRC_SOR_SRC_FILE) | \
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
@ -71,14 +66,15 @@ $(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOR_EXE, \
SOR_PREGEN_FILE := $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/classes/sun/nio/ch/SocketOptionRegistry-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java.template
ifeq ($(wildcard $(SOR_PREGEN_FILE)), )
$(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java: $(BUILD_GENSRC_SOR_EXE)
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java: $(BUILD_GENSRC_SOR_EXE)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/make/scripts/addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@.tmp
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e \
$(JDK_TOPDIR)/make/scripts/addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@.tmp
$(BUILD_GENSRC_SOR_EXE) >> $@.tmp
$(MV) $@.tmp $@
else
$(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java: $(SOR_PREGEN_FILE)
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java: $(SOR_PREGEN_FILE)
$(call install-file)
endif
@ -86,11 +82,11 @@ endif
ifneq ($(OPENJDK_TARGET_OS), windows)
GENSRC_JAVA_BASE += $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java
GENSRC_JAVA_BASE += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java
GENSRC_UC_SRC := $(JDK_TOPDIR)/make/src/native/genconstants/fs
GENSRC_UC_SRC_FILE := genUnixConstants.c
GENSRC_UC_BIN := $(JDK_OUTPUTDIR)/btnative/genUnixConstants
GENSRC_UC_BIN := $(BUILDTOOLS_OUTPUTDIR)/native/genUnixConstants
UC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_UC_SRC)/$(GENSRC_UC_SRC_FILE) | \
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
@ -109,14 +105,15 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
UC_PREGEN_FILE := $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/classes/sun/nio/fs/UnixConstants-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java.template
ifeq ($(wildcard $(UC_PREGEN_FILE)), )
$(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java: $(BUILD_GENSRC_UC_EXE)
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java: $(BUILD_GENSRC_UC_EXE)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/make/scripts/addNotices.sh "$(UC_COPYRIGHT_YEARS)" > $@.tmp
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e \
$(JDK_TOPDIR)/make/scripts/addNotices.sh "$(UC_COPYRIGHT_YEARS)" > $@.tmp
$(BUILD_GENSRC_UC_EXE) >> $@.tmp
$(MV) $@.tmp $@
else
$(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java: $(UC_PREGEN_FILE)
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java: $(UC_PREGEN_FILE)
$(call install-file)
endif
@ -126,11 +123,11 @@ endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
GENSRC_JAVA_BASE += $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/SolarisConstants.java
GENSRC_JAVA_BASE += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/SolarisConstants.java
GENSRC_SOL_SRC := $(JDK_TOPDIR)/make/src/native/genconstants/fs
GENSRC_SOL_SRC_FILE := genSolarisConstants.c
GENSRC_SOL_BIN := $(JDK_OUTPUTDIR)/btnative/genSolarisConstants
GENSRC_SOL_BIN := $(BUILDTOOLS_OUTPUTDIR)/native/genSolarisConstants
SOL_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOL_SRC)/$(GENSRC_SOL_SRC_FILE) | \
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
@ -145,10 +142,11 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
OUTPUT_DIR := $(GENSRC_SOL_BIN), \
PROGRAM := genSolarisConstants))
$(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/SolarisConstants.java: $(BUILD_GENSRC_SOL_EXE)
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/SolarisConstants.java: $(BUILD_GENSRC_SOL_EXE)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/make/scripts/addNotices.sh "$(SOL_COPYRIGHT_YEARS)" > $@.tmp
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e \
$(JDK_TOPDIR)/make/scripts/addNotices.sh "$(SOL_COPYRIGHT_YEARS)" > $@.tmp
$(BUILD_GENSRC_SOL_EXE) >> $@.tmp
$(MV) $@.tmp $@

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,7 @@
# Helper macro for SetupCopy-zh_HK.
define SetupOneCopy-zh_HK
$1_$2_TARGET := $$(patsubst $(JDK_TOPDIR)/src/$(MODULE)/share/classes/%, \
$(JDK_OUTPUTDIR)/gensrc/$(MODULE)/%, \
$(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/%, \
$$(subst _zh_TW,_zh_HK, $2))
$$($1_$2_TARGET): $2
@ -62,7 +62,7 @@ define SetupCompileProperties
# Strip away prefix and suffix, leaving for example only:
# "<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN"
$1_JAVAS := $$(patsubst $(JDK_TOPDIR)/src/%, \
$(JDK_OUTPUTDIR)/gensrc/%, \
$(SUPPORT_OUTPUTDIR)/gensrc/%, \
$$(patsubst %.properties, %.java, \
$$(subst /share/classes,, $$($1_SRCS))))
@ -78,10 +78,10 @@ define SetupCompileProperties
$$(addsuffix _SPACE_$$($1_CLASS), \
$$(addprefix _SPACE_, $$($1_JAVAS)))))
$1_TARGET := $(JDK_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.done
$1_CMDLINE_FILE := $(JDK_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.cmdline
$1_TARGET := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.done
$1_CMDLINE_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.cmdline
# Now setup the rule for the generation of the resource bundles.
# Now setup the rule for the generation of the resource bundles.
$$($1_TARGET): $$($1_SRCS) $$($1_JAVAS) $(BUILD_TOOLS_JDK)
$(MKDIR) -p $$(@D) $$($1_DIRS)
$(ECHO) Compiling $$(words $$($1_SRCS)) properties into resource bundles for $(MODULE)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -27,25 +27,26 @@
# Generate java files for javax.swing.plaf package
#
NIMBUS_PACKAGE = javax.swing.plaf
NIMBUS_GENSRC_DIR = $(JDK_OUTPUTDIR)/gensrc/java.desktop/javax/swing/plaf/nimbus
NIMBUS_GENSRC_DIR = $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/javax/swing/plaf/nimbus
NIMBUS_SKIN_FILE = $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/skin.laf
$(JDK_OUTPUTDIR)/gensrc/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS_JDK)
$(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(ECHO) "Generating Nimbus source files"
$(TOOL_GENERATENIMBUS) $(LOG_INFO) \
-skinFile $(NIMBUS_SKIN_FILE) -buildDir $(JDK_OUTPUTDIR)/gensrc/java.desktop \
-skinFile $(NIMBUS_SKIN_FILE) -buildDir $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop \
-packagePrefix $(NIMBUS_PACKAGE).nimbus -lafName Nimbus
$(ECHO) $(LOG_INFO) "Finished generating Nimbus source files"
$(TOUCH) $@
GENSRC_SWING_NIMBUS := $(JDK_OUTPUTDIR)/gensrc/_the.generated_nimbus
GENSRC_SWING_NIMBUS := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus
#
# Generate beaninfo java files
#
DOCLET_DATA_DIR = $(JDK_TOPDIR)/make/data/swingbeaninfo
BEANINFO_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/gensrc_no_docs/java.desktop
DOCLET_DATA_DIR := $(JDK_TOPDIR)/make/data/swingbeaninfo
# javax.swing package
BEANS = AbstractButton Box JComponent JApplet JButton \
@ -67,41 +68,44 @@ BEANS_SRC = $(BEANS:%=$(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/%
# Dummy variable so far, in the old build system it was false by default
SWINGBEAN_DEBUG_FLAG = false
# GenDocletBeanInfo is compiled in Tools.gmk and picks up from $(JDK_OUTPUTDIR)/btclasses
# GenDocletBeanInfo is compiled in Tools.gmk and picks up from $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes
# LocaleDataMetaInfo needs to be generated before running this to avoid confusing errors
# in the build log.
$(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) \
$(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/SwingBeanInfoBase.java \
$(JDK_OUTPUTDIR)/gensrc/java.desktop/sun/swing/BeanInfoUtils.java $(BUILD_TOOLS_JDK) \
| $(GENSRC_LOCALEDATAMETAINFO)
$(BEANINFO_OUTPUTDIR)/_the.generated_beaninfo: $(BEANS_SRC) \
$(BEANINFO_OUTPUTDIR)/javax/swing/SwingBeanInfoBase.java \
$(BEANINFO_OUTPUTDIR)/sun/swing/BeanInfoUtils.java $(BUILD_TOOLS_JDK)
$(ECHO) Generating beaninfo
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing
$(MKDIR) -p $(BEANINFO_OUTPUTDIR)/javax/swing
$(JAVA) -Djava.awt.headless=true $(NEW_JAVADOC) \
-sourcepath "$(subst $(SPACE),$(PATH_SEP),\
$(wildcard $(JDK_TOPDIR)/src/*/*/classes) \
$(JDK_OUTPUTDIR)/gensrc/java.base)" \
$(SUPPORT_OUTPUTDIR)/gensrc/java.base)" \
-doclet build.tools.swingbeaninfo.GenDocletBeanInfo \
-x $(SWINGBEAN_DEBUG_FLAG) -d $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing \
-t $(DOCLET_DATA_DIR)/SwingBeanInfo.template -docletpath $(JDK_OUTPUTDIR)/btclasses \
-x $(SWINGBEAN_DEBUG_FLAG) -d $(BEANINFO_OUTPUTDIR)/javax/swing \
-t $(DOCLET_DATA_DIR)/SwingBeanInfo.template \
-docletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
-XDignore.symbol.file=true \
-classpath $(JDK_OUTPUTDIR)/btclasses $(BEANS_SRC) $(LOG_INFO)
-classpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes $(BEANS_SRC) $(LOG_INFO)
# Move the JTextComponent into its proper package directory.
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/text
$(MV) $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/JTextComponentBeanInfo.java $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/text/JTextComponentBeanInfo.java
$(MKDIR) -p $(BEANINFO_OUTPUTDIR)/javax/swing/text
$(MV) $(BEANINFO_OUTPUTDIR)/javax/swing/JTextComponentBeanInfo.java \
$(BEANINFO_OUTPUTDIR)/javax/swing/text/JTextComponentBeanInfo.java
$(TOUCH) $@
# This file is the part of dt.jar
# For some reason it is under $(JDK_TOPDIR)/make/data/swingbeaninfo
# Should it be moved under $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing instead?
$(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/SwingBeanInfoBase.java: $(DOCLET_DATA_DIR)/javax/swing/SwingBeanInfoBase.java
$(BEANINFO_OUTPUTDIR)/javax/swing/SwingBeanInfoBase.java: \
$(DOCLET_DATA_DIR)/javax/swing/SwingBeanInfoBase.java
$(call install-file)
# This file is the part of dt.jar
# For some reason it is under $(JDK_TOPDIR)/make/data/swingbeaninfo
# Should it be moved under $(JDK_TOPDIR)/src/java.desktop/share/classes/sun/swing instead?
$(JDK_OUTPUTDIR)/gensrc/java.desktop/sun/swing/BeanInfoUtils.java: $(DOCLET_DATA_DIR)/sun/swing/BeanInfoUtils.java
$(BEANINFO_OUTPUTDIR)/sun/swing/BeanInfoUtils.java: \
$(DOCLET_DATA_DIR)/sun/swing/BeanInfoUtils.java
$(call install-file)
GENSRC_SWING_BEANINFO = $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo
GENSRC_SWING_BEANINFO = $(BEANINFO_OUTPUTDIR)/_the.generated_beaninfo
GENSRC_JAVA_DESKTOP += $(GENSRC_SWING_BEANINFO) $(GENSRC_SWING_NIMBUS)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -37,9 +37,9 @@
GENSRC_X11WRAPPERS :=
# Put temporary c-code and executable to calculate offsets here.
# Also put verification offset file here as well.
GENSRC_X11WRAPPERS_TMP := $(JDK_OUTPUTDIR)/gensrc_x11wrappers
GENSRC_X11WRAPPERS_TMP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_x11wrappers
# Put the generated Java classes used to interface X11 from awt here.
GENSRC_X11WRAPPERS_DST := $(JDK_OUTPUTDIR)/gensrc/java.desktop/sun/awt/X11
GENSRC_X11WRAPPERS_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/sun/awt/X11
# The pre-calculated offset file are stored here:
GENSRC_SIZER_DIR := $(JDK_TOPDIR)/make/data/x11wrappergen
@ -69,12 +69,12 @@ $(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%
# Run the tool on the offset files copied from the source repository to generate several Java classes
# used in awt.
$(JDK_OUTPUTDIR)/gensrc/_the.generated.x11: $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS_JDK)
$(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated.x11: $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS_JDK)
$(MKDIR) -p $(GENSRC_X11WRAPPERS_DST)
$(TOOL_WRAPPERGENERATOR) $(GENSRC_X11WRAPPERS_DST) $(GENSRC_SIZER_DIR)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizes
$(TOUCH) $@
GENSRC_X11WRAPPERS += $(JDK_OUTPUTDIR)/gensrc/_the.generated.x11
GENSRC_X11WRAPPERS += $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated.x11
ifneq ($(COMPILE_TYPE), cross)
# This is not a cross compile, regenerate the offset file, so that we
@ -91,7 +91,7 @@ ifneq ($(COMPILE_TYPE), cross)
MEMORY_MODEL_FLAG="$(COMPILER_TARGET_BITS_FLAG)$*"
endif
SIZER_CFLAGS := -I$(JDK_OUTPUTDIR)/include \
SIZER_CFLAGS := \
-I$(JDK_TOPDIR)/src/java.base/share/native/include \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \

View File

@ -32,20 +32,20 @@ include LauncherCommon.gmk
# overwritten.
$(eval $(call SetupLauncher,java, \
-DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
$(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
$(JAVA_VERSION_INFO_RESOURCE), $(JDK_OUTPUTDIR)/objs/java_objs,true))
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jli_static.lib, $(JAVA_RC_FLAGS), \
$(JAVA_VERSION_INFO_RESOURCE), $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs,true))
$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
$(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
$(MKDIR) -p $(@D)
$(RM) $@
$(CP) $(JDK_OUTPUTDIR)/objs/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@
$(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@
LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX)
TARGETS += $(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX)
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupLauncher,javaw, \
-DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
$(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jli_static.lib, $(JAVA_RC_FLAGS), \
$(JAVA_VERSION_INFO_RESOURCE),,true))
endif
@ -57,7 +57,7 @@ $(eval $(call SetupLauncher,keytool, \
BUILD_JEXEC :=
BUILD_JEXEC_SRC :=
BUILD_JEXEC_INC :=
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
#
# UNHANDLED:
@ -90,7 +90,7 @@ ifeq ($(BUILD_JEXEC), 1)
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/java.base/share/native/libjli
endif
endif
@ -111,12 +111,12 @@ ifneq ($(BUILD_JEXEC_SRC), )
CFLAGS_solaris := -KPIC, \
LDFLAGS := $(LDFLAGS_JDKEXE) \
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jexec_obj, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
DEBUG_SYMBOLS := true, \
PROGRAM := jexec))
LIBRARIES += $(BUILD_JEXEC)
TARGETS += $(BUILD_JEXEC)
endif
################################################################################
@ -124,8 +124,8 @@ endif
BUILD_JSPAWNHELPER :=
BUILD_JSPAWNHELPER_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/jspawnhelper
JSPAWNHELPER_CFLAGS := -I$(JDK_TOPDIR)/src/java.base/unix/native/libjava
BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
LINK_JSPAWNHELPER_OBJECTS := $(JDK_OUTPUTDIR)/objs/libjava/childproc.o
BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
LINK_JSPAWNHELPER_OBJECTS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o
LINK_JSPAWNHELPER_FLAGS :=
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
@ -133,7 +133,7 @@ ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib
BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
endif
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
@ -149,19 +149,13 @@ ifeq ($(BUILD_JSPAWNHELPER), 1)
CFLAGS := $(CFLAGS_JDKEXE) $(JSPAWNHELPER_CFLAGS), \
LDFLAGS := $(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \
LDFLAGS_SUFFIX := $(LINK_JSPAWNHELPER_OBJECTS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jspawnhelper, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jspawnhelper, \
OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \
PROGRAM := jspawnhelper))
$(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)
LIBRARIES += $(BUILD_JSPAWNHELPER)
TARGETS += $(BUILD_JSPAWNHELPER)
endif
################################################################################
java.base: $(LAUNCHERS) $(LIBRARIES)
all: java.base
.PHONY: all java.base

View File

@ -45,9 +45,3 @@ $(eval $(call SetupLauncher,tnameserv, \
"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
"com.sun.corba.se.impl.naming.cosnaming.TransientNameServer"$(COMMA) }'))
java.corba: $(LAUNCHERS)
all: java.corba
.PHONY: all java.corba

View File

@ -34,8 +34,3 @@ ifndef BUILD_HEADLESS_ONLY
$(XLIBS)))
endif
java.desktop: $(LAUNCHERS)
all: java.desktop
.PHONY: all java.desktop

View File

@ -36,12 +36,12 @@ $(eval $(call SetupLauncher,rmiregistry, \
#
# The java-rmi.cgi script in bin/ only gets delivered in certain situations
#
JAVA_RMI_CGI := $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java-rmi.cgi
JAVA_RMI_CGI := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)/java-rmi.cgi
ifeq ($(OPENJDK_TARGET_OS), linux)
LAUNCHERS += $(JAVA_RMI_CGI)
TARGETS += $(JAVA_RMI_CGI)
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
LAUNCHERS += $(JAVA_RMI_CGI)
TARGETS += $(JAVA_RMI_CGI)
endif
# TODO:
@ -61,9 +61,3 @@ else
endif
##########################################################################################
java.rmi: $(LAUNCHERS)
all: java.rmi
.PHONY: all java.rmi

View File

@ -28,8 +28,3 @@ include LauncherCommon.gmk
$(eval $(call SetupLauncher,jrunscript, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.script.shell.Main"$(COMMA) }'))
java.scripting: $(LAUNCHERS)
all: java.scripting
.PHONY: all java.scripting

View File

@ -36,8 +36,3 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Ktab"$(COMMA) }'))
endif
java.security.jgss: $(LAUNCHERS)
all: java.security.jgss
.PHONY: all java.security.jgss

View File

@ -30,13 +30,6 @@ $(eval $(call SetupLauncher,javac, \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javac.Main"$(COMMA) }'))
ifeq ($(ENABLE_SJAVAC), yes)
$(eval $(call SetupLauncher,sjavac, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.sjavac.Main"$(COMMA) }'))
endif
$(eval $(call SetupLauncher,javah, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
@ -51,8 +44,12 @@ $(eval $(call SetupLauncher,serialver, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.serialver.SerialVer"$(COMMA) }'))
jdk.compiler: $(LAUNCHERS)
all: jdk.compiler
.PHONY: all jdk.compiler
ifeq ($(ENABLE_SJAVAC), yes)
# Build sjavac directly to the exploded image so that it does not get included
# into any real images
$(eval $(call SetupLauncher,sjavac, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.sjavac.Main"$(COMMA) }',,,,,,, \
$(JDK_OUTPUTDIR)/bin))
endif

View File

@ -36,14 +36,12 @@ $(eval $(call SetupLauncher,jdeps, \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.jdeps.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,jimage,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.tools.jimage.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,jhat, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.hat.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,native2ascii, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.native2ascii.Main"$(COMMA) }'))
jdk.dev: $(LAUNCHERS)
all: jdk.dev
.PHONY: all jdk.dev

View File

@ -30,8 +30,3 @@ $(eval $(call SetupLauncher,jsadebugd, \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
,,,,,,,,,Info-privileged.plist))
jdk.hotspot.agent: $(LAUNCHERS)
all: jdk.hotspot.agent
.PHONY: all jdk.hotspot.agent

View File

@ -30,8 +30,3 @@ $(eval $(call SetupLauncher,javadoc, \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javadoc.Main"$(COMMA) }'))
jdk.javadoc: $(LAUNCHERS)
all: jdk.javadoc
.PHONY: all jdk.javadoc

View File

@ -58,8 +58,3 @@ $(eval $(call SetupLauncher,jstat, \
$(eval $(call SetupLauncher,jcmd, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }'))
jdk.jcmd: $(LAUNCHERS)
all: jdk.jcmd
.PHONY: all jdk.jcmd

View File

@ -32,8 +32,3 @@ $(eval $(call SetupLauncher,jconsole, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "-J-Djconsole.showOutputViewer"$(COMMA) "sun.tools.jconsole.JConsole"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/jconsole.jar"$(COMMA) "/lib/tools.jar"$(COMMA) "/classes" }'))
jdk.jconsole: $(LAUNCHERS)
all: jdk.jconsole
.PHONY: all jdk.jconsole

View File

@ -29,8 +29,3 @@ $(eval $(call SetupLauncher,jdb, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.example.debug.tty.TTY"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }'))
jdk.jdi: $(LAUNCHERS)
all: jdk.jdi
.PHONY: all jdk.jdi

View File

@ -28,8 +28,3 @@ include LauncherCommon.gmk
$(eval $(call SetupLauncher,jstatd, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstatd.Jstatd"$(COMMA) }'))
jdk.jvmstat: $(LAUNCHERS)
all: jdk.jvmstat
.PHONY: all jdk.jvmstat

View File

@ -29,8 +29,3 @@ $(eval $(call SetupLauncher,rmic, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.rmic.Main"$(COMMA) }'))
jdk.rmic: $(LAUNCHERS)
all: jdk.rmic
.PHONY: all jdk.rmic

View File

@ -49,16 +49,16 @@ ifeq ($(USE_EXTERNAL_LIBZ), true)
UNPACKEXE_ZIPOBJS := -lz
else
UNPACKEXE_CFLAGS += -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8
UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX)
UNPACKEXE_ZIPOBJS := $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/zcrc32$(OBJ_SUFFIX) \
$(SUPPORT_OUTPUTDIR)/native/java.base/libzip/deflate$(OBJ_SUFFIX) \
$(SUPPORT_OUTPUTDIR)/native/java.base/libzip/trees$(OBJ_SUFFIX) \
$(SUPPORT_OUTPUTDIR)/native/java.base/libzip/zadler32$(OBJ_SUFFIX) \
$(SUPPORT_OUTPUTDIR)/native/java.base/libzip/compress$(OBJ_SUFFIX) \
$(SUPPORT_OUTPUTDIR)/native/java.base/libzip/zutil$(OBJ_SUFFIX) \
$(SUPPORT_OUTPUTDIR)/native/java.base/libzip/inflate$(OBJ_SUFFIX) \
$(SUPPORT_OUTPUTDIR)/native/java.base/libzip/infback$(OBJ_SUFFIX) \
$(SUPPORT_OUTPUTDIR)/native/java.base/libzip/inftrees$(OBJ_SUFFIX) \
$(SUPPORT_OUTPUTDIR)/native/java.base/libzip/inffast$(OBJ_SUFFIX)
endif
@ -108,8 +108,8 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
LDFLAGS_linux := -lc, \
LDFLAGS_solaris := $(UNPACKEXE_LDFLAGS_solaris) -lc, \
LDFLAGS_SUFFIX := $(LIBCXX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpackexe$(OUTPUT_SUBDIR), \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpackexe$(OUTPUT_SUBDIR), \
PROGRAM := unpack200, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
@ -133,15 +133,9 @@ endif
# image. The real fix would be clean up linking of unpack200 using
# -link -incremental:no
# like all other launchers.
$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX): $(BUILD_UNPACKEXE)
$(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)/unpack200$(EXE_SUFFIX): $(BUILD_UNPACKEXE)
$(call install-file)
LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX)
TARGETS += $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)/unpack200$(EXE_SUFFIX)
################################################################################
jdk.runtime: $(LAUNCHERS)
all: jdk.runtime
.PHONY: all jdk.runtime

View File

@ -28,8 +28,3 @@ include LauncherCommon.gmk
$(eval $(call SetupLauncher,jjs, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.nashorn.tools.Shell"$(COMMA) }'))
jdk.scripting.nashorn: $(LAUNCHERS)
all: jdk.scripting.nashorn
.PHONY: all jdk.scripting.nashorn

View File

@ -31,8 +31,3 @@ $(eval $(call SetupLauncher,schemagen, \
$(eval $(call SetupLauncher,xjc, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.xjc.Driver"$(COMMA) }'))
jdk.xml.bind: $(LAUNCHERS)
all: jdk.xml.bind
.PHONY: all jdk.xml.bind

View File

@ -31,8 +31,3 @@ $(eval $(call SetupLauncher,wsgen, \
$(eval $(call SetupLauncher,wsimport, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsImport"$(COMMA) }'))
jdk.xml.ws: $(LAUNCHERS)
all: jdk.xml.ws
.PHONY: all jdk.xml.ws

View File

@ -23,10 +23,6 @@
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
include NativeCompilation.gmk
# Prepare the find cache.
@ -93,7 +89,7 @@ define SetupLauncher
$(call LogSetupMacroEntry,SetupLauncher($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11))
$(if $(13),$(error Internal makefile error: Too many arguments to SetupLauncher, please update CompileLaunchers.gmk))
$1_WINDOWS_JLI_LIB := $(JDK_OUTPUTDIR)/objs/libjli/jli.lib
$1_WINDOWS_JLI_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjli/jli.lib
ifneq ($6, )
$1_WINDOWS_JLI_LIB := $6
endif
@ -113,14 +109,14 @@ define SetupLauncher
endif
endif
$1_LDFLAGS += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
$1_LDFLAGS += -Wl,-all_load $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a \
-framework Cocoa -framework Security -framework ApplicationServices \
-sectcreate __TEXT __info_plist $(MACOSX_PLIST_DIR)/$$($1_PLIST_FILE)
$1_LDFLAGS_SUFFIX += -pthread
endif
ifeq ($(OPENJDK_TARGET_OS), aix)
$1_LDFLAGS_SUFFIX += -L$(JDK_OUTPUTDIR)/objs -ljli_static
$1_LDFLAGS_SUFFIX += -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE) -ljli_static
endif
ifeq ($(USE_EXTERNAL_LIBZ), true)
@ -129,7 +125,7 @@ define SetupLauncher
$1_OUTPUT_DIR_ARG := $9
ifeq (, $$($1_OUTPUT_DIR_ARG))
$1_OUTPUT_DIR_ARG := $(JDK_OUTPUTDIR)/bin
$1_OUTPUT_DIR_ARG := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)
endif
# TODO: maybe it's better to move this if-statement out of this function
@ -189,10 +185,10 @@ define SetupLauncher
LDFLAGS_SUFFIX := $(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX), \
LDFLAGS_SUFFIX_posix := $4, \
LDFLAGS_SUFFIX_windows := $$($1_WINDOWS_JLI_LIB) \
$(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5, \
LDFLAGS_SUFFIX_linux := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
LDFLAGS_SUFFIX_solaris := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/$1_objs$(OUTPUT_SUBDIR), \
$(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib advapi32.lib $5, \
LDFLAGS_SUFFIX_linux := -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
LDFLAGS_SUFFIX_solaris := -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$1_objs$(OUTPUT_SUBDIR), \
OUTPUT_DIR := $$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR), \
PROGRAM := $1, \
DEBUG_SYMBOLS := true, \
@ -205,14 +201,14 @@ define SetupLauncher
MANIFEST := $(JAVA_MANIFEST), \
CODESIGN := $$($1_CODESIGN))
LAUNCHERS += $$(BUILD_LAUNCHER_$1)
TARGETS += $$(BUILD_LAUNCHER_$1)
ifneq (,$(filter $(OPENJDK_TARGET_OS), macosx aix))
$$(BUILD_LAUNCHER_$1): $(JDK_OUTPUTDIR)/objs/libjli_static.a
$$(BUILD_LAUNCHER_$1): $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
$$(BUILD_LAUNCHER_$1): $(JDK_OUTPUTDIR)/objs/libjava/java.lib \
$$(BUILD_LAUNCHER_$1): $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib \
$$($1_WINDOWS_JLI_LIB)
endif
endef

View File

@ -23,7 +23,7 @@
# questions.
#
WIN_AWT_LIB := $(JDK_OUTPUTDIR)/objs/libawt/awt.lib
WIN_AWT_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt/awt.lib
################################################################################
@ -66,12 +66,12 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
-D "JDK_FNAME=mlib_image.dll" \
-D "JDK_INTERNAL_NAME=mlib_image" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmlib_image, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBMLIB_IMAGE): $(BUILD_LIBJAVA)
$(BUILD_LIBMLIB_IMAGE): $(call FindLib, java.base, java)
DESKTOP_LIBRARIES += $(BUILD_LIBMLIB_IMAGE)
TARGETS += $(BUILD_LIBMLIB_IMAGE)
################################################################################
@ -132,12 +132,12 @@ ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
$(BUILD_LIBMLIB_LDLIBS) -ljava -ljvm \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_solaris := -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmlib_image_v, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image_v, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBMLIB_IMAGE_V): $(BUILD_LIBJAVA)
$(BUILD_LIBMLIB_IMAGE_V): $(call FindLib, java.base, java)
DESKTOP_LIBRARIES += $(BUILD_LIBMLIB_IMAGE_V)
TARGETS += $(BUILD_LIBMLIB_IMAGE_V)
endif
@ -167,7 +167,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_EXFILES += initIDs.c awt/image/cvutils/img_colors.c
endif
LIBAWT_CFLAGS += -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
LIBAWT_CFLAGS += -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
$(addprefix -I, $(shell find $(LIBAWT_DIRS) -type d)) \
$(LIBJAVA_HEADER_FLAGS) \
$(addprefix -I, $(BUILD_LIBMLIB_IMAGE_SRC)) \
@ -214,7 +214,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/java2d/opengl \
-I$(JDK_TOPDIR)/src/java.desktop/windows/native/include \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \
#
LIBAWT_EXFILES += \
java2d/d3d/D3DShaderGen.c \
@ -259,7 +259,8 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
LDFLAGS_SUFFIX_linux := -ljvm $(LIBM) $(LIBDL) -ljava, \
LDFLAGS_SUFFIX_solaris := -ljvm $(LIBM) $(LIBDL) -ljava -lc, \
LDFLAGS_SUFFIX_aix :=-ljvm $(LIBM) $(LIBDL) -ljava -lm,\
LDFLAGS_SUFFIX_macosx := -lmlib_image -ljvm $(LIBM) \
LDFLAGS_SUFFIX_macosx := -L$(INSTALL_LIBRARIES_HERE) \
-lmlib_image -ljvm $(LIBM) \
-framework Cocoa \
-framework OpenGL \
-framework JavaNativeFoundation \
@ -281,16 +282,16 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
-D "JDK_FNAME=awt.dll" \
-D "JDK_INTERNAL_NAME=awt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAWT): $(BUILD_LIBJAVA)
$(BUILD_LIBAWT): $(call FindLib, java.base, java)
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE)
endif
DESKTOP_LIBRARIES += $(BUILD_LIBAWT)
TARGETS += $(BUILD_LIBAWT)
################################################################################
@ -312,7 +313,7 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
LIBAWT_XAWT_EXCLUDES := medialib
LIBAWT_XAWT_CFLAGS := $(addprefix -I, $(shell $(FIND) $(LIBAWT_XAWT_DIRS) -type d)) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/include \
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/include \
@ -365,21 +366,22 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(X_LIBS) $(LIBAWT_XAWT_LDFLAGS) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(call SET_SHARED_LIBRARY_ORIGIN,/..), \
$(call SET_SHARED_LIBRARY_ORIGIN,/..) \
-L $(INSTALL_LIBRARIES_HERE), \
LDFLAGS_SUFFIX := $(LIBAWT_XAWT_LDFLAGS_SUFFIX), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=xawt.dll" \
-D "JDK_INTERNAL_NAME=xawt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_xawt, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_xawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAWT_XAWT): $(BUILD_LIBJAVA)
$(BUILD_LIBAWT_XAWT): $(call FindLib, java.base, java)
$(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT)
DESKTOP_LIBRARIES += $(BUILD_LIBAWT_XAWT)
TARGETS += $(BUILD_LIBAWT_XAWT)
endif
endif
@ -387,7 +389,7 @@ endif
################################################################################
LIBLCMS_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/liblcms
LIBLCMS_CPPFLAGS += -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
LIBLCMS_CPPFLAGS += -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
$(LIBJAVA_HEADER_FLAGS) \
@ -419,6 +421,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_posix := -L $(INSTALL_LIBRARIES_HERE), \
LDFLAGS_solaris := /usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2, \
LDFLAGS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc $(LCMS_LIBS), \
@ -430,10 +433,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
-D "JDK_FNAME=lcms.dll" \
-D "JDK_INTERNAL_NAME=lcms" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/liblcms, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/liblcms, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
DESKTOP_LIBRARIES += $(BUILD_LIBLCMS)
TARGETS += $(BUILD_LIBLCMS)
$(BUILD_LIBLCMS): $(BUILD_LIBAWT)
@ -492,7 +495,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
OPTIMIZATION := HIGHEST, \
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJAVAJPEG_SRC)) \
$(LIBJAVA_HEADER_FLAGS) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop, \
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LIBJPEG_LIBS) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@ -504,12 +507,12 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
-D "JDK_INTERNAL_NAME=javajpeg" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjavajpeg, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavajpeg, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJAVAJPEG): $(BUILD_LIBJAVA)
$(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java)
DESKTOP_LIBRARIES += $(BUILD_LIBJAVAJPEG)
TARGETS += $(BUILD_LIBJAVAJPEG)
################################################################################
@ -522,7 +525,7 @@ LIBFONTMANAGER_CFLAGS := \
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt \
$(JDK_TOPDIR)/src/java.desktop/share/native/common \
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common -type d)) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
$(LIBJAVA_HEADER_FLAGS) \
#
@ -578,6 +581,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_posix := -L $(INSTALL_LIBRARIES_HERE), \
LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_solaris := $(filter-out -R%, $(X_LIBS)) \
@ -592,7 +596,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
-D "JDK_FNAME=fontmanager.dll" \
-D "JDK_INTERNAL_NAME=fontmanager" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfontmanager, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfontmanager, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
@ -601,7 +605,7 @@ ifneq (, $(findstring $(OPENJDK_TARGET_OS), solaris aix))
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_XAWT)
endif
DESKTOP_LIBRARIES += $(BUILD_LIBFONTMANAGER)
TARGETS += $(BUILD_LIBFONTMANAGER)
################################################################################
@ -612,7 +616,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/java2d/windows \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
-I$(JDK_TOPDIR)/src/java.desktop/windows/native/include \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
$(LIBJAVA_HEADER_FLAGS) \
@ -639,16 +643,16 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-D "JDK_FNAME=jawt.dll" \
-D "JDK_INTERNAL_NAME=jawt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJAWT): $(BUILD_LIBAWT)
$(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT)
$(ECHO) Copying $(@F)
$(CP) $(JDK_OUTPUTDIR)/objs/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@
$(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@
DESKTOP_LIBRARIES += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
TARGETS += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
else # OPENJDK_TARGET_OS not windows
@ -694,13 +698,14 @@ else # OPENJDK_TARGET_OS not windows
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjawt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_posix := -L $(INSTALL_LIBRARIES_HERE), \
LDFLAGS_solaris := $(X_LIBS), \
LDFLAGS_SUFFIX_linux := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_aix := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX),\
LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \
LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
-framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
ifndef BUILD_HEADLESS_ONLY
@ -715,7 +720,7 @@ else # OPENJDK_TARGET_OS not windows
endif # OPENJDK_TARGET_OS
DESKTOP_LIBRARIES += $(BUILD_LIBJAWT)
TARGETS += $(BUILD_LIBJAWT)
################################################################################
@ -732,7 +737,7 @@ ifeq ($(BUILD_HEADLESS), true)
#
LIBAWT_HEADLESS_EXCLUDES := medialib
LIBAWT_HEADLESS_CFLAGS := -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
LIBAWT_HEADLESS_CFLAGS := -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
$(addprefix -I, $(LIBAWT_HEADLESS_DIRS)) \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
@ -770,6 +775,7 @@ ifeq ($(BUILD_HEADLESS), true)
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_posix := -L $(INSTALL_LIBRARIES_HERE), \
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
@ -777,12 +783,12 @@ ifeq ($(BUILD_HEADLESS), true)
LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
LDFLAGS_SUFFIX_aix := -ljvm -lawt -ljava,\
LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_headless, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_headless, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
DESKTOP_LIBRARIES += $(BUILD_LIBAWT_HEADLESS)
TARGETS += $(BUILD_LIBAWT_HEADLESS)
endif
endif
@ -853,7 +859,9 @@ ifndef BUILD_HEADLESS_ONLY
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(LIBM) -lpthread -liconv -losxapp \
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += \
-L$(INSTALL_LIBRARIES_HERE) \
$(LIBM) -lpthread -liconv -losxapp \
-framework ApplicationServices \
-framework Foundation \
-framework Cocoa \
@ -885,10 +893,10 @@ ifndef BUILD_HEADLESS_ONLY
-D "JDK_FNAME=splashscreen.dll" \
-D "JDK_INTERNAL_NAME=splashscreen" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsplashscreen, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsplashscreen, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
DESKTOP_LIBRARIES += $(BUILD_LIBSPLASHSCREEN)
TARGETS += $(BUILD_LIBSPLASHSCREEN)
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(BUILD_LIBSPLASHSCREEN): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
@ -909,7 +917,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_LWAWT_CFLAGS := \
$(addprefix -I, $(LIBAWT_LWAWT_DIRS)) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/include \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl \
@ -945,7 +953,8 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
$(X_LIBS) \
$(LIBAWT_LWAWT_CFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
$(call SET_SHARED_LIBRARY_ORIGIN) \
-L $(INSTALL_LIBRARIES_HERE), \
LDFLAGS_SUFFIX_macosx := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \
-framework Accelerate \
-framework ApplicationServices \
@ -958,10 +967,10 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework JavaRuntimeSupport \
-framework OpenGL \
-framework QuartzCore -ljava, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_lwawt, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_lwawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
DESKTOP_LIBRARIES += $(BUILD_LIBAWT_LWAWT)
TARGETS += $(BUILD_LIBAWT_LWAWT)
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBAWT)
@ -969,7 +978,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBOSXAPP)
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBJAVA)
$(BUILD_LIBAWT_LWAWT): $(call FindLib, java.base, java)
endif
@ -989,10 +998,11 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop, \
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
-Xlinker -rpath -Xlinker @loader_path, \
-Xlinker -rpath -Xlinker @loader_path \
-L $(INSTALL_LIBRARIES_HERE), \
LDFLAGS_SUFFIX_macosx := -lawt -losxapp -lawt_lwawt \
-framework Cocoa \
-framework Carbon \
@ -1000,10 +1010,10 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-ljava -ljvm, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxui, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxui, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
DESKTOP_LIBRARIES += $(BUILD_LIBOSXUI)
TARGETS += $(BUILD_LIBOSXUI)
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT)
@ -1011,7 +1021,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT)
#$(BUILD_LIBOSXUI): $(BUILD_LIBJAVA)
#$(BUILD_LIBOSXUI): $(call FindLib, java.base, java)
endif

View File

@ -23,7 +23,7 @@
# questions.
#
WIN_VERIFY_LIB := $(JDK_OUTPUTDIR)/objs/libverify/verify.lib
WIN_VERIFY_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify/verify.lib
##########################################################################################
# libfdlibm is statically linked with libjava below and not delivered into the
@ -41,7 +41,7 @@ LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC)
ifneq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \
STATIC_LIBRARY := fdlibm, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
SRC := $(LIBFDLIBM_SRC), \
LANG := C, \
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
@ -49,7 +49,7 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
CFLAGS_windows_debug := -DLOGGING, \
CFLAGS_aix := -qfloat=nomaf, \
ARFLAGS := $(ARFLAGS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
else
@ -58,15 +58,15 @@ else
# a plain static library.
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \
LIBRARY := fdlibm, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
SRC := $(LIBFDLIBM_SRC), \
LANG := C, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
LDFLAGS := -nostdlib -r -arch x86_64, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBFDLIBM := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
BUILD_LIBFDLIBM := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
$(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC)
$(call install-file)
@ -107,10 +107,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
-D "JDK_INTERNAL_NAME=verify" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(BUILD_LIBVERIFY_REORDER), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libverify, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify, \
DEBUG_SYMBOLS := true))
BASE_LIBRARIES += $(BUILD_LIBVERIFY)
TARGETS += $(BUILD_LIBVERIFY)
##########################################################################################
@ -122,7 +122,7 @@ endif
LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \
-I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \
-DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
@ -164,7 +164,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
LDFLAGS_SUFFIX_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \
LDFLAGS_SUFFIX_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \
LDFLAGS_SUFFIX_aix := $(LIBDL) $(BUILD_LIBFDLIBM) -lm,\
LDFLAGS_SUFFIX_macosx := -L$(JDK_OUTPUTDIR)/objs/ -lfdlibm \
LDFLAGS_SUFFIX_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/ -lfdlibm \
-framework CoreFoundation \
-framework Foundation \
-framework Security -framework SystemConfiguration, \
@ -179,10 +179,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
-D "JDK_INTERNAL_NAME=java" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(LIBJAVA_REORDER), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BASE_LIBRARIES += $(BUILD_LIBJAVA)
TARGETS += $(BUILD_LIBJAVA)
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY)
@ -217,7 +217,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
$(ZLIB_CPPFLAGS) \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.base, \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
CFLAGS_posix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
REORDER := $(BUILD_LIBZIP_REORDER), \
@ -225,8 +225,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(EXPORT_ZIP_FUNCS), \
LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
-export:ZIP_ReadEntry -export:ZIP_GetNextEntry -export:ZIP_CRC32 jvm.lib \
$(WIN_JAVA_LIB), \
-export:ZIP_ReadEntry -export:ZIP_GetNextEntry \
-export:ZIP_InflateFully -export:ZIP_CRC32 \
jvm.lib $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \
LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \
LDFLAGS_SUFFIX_aix := -ljvm -ljava $(LIBZ),\
@ -236,13 +237,13 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
-D "JDK_FNAME=zip.dll" \
-D "JDK_INTERNAL_NAME=zip" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libzip, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libzip, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBZIP): $(BUILD_LIBJAVA)
BASE_LIBRARIES += $(BUILD_LIBZIP)
TARGETS += $(BUILD_LIBZIP)
##########################################################################################
@ -363,10 +364,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
-D "JDK_FNAME=jli.dll" \
-D "JDK_INTERNAL_NAME=jli" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BASE_LIBRARIES += $(BUILD_LIBJLI)
TARGETS += $(BUILD_LIBJLI)
# On windows, the static library has the same suffix as the import library created by
# with the shared library, so the static library is given a different name. No harm
@ -374,18 +375,17 @@ BASE_LIBRARIES += $(BUILD_LIBJLI)
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
STATIC_LIBRARY := jli_static, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
SRC := $(BUILD_LIBJLI_SRC_DIRS), \
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
ARFLAGS := $(ARFLAGS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli_static, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJLI_STATIC)
BASE_STATIC_LIBRARIES += $(BUILD_LIBJLI_STATIC)
TARGETS += $(BUILD_LIBJLI_STATIC)
else ifeq ($(OPENJDK_TARGET_OS), macosx)
#
@ -394,37 +394,35 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
# as this is first time I see it
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
LIBRARY := jli_static, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
SRC := $(BUILD_LIBJLI_SRC_DIRS), \
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
LDFLAGS := -nostdlib -r, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli_static, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(JDK_OUTPUTDIR)/objs/libjli_static.a: $(BUILD_LIBJLI_STATIC)
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC)
$(call install-file)
BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
BASE_STATIC_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a
else ifeq ($(OPENJDK_TARGET_OS), aix)
# AIX also requires a static libjli because the compiler doesn't support '-rpath'
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC,\
STATIC_LIBRARY:=jli_static,\
OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs,\
OUTPUT_DIR:=$(SUPPORT_OUTPUTDIR)/native/$(MODULE),\
SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
INCLUDE_FILES:=$(BUILD_LIBJLI_FILES),\
LANG:=C,\
OPTIMIZATION:=HIGH, \
CFLAGS:=$(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS),\
ARFLAGS:=$(ARFLAGS),\
OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjli_static))
OBJECT_DIR:=$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static))
BUILD_LIBRARIES += $(BUILD_LIBJLI_STATIC)
BASE_STATIC_LIBRARIES += $(BUILD_LIBJLI_STATIC)
TARGETS += $(BUILD_LIBJLI_STATIC)
endif

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -32,9 +32,3 @@ $(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/java.base/*/native \
include CoreLibraries.gmk
include NetworkingLibraries.gmk
include NioLibraries.gmk
java.base: $(BASE_LIBRARIES) $(BASE_STATIC_LIBRARIES) $(NPT_LIBRARIES)
all: java.base
.PHONY: all java.base

View File

@ -32,9 +32,3 @@ $(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/java.desktop/*/native
include PlatformLibraries.gmk
include Awt2dLibraries.gmk
include SoundLibraries.gmk
java.desktop: $(DESKTOP_LIBRARIES)
all: java.desktop
.PHONY: all java.desktop

View File

@ -32,7 +32,7 @@ LIBINSTRUMENT_SRC := $(JDK_TOPDIR)/src/java.instrument/share/native/libinstrumen
#
LIBINSTRUMENT_CFLAGS := $(CFLAGS_JDKLIB) \
$(addprefix -I, $(LIBINSTRUMENT_SRC)) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.instrument \
-I$(SUPPORT_OUTPUTDIR)/headers/java.instrument \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjli \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
#
@ -41,7 +41,7 @@ LIBINSTRUMENT_LDFLAGS :=
LIBINSTRUMENT_LDFLAGS_SUFFIX :=
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBINSTRUMENT_LDFLAGS += $(JDK_OUTPUTDIR)/objs/jli_static.lib $(WIN_JAVA_LIB) \
LIBINSTRUMENT_LDFLAGS += $(SUPPORT_OUTPUTDIR)/native/java.base/jli_static.lib $(WIN_JAVA_LIB) \
-export:Agent_OnAttach advapi32.lib
# Statically link the C runtime so that there are not dependencies on modules
# not on the search patch when invoked from the Windows system directory
@ -68,34 +68,28 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
$(LIBINSTRUMENT_LDFLAGS), \
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
LDFLAGS_macosx := -Xlinker -all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
LDFLAGS_macosx := -Xlinker -all_load $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a \
-framework Cocoa -framework Security -framework ApplicationServices, \
LDFLAGS_SUFFIX := $(LIBINSTRUMENT_LDFLAGS_SUFFIX), \
LDFLAGS_SUFFIX_macosx := -liconv $(LIBZ), \
LDFLAGS_SUFFIX_solaris := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL) -lc, \
LDFLAGS_SUFFIX_linux := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL), \
LDFLAGS_SUFFIX_aix := $(LIBZ) -L$(JDK_OUTPUTDIR)/objs -ljli_static $(LIBDL),\
LDFLAGS_SUFFIX_solaris := $(LIBZ) -L $(call FindLibDirForModule, java.base)/jli -ljli $(LIBDL) -lc, \
LDFLAGS_SUFFIX_linux := $(LIBZ) -L $(call FindLibDirForModule, java.base)/jli -ljli $(LIBDL), \
LDFLAGS_SUFFIX_aix := $(LIBZ) -L$(SUPPORT_OUTPUTDIR)/native/java.base -ljli_static $(LIBDL),\
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=instrument.dll" \
-D "JDK_INTERNAL_NAME=instrument" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libinstrument, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libinstrument, \
DEBUG_SYMBOLS := true))
ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows aix))
$(BUILD_LIBINSTRUMENT): $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
$(BUILD_LIBINSTRUMENT): $(SUPPORT_OUTPUTDIR)/native/java.base/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
else
$(BUILD_LIBINSTRUMENT): $(INSTALL_LIBRARIES_HERE)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
$(BUILD_LIBINSTRUMENT): $(call FindLib, java.base, jli, /jli)
endif
$(BUILD_LIBINSTRUMENT): $(BUILD_LIBJAVA)
INSTRUMENT_LIBRARIES += $(BUILD_LIBINSTRUMENT)
TARGETS += $(BUILD_LIBINSTRUMENT)
################################################################################
java.instrument: $(INSTRUMENT_LIBRARIES)
all: java.instrument
.PHONY: all java.instrument

View File

@ -34,7 +34,7 @@ BUILD_LIBMANAGEMENT_SRC += $(JDK_TOPDIR)/src/java.management/share/native/libman
$(JDK_TOPDIR)/src/java.management/$(OPENJDK_TARGET_OS_API_DIR)/native/libmanagement
BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/java.management/share/native/include \
$(addprefix -I,$(BUILD_LIBMANAGEMENT_SRC)) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.management \
-I$(SUPPORT_OUTPUTDIR)/headers/java.management \
$(LIBJAVA_HEADER_FLAGS) \
#
@ -82,17 +82,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
-D "JDK_FNAME=management.dll" \
-D "JDK_INTERNAL_NAME=management" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmanagement, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmanagement, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBMANAGEMENT): $(BUILD_LIBJAVA)
$(BUILD_LIBMANAGEMENT): $(call FindLib, java.base, java)
MANAGEMENT_LIBRARIES += $(BUILD_LIBMANAGEMENT)
TARGETS += $(BUILD_LIBMANAGEMENT)
################################################################################
java.management: $(MANAGEMENT_LIBRARIES)
all: java.management
.PHONY: all java.management

View File

@ -54,17 +54,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBPREFS, \
-D "JDK_FNAME=prefs.dll" \
-D "JDK_INTERNAL_NAME=prefs" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libprefs, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libprefs, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBPREFS): $(BUILD_LIBJAVA)
$(BUILD_LIBPREFS): $(call FindLib, java.base, java)
PREFS_LIBRARIES += $(BUILD_LIBPREFS)
TARGETS += $(BUILD_LIBPREFS)
################################################################################
java.prefs: $(PREFS_LIBRARIES)
all: java.prefs
.PHONY: all java.prefs

View File

@ -40,16 +40,16 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2GSS_SRC)) \
$(LIBJAVA_HEADER_FLAGS) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.security.jgss, \
-I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2gss/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2gss, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2gss, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
SECURITY_KERBEROS_LIBRARIES += $(BUILD_LIBJ2GSS)
TARGETS += $(BUILD_LIBJ2GSS)
endif
################################################################################
@ -81,7 +81,7 @@ ifneq ($(BUILD_CRYPTO), no)
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(addprefix -I, $(BUILD_LIBKRB5_SRC)) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.security.jgss, \
-I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \
@ -90,17 +90,11 @@ ifneq ($(BUILD_CRYPTO), no)
-D "JDK_FNAME=$(BUILD_LIBKRB5_NAME).dll" \
-D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libkrb5, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libkrb5, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
SECURITY_KERBEROS_LIBRARIES += $(BUILD_LIBKRB5)
TARGETS += $(BUILD_LIBKRB5)
endif
endif
################################################################################
java.security.jgss: $(SECURITY_KERBEROS_LIBRARIES)
all: java.security.jgss
.PHONY: all java.security.jgss

View File

@ -31,7 +31,7 @@ LIBJ2PCSC_SRC := $(JDK_TOPDIR)/src/java.smartcardio/share/native/libj2pcsc \
$(JDK_TOPDIR)/src/java.smartcardio/$(OPENJDK_TARGET_OS_API_DIR)/native/libj2pcsc
LIBJ2PCSC_CPPFLAGS := $(addprefix -I,$(LIBJ2PCSC_SRC)) \
-I$(JDK_TOPDIR)/src/java.smartcardio/$(OPENJDK_TARGET_OS_API_DIR)/native/libj2pcsc/MUSCLE \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.smartcardio
-I$(SUPPORT_OUTPUTDIR)/headers/java.smartcardio
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
LIBRARY := j2pcsc, \
@ -52,15 +52,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
-D "JDK_FNAME=j2pcsc.dll" \
-D "JDK_INTERNAL_NAME=j2pcsc" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pcsc, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2pcsc, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
SECURITY_SMARTCARDIO_LIBRARIES += $(BUILD_LIBJ2PCSC)
TARGETS += $(BUILD_LIBJ2PCSC)
################################################################################
java.smartcardio: $(SECURITY_SMARTCARDIO_LIBRARIES)
all: java.smartcardio
.PHONY: all java.smartcardio

View File

@ -35,7 +35,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.attach \
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.attach \
$(LIBJAVA_HEADER_FLAGS), \
CFLAGS_windows := /Gy, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
@ -50,17 +50,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
LDFLAGS_windows := /ORDER:@$(JDK_TOPDIR)/make/mapfiles/libattach/reorder-windows-$(OPENJDK_TARGET_CPU), \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libattach, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libattach, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBATTACH): $(BUILD_LIBJAVA)
$(BUILD_LIBATTACH): $(call FindLib, java.base, java)
ATTACH_LIBRARIES += $(BUILD_LIBATTACH)
TARGETS += $(BUILD_LIBATTACH)
################################################################################
jdk.attach: $(ATTACH_LIBRARIES)
all: jdk.attach
.PHONY: all jdk.attach

View File

@ -65,16 +65,10 @@ ifeq ($(ENABLE_INTREE_EC), yes)
-D "JDK_FNAME=sunec.dll" \
-D "JDK_INTERNAL_NAME=sunec" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunec, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsunec, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
SECURITY_SUNEC_LIBRARIES += $(BUILD_LIBSUNEC)
TARGETS += $(BUILD_LIBSUNEC)
endif
################################################################################
jdk.crypto.ec: $(SECURITY_SUNEC_LIBRARIES)
all: jdk.crypto.ec
.PHONY: all jdk.crypto.ec

View File

@ -47,16 +47,10 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-D "JDK_FNAME=sunmscapi.dll" \
-D "JDK_INTERNAL_NAME=sunmscapi" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunmscapi, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsunmscapi, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
SECURITY_MSCAPI_LIBRARIES += $(BUILD_LIBSUNMSCAPI)
TARGETS += $(BUILD_LIBSUNMSCAPI)
endif
################################################################################
jdk.crypto.mscapi: $(SECURITY_MSCAPI_LIBRARIES)
all: jdk.crypto.mscapi
.PHONY: all jdk.crypto.mscapi

View File

@ -38,7 +38,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2PKCS11_SRC)) \
$(LIBJAVA_HEADER_FLAGS) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.crypto.pkcs11, \
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.crypto.pkcs11, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pkcs11/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@ -49,15 +49,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
-D "JDK_FNAME=j2pkcs11.dll" \
-D "JDK_INTERNAL_NAME=j2pkcs11" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pkcs11, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2pkcs11, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
SECURITY_PKCS11_LIBRARIES += $(BUILD_LIBJ2PKCS11)
TARGETS += $(BUILD_LIBJ2PKCS11)
################################################################################
jdk.crypto.pkcs11: $(SECURITY_PKCS11_LIBRARIES)
all: jdk.crypto.pkcs11
.PHONY: all jdk.crypto.pkcs11

View File

@ -23,8 +23,7 @@
# questions.
#
include $(SPEC)
include $(JDK_TOPDIR)/make/lib/LibCommon.gmk
include LibCommon.gmk
################################################################################
@ -49,14 +48,8 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
$(BUILD_LIBJ2UCRYPTO): $(BUILD_LIBJAVA)
SECURITY_UCRYPTO_LIBRARIES += $(BUILD_LIBJ2UCRYPTO)
TARGETS += $(BUILD_LIBJ2UCRYPTO)
endif
################################################################################
jdk.crypto.ucrypto: $(SECURITY_UCRYPTO_LIBRARIES)
all: jdk.crypto.ucrypto
.PHONY: all jdk.crypto.ucrypto

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -39,19 +39,19 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(LIBAPPLESCRIPTENGINE_SRC) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.deploy.osx, \
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.deploy.osx, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := -framework Cocoa \
-framework Carbon \
-framework JavaNativeFoundation \
$(LDFLAGS_JDKLIB_SUFFIX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libAppleScriptEngine, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libAppleScriptEngine, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAPPLESCRIPTENGINE): $(BUILD_LIBJAVA)
$(BUILD_LIBAPPLESCRIPTENGINE): $(call FindLib, java.base, java)
DEPLOY_OSX_LIBRARIES += $(BUILD_LIBAPPLESCRIPTENGINE)
TARGETS += $(BUILD_LIBAPPLESCRIPTENGINE)
################################################################################
@ -59,8 +59,8 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBOSX_CFLAGS := -I$(LIBOSX_DIRS) \
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp \
$(LIBJAVA_HEADER_FLAGS) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
-I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.deploy.osx \
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.deploy.osx \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBOSX, \
@ -72,6 +72,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBOSX_CFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
-L$(SUPPORT_OUTPUTDIR)/modules_libs/java.desktop \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_macosx := \
-losxapp \
@ -82,21 +83,15 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework Security \
-framework SystemConfiguration \
$(LDFLAGS_JDKLIB_SUFFIX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosx, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosx, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
DEPLOY_OSX_LIBRARIES += $(BUILD_LIBOSX)
TARGETS += $(BUILD_LIBOSX)
$(BUILD_LIBOSX): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
$(BUILD_LIBOSX): $(call FindLib, java.desktop, osxapp)
$(BUILD_LIBOSX): $(BUILD_LIBJAVA)
$(BUILD_LIBOSX): $(call FindLib, java.base, java)
################################################################################
endif
jdk.deploy.osx: $(DEPLOY_OSX_LIBRARIES)
all: jdk.deploy.osx
.PHONY: all jdk.deploy.osx

View File

@ -62,10 +62,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBHPROF, \
-D "JDK_FNAME=hprof.dll" \
-D "JDK_INTERNAL_NAME=hprof" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libhprof_jvmti, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libhprof_jvmti, \
DEBUG_SYMBOLS := true))
HPROF_LIBRARIES += $(BUILD_LIBHPROF)
TARGETS += $(BUILD_LIBHPROF)
################################################################################
@ -88,15 +88,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO, \
-D "JDK_FNAME=java_crw_demo.dll" \
-D "JDK_INTERNAL_NAME=java_crw_demo" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava_crw_demo, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava_crw_demo, \
DEBUG_SYMBOLS := true))
CRW_LIBRARIES += $(BUILD_LIBJAVA_CRW_DEMO)
TARGETS += $(BUILD_LIBJAVA_CRW_DEMO)
################################################################################
jdk.hprof.agent: $(HPROF_LIBRARIES) $(CRW_LIBRARIES)
all: jdk.hprof.agent
.PHONY: all jdk.hprof.agent

View File

@ -36,7 +36,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
$(addprefix -I, $(LIBDT_SHMEM_SRC)) \
-I$(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/libjdwp/export \
-I$(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/include \
-I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.jdi \
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.jdi \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM, \
@ -55,17 +55,11 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-D "JDK_FNAME=dt_shmem.dll" \
-D "JDK_INTERNAL_NAME=dt_shmem" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_shmem, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libdt_shmem, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
JDI_TRANSPORT_LIBRARIES += $(BUILD_LIBDT_SHMEM)
TARGETS += $(BUILD_LIBDT_SHMEM)
endif # OPENJDK_TARGET_OS
################################################################################
jdk.jdi: $(JDI_TRANSPORT_LIBRARIES)
all: jdk.jdi
.PHONY: all jdk.jdi

View File

@ -55,13 +55,13 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
-D "JDK_FNAME=dt_socket.dll" \
-D "JDK_INTERNAL_NAME=dt_socket" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_socket, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libdt_socket, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBDT_SOCKET): $(BUILD_LIBJAVA)
$(BUILD_LIBDT_SOCKET): $(call FindLib, java.base, java)
# Include socket transport with JDWP agent to allow for remote debugging
JDWP_LIBRARIES += $(BUILD_LIBDT_SOCKET)
TARGETS += $(BUILD_LIBDT_SOCKET)
################################################################################
@ -81,7 +81,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DJDWP_LOGGING \
$(LIBJDWP_CPPFLAGS) \
-I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers, \
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjdwp/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@ -94,17 +94,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
-D "JDK_FNAME=jdwp.dll" \
-D "JDK_INTERNAL_NAME=jdwp" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjdwp, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjdwp, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBJDWP): $(BUILD_LIBJAVA)
$(BUILD_LIBJDWP): $(call FindLib, java.base, java)
JDWP_LIBRARIES += $(BUILD_LIBJDWP)
TARGETS += $(BUILD_LIBJDWP)
################################################################################
jdk.jdwp.agent: $(JDWP_LIBRARIES)
all: jdk.jdwp.agent
.PHONY: all jdk.jdwp.agent

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -36,17 +36,17 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
OPTIMIZATION := LOW, \
CFLAGS := $(CXXFLAGS_JDKLIB) \
-DNO_ZLIB -DUNPACK_JNI -DFULL \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \
-I$(JDK_TOPDIR)/src/jdk.runtime/share/native/common-unpack \
$(LIBJAVA_HEADER_FLAGS), \
CFLAGS_release := -DPRODUCT, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := -map:$(JDK_OUTPUTDIR)/objs/unpack.map -debug \
LDFLAGS_windows := -map:$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpack.map -debug \
jvm.lib $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_posix := -ljvm $(LIBCXX) -ljava -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libunpack, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libunpack, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=unpack.dll" \
@ -54,9 +54,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
-D "JDK_FTYPE=0x2L", \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBUNPACK): $(BUILD_LIBJAVA)
$(BUILD_LIBUNPACK): $(call FindLib, java.base, java)
UNPACK_LIBRARIES += $(BUILD_LIBUNPACK)
TARGETS += $(BUILD_LIBUNPACK)
################################################################################
@ -72,7 +72,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJSDT, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
$(addprefix -I, $(LIBJSDT_SRC)) \
$(LIBJAVA_HEADER_FLAGS) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.runtime, \
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.runtime, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsdt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@ -85,17 +85,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJSDT, \
-D "JDK_FNAME=jsdt.dll" \
-D "JDK_INTERNAL_NAME=jsdt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsdt, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsdt, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBJSDT): $(BUILD_LIBJAVA)
$(BUILD_LIBJSDT): $(call FindLib, java.base, java)
JSDT_LIBRARIES += $(BUILD_LIBJSDT)
TARGETS += $(BUILD_LIBJSDT)
################################################################################
jdk.runtime: $(JSDT_LIBRARIES) $(UNPACK_LIBRARIES)
all: jdk.runtime
.PHONY: all jdk.runtime

View File

@ -48,8 +48,8 @@ ifeq ($(OPENJDK_TARGET_OS_API), posix)
-I $(JDK_TOPDIR)/src/java.base/share/native/libnio/ch \
$(addprefix -I, $(call FindSrcDirsForLib, java.base, net)) \
$(LIBJAVA_HEADER_FLAGS) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.sctp \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.base, \
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.sctp \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
CFLAGS_linux := $(SCTP_WERROR), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsctp/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
@ -58,19 +58,13 @@ ifeq ($(OPENJDK_TARGET_OS_API), posix)
LDFLAGS_SUFFIX_posix := -lnio -lnet, \
LDFLAGS_SUFFIX_solaris := -lsocket -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_macosx := -ljava -ljvm, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsctp, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsctp, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
SCTP_LIBRARIES += $(BUILD_LIBSCTP)
TARGETS += $(BUILD_LIBSCTP)
$(BUILD_LIBSCTP): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX)
$(BUILD_LIBSCTP): $(call FindLib, java.base, nio)
endif
endif
################################################################################
jdk.sctp: $(SCTP_LIBRARIES)
all: jdk.sctp
.PHONY: all jdk.sctp

View File

@ -46,7 +46,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
SRC := $(JDK_TOPDIR)/src/jdk.security.auth/$(OPENJDK_TARGET_OS_API_DIR)/native/libjaas, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.security.auth, \
CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/jdk.security.auth, \
MAPFILE := $(LIBJAAS_MAPFILE), \
LDFLAGS := $(filter-out -ljava, $(LDFLAGS_JDKLIB)) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@ -59,17 +59,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
-D "JDK_FNAME=$(LIBJAAS_NAME).dll" \
-D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjaas, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjaas, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJAAS): $(BUILD_LIBJAVA)
$(BUILD_LIBJAAS): $(call FindLib, java.base, java)
SECURITY_JAAS_LIBRARIES += $(BUILD_LIBJAAS)
TARGETS += $(BUILD_LIBJAAS)
################################################################################
jdk.security.auth: $(SECURITY_JAAS_LIBRARIES)
all: jdk.security.auth
.PHONY: all jdk.security.auth

View File

@ -23,8 +23,6 @@
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
include NativeCompilation.gmk
@ -34,16 +32,9 @@ include Tools.gmk
GLOBAL_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc
# Put the libraries here. Different locations for different target apis.
ifeq ($(OPENJDK_TARGET_OS_API), posix)
INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
else
INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/bin
endif
# Absolute paths to lib files on windows for use in LDFLAGS. Should figure out a more
# elegant solution to this.
WIN_JAVA_LIB := $(JDK_OUTPUTDIR)/objs/libjava/java.lib
WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
# Use this variable to set DEBUG_SYMBOLS true on windows for all libraries, but
# not on other platforms.
@ -57,24 +48,45 @@ ifdef OPENJDK
endif
################################################################################
# Find the default set of src dirs for a native library.
# Param 1 - module name
# Param 2 - library name
FindSrcDirsForLib = $(call uniq, $(wildcard \
$(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/lib$(strip $2) \
$(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_API_DIR)/native/lib$(strip $2) \
$(JDK_TOPDIR)/src/$(strip $1)/share/native/lib$(strip $2)))
define FindSrcDirsForLib
$(call uniq, $(wildcard \
$(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/lib$(strip $2) \
$(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_API_DIR)/native/lib$(strip $2) \
$(JDK_TOPDIR)/src/$(strip $1)/share/native/lib$(strip $2)))
endef
################################################################################
# Find lib dir for module
# Param 1 - module name
ifeq ($(OPENJDK_TARGET_OS_API), posix)
define FindLibDirForModule
$(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)$(OPENJDK_TARGET_CPU_LIBDIR)
endef
else
define FindLibDirForModule
$(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
endef
endif
# A lot of libraries are dependent on libjava. Define the name of that
# library here to make dependency declarations to it possible in other files.
BUILD_LIBJAVA := $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX)
################################################################################
# Find a library
# Param 1 - module name
# Param 2 - library name
# Param 3 - subdir for library
define FindLib
$(call FindLibDirForModule, $(strip $1))$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(SHARED_LIBRARY_SUFFIX)
endef
# Also define the header include flags needed to compile against it.
################################################################################
# Define the header include flags needed to compile against it.
LIBJAVA_HEADER_FLAGS := $(addprefix -I, $(call FindSrcDirsForLib, java.base, java))
# Put the libraries here.
INSTALL_LIBRARIES_HERE := $(call FindLibDirForModule, $(MODULE))
################################################################################
# Define it here since there are multiple uses.

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,7 @@
LIBNET_SRC_DIRS := $(JDK_TOPDIR)/src/java.base/share/native/libnet \
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libnet
LIBNET_CFLAGS += -I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
LIBNET_CFLAGS += -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
$(LIBJAVA_HEADER_FLAGS)
LIBNET_CFLAGS += $(foreach dir, $(LIBNET_SRC_DIRS), -I$(dir))
@ -71,10 +71,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
-D "JDK_FNAME=net.dll" \
-D "JDK_INTERNAL_NAME=net" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnet, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBNET): $(BUILD_LIBJAVA)
BASE_LIBRARIES += $(BUILD_LIBNET)
TARGETS += $(BUILD_LIBNET)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -35,7 +35,7 @@ BUILD_LIBNIO_SRC := \
BUILD_LIBNIO_CFLAGS := \
$(addprefix -I, $(BUILD_LIBNIO_SRC)) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \
$(LIBJAVA_HEADER_FLAGS) \
$(addprefix -I, $(BUILD_LIBNET_SRC))
@ -78,7 +78,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
LDFLAGS_SUFFIX_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \
-lsendfile -ljava -lnet -lc, \
LDFLAGS_SUFFIX_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
$(JDK_OUTPUTDIR)/objs/libnet/net.lib \
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet/net.lib \
advapi32.lib, \
LDFLAGS_SUFFIX_macosx := -ljava -lnet -pthread -framework CoreFoundation, \
LDFLAGS_SUFFIX :=, \
@ -87,10 +87,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
-D "JDK_FNAME=nio.dll" \
-D "JDK_INTERNAL_NAME=nio" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnio, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnio, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BASE_LIBRARIES += $(BUILD_LIBNIO)
TARGETS += $(BUILD_LIBNIO)
$(BUILD_LIBNIO): $(BUILD_LIBNET)

View File

@ -23,7 +23,7 @@
# questions.
#
##########################################################################################
################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
@ -37,7 +37,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(addprefix -I, $(LIBOSXAPP_SRC)) \
-I$(JDK_OUTPUTDIR)/gensrc_headers_icons, \
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_macosx := \
@ -53,10 +53,10 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework OpenGL \
-framework IOSurface \
-framework QuartzCore, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxapp, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxapp, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
DESKTOP_LIBRARIES += $(BUILD_LIBOSXAPP)
TARGETS += $(BUILD_LIBOSXAPP)
endif

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -28,7 +28,7 @@ LIBJSOUND_SRC_DIRS := \
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libjsound \
#
LIBJSOUND_CFLAGS := \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
$(LIBJAVA_HEADER_FLAGS) \
$(foreach dir, $(LIBJSOUND_SRC_DIRS), -I$(dir)) \
#
@ -172,12 +172,12 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND, \
-D "JDK_FNAME=jsound.dll" \
-D "JDK_INTERNAL_NAME=jsound" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsound, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsound, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJSOUND): $(BUILD_LIBJAVA)
DESKTOP_LIBRARIES += $(BUILD_LIBJSOUND)
TARGETS += $(BUILD_LIBJSOUND)
##########################################################################################
@ -208,12 +208,12 @@ ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), )
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(ALSA_LIBS) -ljava -ljvm, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsoundalsa, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundalsa, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJSOUNDALSA): $(BUILD_LIBJAVA)
DESKTOP_LIBRARIES += $(BUILD_LIBJSOUNDALSA)
TARGETS += $(BUILD_LIBJSOUNDALSA)
endif
@ -240,11 +240,11 @@ ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)), )
-D "JDK_FNAME=jsoundds.dll" \
-D "JDK_INTERNAL_NAME=jsoundds" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsoundds, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundds, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJSOUNDDS): $(BUILD_LIBJAVA)
DESKTOP_LIBRARIES += $(BUILD_LIBJSOUNDDS)
TARGETS += $(BUILD_LIBJSOUNDDS)
endif

View File

@ -274,6 +274,9 @@ SUNWprivate_1.1 {
Java_sun_misc_VM_initialize;
Java_sun_misc_VMSupport_initAgentProperties;
Java_sun_misc_VMSupport_getVMTemporaryDirectory;
Java_jdk_internal_jimage_concurrent_ConcurrentPReader_initIDs;
Java_jdk_internal_jimage_concurrent_ConcurrentPReader_pread;
# ZipFile.c needs this one
throwFileNotFoundException;

View File

@ -72,6 +72,7 @@ SUNWprivate_1.1 {
ZIP_FindEntry;
ZIP_GetEntry;
ZIP_GetNextEntry;
ZIP_InflateFully;
ZIP_Lock;
ZIP_Open;
ZIP_Read;

View File

@ -1,255 +0,0 @@
#
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
PROFILE_1_JRE_BIN_FILES := \
java$(EXE_SUFFIX) \
keytool$(EXE_SUFFIX)
PROFILE_1_JRE_LIB_FILES := \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)j2pkcs11$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsig.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)net$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)sunec$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)verify$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)verify.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)zip$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/client/$(LIBRARY_PREFIX)jsig.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/client/$(LIBRARY_PREFIX)jvm$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/client/$(LIBRARY_PREFIX)jvm.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/client/Xusage.txt \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/jvm.cfg \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/minimal/$(LIBRARY_PREFIX)jsig.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/minimal/$(LIBRARY_PREFIX)jvm$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/minimal/$(LIBRARY_PREFIX)jvm.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/minimal/Xusage.txt \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/server/$(LIBRARY_PREFIX)jsig.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/server/$(LIBRARY_PREFIX)jvm$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/server/$(LIBRARY_PREFIX)jvm.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/server/Xusage.txt \
classlist \
ext/localedata.jar \
ext/meta-index \
ext/sunec.jar \
ext/sunjce_provider.jar \
ext/sunpkcs11.jar \
jce.jar \
jsse.jar \
logging.properties \
meta-index \
net.properties \
resources.jar \
rt.jar \
security/US_export_policy.jar \
security/blacklist \
security/blacklisted.certs \
security/cacerts \
security/java.policy \
security/java.security \
security/local_policy.jar \
security/trusted.libraries \
tzdb.dat
ifndef OPENJDK
PROFILE_1_JRE_LIB_FILES += \
security/unlimited_policy/README.txt \
security/unlimited_policy/US_export_policy.jar \
security/unlimited_policy/local_policy.jar
endif
PROFILE_1_JRE_OTHER_FILES := \
COPYRIGHT \
LICENSE \
README \
THIRDPARTYLICENSEREADME.txt \
Welcome.html \
release
PROFILE_1_JRE_JAR_FILES := \
ext/localedata.jar \
ext/sunec.jar \
ext/sunjce_provider.jar \
ext/sunpkcs11.jar \
jce.jar \
jsse.jar \
resources.jar \
rt.jar \
security/US_export_policy.jar \
security/local_policy.jar
ifndef OPENJDK
PROFILE_1_JRE_JAR_FILES += \
security/unlimited_policy/US_export_policy.jar \
security/unlimited_policy/local_policy.jar
endif
PROFILE_2_JRE_BIN_FILES := \
rmid$(EXE_SUFFIX) \
rmiregistry$(EXE_SUFFIX)
PROFILE_2_JRE_LIB_FILES :=
PROFILE_2_JRE_OTHER_FILES :=
PROFILE_2_JRE_JAR_FILES :=
PROFILE_3_JRE_BIN_FILES :=
PROFILE_3_JRE_LIB_FILES := \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)hprof$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)hprof.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)instrument$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)instrument.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)j2gss$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)j2pcsc$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jaas_unix$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)java_crw_demo$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)java_crw_demo.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsdt$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsdt.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)management$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)management.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)prefs$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX) \
jvm.hprof.txt \
management/jmxremote.access \
management/jmxremote.password.template \
management/management.properties \
management/snmp.acl.template
PROFILE_3_JRE_OTHER_FILES :=
PROFILE_3_JRE_JAR_FILES :=
FULL_JRE_BIN_FILES := \
orbd$(EXE_SUFFIX) \
pack200$(EXE_SUFFIX) \
policytool$(EXE_SUFFIX) \
servertool$(EXE_SUFFIX) \
tnameserv$(EXE_SUFFIX) \
unpack200$(EXE_SUFFIX)
FULL_JRE_LIB_FILES := \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)dcpr$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)dt_socket$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)dt_socket.diz \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jdwp$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jfr$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jpeg$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsound$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsoundalsa$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)kcms$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)mlib_image$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)splashscreen$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX) \
$(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX) \
charsets.jar \
ext/cldrdata.jar \
ext/dnsns.jar \
ext/nashorn.jar \
ext/zipfs.jar \
fontconfig.RedHat.5.bfc \
fontconfig.RedHat.5.properties.src \
fontconfig.RedHat.6.bfc \
fontconfig.RedHat.6.properties.src \
fontconfig.SuSE.10.bfc \
fontconfig.SuSE.10.properties.src \
fontconfig.SuSE.11.bfc \
fontconfig.SuSE.11.properties.src \
fontconfig.Turbo.bfc \
fontconfig.Turbo.properties.src \
fontconfig.bfc \
fontconfig.properties.src \
fonts/LucidaBrightDemiBold.ttf \
fonts/LucidaBrightDemiItalic.ttf \
fonts/LucidaBrightItalic.ttf \
fonts/LucidaBrightRegular.ttf \
fonts/LucidaSansDemiBold.ttf \
fonts/LucidaSansRegular.ttf \
fonts/LucidaTypewriterBold.ttf \
fonts/LucidaTypewriterRegular.ttf \
fonts/fonts.dir \
images/cursors/cursors.properties \
images/cursors/invalid32x32.gif \
images/cursors/motif_CopyDrop32x32.gif \
images/cursors/motif_CopyNoDrop32x32.gif \
images/cursors/motif_LinkDrop32x32.gif \
images/cursors/motif_LinkNoDrop32x32.gif \
images/cursors/motif_MoveDrop32x32.gif \
images/cursors/motif_MoveNoDrop32x32.gif \
jexec \
jfr.jar \
oblique-fonts/LucidaSansDemiOblique.ttf \
oblique-fonts/LucidaSansOblique.ttf \
oblique-fonts/LucidaTypewriterBoldOblique.ttf \
oblique-fonts/LucidaTypewriterOblique.ttf \
oblique-fonts/fonts.dir \
psfont.properties.ja \
psfontj2d.properties \
sound.properties
FULL_JRE_OTHER_FILES := \
man/ja_JP.UTF-8/man1/java.1 \
man/ja_JP.UTF-8/man1/javaws.1 \
man/ja_JP.UTF-8/man1/keytool.1 \
man/ja_JP.UTF-8/man1/orbd.1 \
man/ja_JP.UTF-8/man1/pack200.1 \
man/ja_JP.UTF-8/man1/policytool.1 \
man/ja_JP.UTF-8/man1/rmid.1 \
man/ja_JP.UTF-8/man1/rmiregistry.1 \
man/ja_JP.UTF-8/man1/servertool.1 \
man/ja_JP.UTF-8/man1/tnameserv.1 \
man/ja_JP.UTF-8/man1/unpack200.1 \
man/man1/java.1 \
man/man1/javaws.1 \
man/man1/keytool.1 \
man/man1/orbd.1 \
man/man1/pack200.1 \
man/man1/policytool.1 \
man/man1/rmid.1 \
man/man1/rmiregistry.1 \
man/man1/servertool.1 \
man/man1/tnameserv.1 \
man/man1/unpack200.1
FULL_JRE_JAR_FILES := \
charsets.jar \
ext/cldrdata.jar \
ext/dnsns.jar \
ext/nashorn.jar \
ext/zipfs.jar \
jfr.jar

View File

@ -1,245 +0,0 @@
#
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# Included or excluded types must take one of two forms
# - *.class to indicate all classes; or else
# - a full single type name e.g.
# javax/management/remote/rmi/_RMIServer_Stub.class
# You can not use arbitrary wildcards like _RMI*.class.
#
# Notes:
# - Nested types must use $$ in place of $ as $ is the make meta-character
# - If a package is not listed in any profile's inclusion list then it will
# not appear in any profile. But if a package is also missing from the
# full JRE's inclusion list then it will still be part of the full JRE.
# This is because the full JRE's inclusion lists are only used to define
# the exclusion lists for profiles; they are not used to define the full
# JRE contents - that is still done with the pre-profile legacy mechanism
# (all packagesthat can be found, less those not intended for rt.jar).
# This was done to minimize the impact of profiles on the regular
# non-profile build.
#
PROFILE_1_RTJAR_INCLUDE_PACKAGES := \
com/sun/demo/jvmti/hprof \
com/sun/java/util/jar/pack \
com/sun/net/ssl \
com/sun/nio/file \
com/sun/security/cert/internal/x509 \
java/io \
java/lang \
java/math \
java/net \
java/nio \
java/security \
java/text \
java/time \
java/util \
javax/net \
javax/script \
javax/security \
jdk \
sun/invoke \
sun/launcher \
sun/misc \
sun/net/ \
sun/nio \
sun/reflect \
sun/security \
sun/text \
sun/usagetracker \
sun/util
PROFILE_1_RTJAR_INCLUDE_TYPES :=
PROFILE_1_RTJAR_EXCLUDE_TYPES :=
PROFILE_1_INCLUDE_METAINF_SERVICES :=
PROFILE_2_RTJAR_INCLUDE_PACKAGES := \
com/sun/java_cup/internal/runtime \
com/sun/net/httpserver \
com/sun/org/apache \
com/sun/rmi/rmid \
com/sun/xml/internal/stream \
java/rmi \
java/sql \
javax/rmi/ssl \
javax/sql \
javax/transaction/xa \
javax/xml \
org/w3c \
org/xml/sax \
sun/net/httpserver \
sun/rmi \
sun/util/xml
PROFILE_2_RTJAR_INCLUDE_TYPES :=
PROFILE_2_RTJAR_EXCLUDE_TYPES :=
PROFILE_2_INCLUDE_METAINF_SERVICES :=
PROFILE_3_RTJAR_INCLUDE_PACKAGES := \
com/sun/jmx \
com/sun/jndi \
com/sun/management \
com/sun/naming/internal \
com/sun/nio/sctp \
com/sun/org/apache/xml/internal/security \
com/sun/rowset \
com/sun/security/auth \
com/sun/security/jgss \
com/sun/security/ntlm \
com/sun/security/sasl \
com/sun/tracing \
jdk/management/cmm \
java/lang/instrument \
java/lang/management \
java/security/acl \
java/util/prefs \
javax/annotation/processing \
javax/lang/model \
javax/management \
javax/naming \
javax/security/auth/kerberos \
javax/security/sasl \
javax/smartcardio \
javax/sql/rowset \
javax/tools \
javax/xml/crypto \
org/ietf/jgss \
org/jcp/xml \
sun/instrument \
sun/management \
sun/net/dns \
sun/net/www/protocol/http/ntlm \
sun/net/www/protocol/http/spnego \
sun/nio/ch/sctp \
sun/security/acl \
sun/security/jgss \
sun/security/krb5 \
sun/security/provider/certpath/ldap \
sun/security/smartcardio \
sun/tracing
PROFILE_3_RTJAR_INCLUDE_TYPES :=
PROFILE_3_RTJAR_EXCLUDE_TYPES := \
javax/management/remote/rmi/_RMIConnectionImpl_Tie.class \
javax/management/remote/rmi/_RMIConnection_Stub.class \
javax/management/remote/rmi/_RMIServerImpl_Tie.class \
javax/management/remote/rmi/_RMIServer_Stub.class
FULL_JRE_RTJAR_INCLUDE_PACKAGES := \
com/oracle \
com/sun/accessibility/internal/resources \
com/sun/activation/registries \
com/sun/awt \
com/sun/beans \
com/sun/corba \
com/sun/image/codec/jpeg \
com/sun/imageio \
com/sun/istack \
com/sun/java/browser \
com/sun/java/swing \
com/sun/jmx/remote/protocol/iiop \
com/sun/jndi/cosnaming \
com/sun/jndi/toolkit/corba \
com/sun/jndi/url/corbaname \
com/sun/jndi/url/iiop \
com/sun/jndi/url/iiopname \
com/sun/media/sound \
com/sun/org/glassfish \
com/sun/org/omg \
com/sun/swing \
com/sun/xml/internal/bind \
com/sun/xml/internal/fastinfoset \
com/sun/xml/internal/messaging \
com/sun/xml/internal/org \
com/sun/xml/internal/stream/buffer \
com/sun/xml/internal/txw2 \
com/sun/xml/internal/ws \
java/applet \
java/awt \
java/beans \
javax/accessibility \
javax/activation \
javax/activity \
javax/imageio \
javax/jws \
javax/print \
javax/rmi/CORBA \
javax/sound \
javax/swing \
javax/xml/bind \
javax/xml/soap \
javax/xml/ws \
org/omg \
sun/applet \
sun/audio \
sun/awt \
sun/corba \
sun/datatransfer \
sun/dc \
sun/font \
sun/java2d \
sun/net/ftp \
sun/net/smtp \
sun/net/www/content/audio \
sun/net/www/content/image \
sun/net/www/content/text \
sun/net/www/protocol/ftp \
sun/net/www/protocol/mailto \
sun/net/www/protocol/netdoc \
sun/print \
sun/security/tools/policytool \
sun/swing \
sun/tools/jar
FULL_JRE_RTJAR_INCLUDE_TYPES := \
javax/annotation/*.class \
javax/management/remote/rmi/_RMIConnectionImpl_Tie.class \
javax/management/remote/rmi/_RMIConnection_Stub.class \
javax/management/remote/rmi/_RMIServerImpl_Tie.class \
javax/management/remote/rmi/_RMIServer_Stub.class \
javax/rmi/*.class \
javax/transaction/*.class
FULL_JRE_RTJAR_EXCLUDE_TYPES :=
FULL_JRE_INCLUDE_METAINF_SERVICES := \
META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
META-INF/services/com.sun.tools.internal.xjc.Plugin \
META-INF/services/javax.print.PrintServiceLookup \
META-INF/services/javax.print.StreamPrintServiceFactory \
META-INF/services/javax.sound.midi.spi.MidiDeviceProvider \
META-INF/services/javax.sound.midi.spi.MidiFileReader \
META-INF/services/javax.sound.midi.spi.MidiFileWriter \
META-INF/services/javax.sound.midi.spi.SoundbankReader \
META-INF/services/javax.sound.sampled.spi.AudioFileReader \
META-INF/services/javax.sound.sampled.spi.AudioFileWriter \
META-INF/services/javax.sound.sampled.spi.FormatConversionProvider \
META-INF/services/javax.sound.sampled.spi.MixerProvider

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -54,7 +54,7 @@ $(eval $(call SetupRMICompilation,RMI_IIOP, \
$(eval $(call SetupRMICompilation,RMI_SRC, \
CLASSES := $(JMX_RMI_CLASSES), \
CLASSES_DIR := $(CLASSES_DIR)/java.management, \
STUB_CLASSES_DIR := $(RMIC_GENSRC_DIR), \
STUB_CLASSES_DIR := $(RMIC_GENSRC_DIR)/java.management, \
RUN_V12 := true, \
KEEP_GENERATED := true))

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -31,7 +31,7 @@ include RMICompilation.gmk
##########################################################################################
BTRMIC_CP := $(INTERIM_CORBA_JAR)$(PATH_SEP)$(JDK_OUTPUTDIR)/interim_rmic_classes$(PATH_SEP)$(INTERIM_LANGTOOLS_JAR)
BTRMIC_CP := $(INTERIM_CORBA_JAR)$(PATH_SEP)$(BUILDTOOLS_OUTPUTDIR)/interim_rmic_classes$(PATH_SEP)$(INTERIM_LANGTOOLS_JAR)
BTRMIC_ARGS := "-Xbootclasspath/p:$(BTRMIC_CP)" -cp "$(BTRMIC_CP)"
RMIC := $(JAVA) $(BTRMIC_ARGS) sun.rmi.rmic.Main
@ -39,6 +39,6 @@ CLASSES_DIR := $(JDK_OUTPUTDIR)/modules
# NOTE: If the smart javac dependency management is reintroduced, these classes risk
# interfering with the dependency checking. In that case they will need to be kept separate.
STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/modules
RMIC_GENSRC_DIR := $(JDK_OUTPUTDIR)/gendocsrc_rmic
RMIC_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/rmic
##########################################################################################

View File

@ -0,0 +1,514 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package build.tools.module;
import jdk.internal.jimage.Archive;
import jdk.internal.jimage.ImageFile;
import jdk.internal.jimage.ImageModules;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.UncheckedIOException;
import java.nio.ByteOrder;
import java.nio.file.Files;
import java.nio.file.InvalidPathException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.PosixFilePermission;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
/**
* A tool for building a runtime image.
*
* java build.tools.module.ImageBuilder <options> --output <path> top/modules.xml,...
* Possible options are:
* --cmds Location of native commands
* --configs Location of config files
* --help Print this usage message
* --classes Location of module classes files
* --libs Location of native libraries
* --mods Comma separated list of module names
* --output Location of the output path
* --endian Byte order of the target runtime; {little,big}
*/
class ImageBuilder {
static class BadArgs extends Exception {
private static final long serialVersionUID = 0L;
BadArgs(String format, Object... args) {
super(String.format(format, args));
this.format = format;
this.args = args;
}
BadArgs showUsage(boolean b) {
showUsage = b;
return this;
}
final String format;
final Object[] args;
boolean showUsage;
}
static abstract class Option {
final boolean hasArg;
final String[] aliases;
Option(boolean hasArg, String... aliases) {
this.hasArg = hasArg;
this.aliases = aliases;
}
boolean isHidden() {
return false;
}
boolean matches(String opt) {
for (String a : aliases) {
if (a.equals(opt)) {
return true;
} else if (opt.startsWith("--") && hasArg && opt.startsWith(a + "=")) {
return true;
}
}
return false;
}
boolean ignoreRest() {
return false;
}
abstract void process(ImageBuilder task, String opt, String arg) throws BadArgs;
abstract String description();
}
private static Path CWD = Paths.get("");
private static List<Path> splitPath(String arg, String separator)
throws BadArgs
{
List<Path> paths = new ArrayList<>();
for (String p: arg.split(separator)) {
if (p.length() > 0) {
try {
Path path = CWD.resolve(p);
if (Files.notExists(path))
throw new BadArgs("path not found: %s", path);
paths.add(path);
} catch (InvalidPathException x) {
throw new BadArgs("path not valid: %s", p);
}
}
}
return paths;
}
static Option[] recognizedOptions = {
new Option(true, "--cmds") {
void process(ImageBuilder task, String opt, String arg) throws BadArgs {
task.options.cmds = splitPath(arg, File.pathSeparator);
}
String description() { return "Location of native commands"; }
},
new Option(true, "--configs") {
void process(ImageBuilder task, String opt, String arg) throws BadArgs {
task.options.configs = splitPath(arg, File.pathSeparator);
}
String description() { return "Location of config files"; }
},
new Option(false, "--help") {
void process(ImageBuilder task, String opt, String arg) {
task.options.help = true;
}
String description() { return "Print this usage message"; }
},
new Option(true, "--classes") {
void process(ImageBuilder task, String opt, String arg) throws BadArgs {
task.options.classes = splitPath(arg, File.pathSeparator);
}
String description() { return "Location of module classes files"; }
},
new Option(true, "--libs") {
void process(ImageBuilder task, String opt, String arg) throws BadArgs {
task.options.libs = splitPath(arg, File.pathSeparator);
}
String description() { return "Location of native libraries"; }
},
new Option(true, "--mods") {
void process(ImageBuilder task, String opt, String arg) throws BadArgs {
for (String mn : arg.split(",")) {
if (mn.isEmpty())
throw new BadArgs("Module not found", mn);
task.options.mods.add(mn);
}
}
String description() { return "Comma separated list of module names"; }
},
new Option(true, "--output") {
void process(ImageBuilder task, String opt, String arg) throws BadArgs {
Path path = Paths.get(arg);
task.options.output = path;
}
String description() { return "Location of the output path"; }
},
new Option(true, "--endian") {
void process(ImageBuilder task, String opt, String arg) throws BadArgs {
if (arg.equals("little"))
task.options.endian = ByteOrder.LITTLE_ENDIAN;
else if (arg.equals("big"))
task.options.endian = ByteOrder.BIG_ENDIAN;
else
throw new BadArgs("Unknown byte order " + arg);
}
String description() { return "Byte order of the target runtime; {little,big}"; }
}
};
private final Options options = new Options();
private PrintWriter log;
void setLog(PrintWriter out) {
log = out;
}
Set<Module> moduleGraph = new java.util.HashSet<>();
/** Module list files */
private static final String BOOT_MODULES = "boot.modules";
private static final String EXT_MODULES = "ext.modules";
/**
* Result codes.
*/
static final int EXIT_OK = 0, // Completed with no errors.
EXIT_ERROR = 1, // Completed but reported errors.
EXIT_CMDERR = 2, // Bad command-line arguments
EXIT_SYSERR = 3, // System error or resource exhaustion.
EXIT_ABNORMAL = 4; // terminated abnormally
static class Options {
boolean help;
List<Path> classes;
List<Path> cmds;
List<Path> configs;
List<Path> libs;
Set<String> mods = new HashSet<>();
Path output;
ByteOrder endian = ByteOrder.nativeOrder(); // default, if not specified
}
public static void main(String[] args) throws Exception {
ImageBuilder builder = new ImageBuilder();
int rc = builder.run(args);
System.exit(rc);
}
int run(String[] args) {
if (log == null)
log = new PrintWriter(System.out);
try {
handleOptions(args);
if (options.help) {
showHelp();
return EXIT_OK;
}
if (options.classes == null)
throw new BadArgs("--classes must be specified").showUsage(true);
Path output = options.output;
if (output == null)
throw new BadArgs("--output must be specified").showUsage(true);
Files.createDirectories(output);
if (Files.list(output).findFirst().isPresent())
throw new BadArgs("dir not empty", output);
if (options.mods.isEmpty())
throw new BadArgs("--mods must be specified").showUsage(true);
if (moduleGraph.isEmpty())
throw new BadArgs("modules.xml must be specified").showUsage(true);
if (options.cmds == null || options.cmds.isEmpty())
warning("--commands is not set");
if (options.libs == null || options.libs.isEmpty())
warning("--libs is not set");
//if (options.configs == null || options.configs.isEmpty())
// warning("--configs is not set");
// additional option combination validation
boolean ok = run();
return ok ? EXIT_OK : EXIT_ERROR;
} catch (BadArgs e) {
reportError(e.format, e.args);
if (e.showUsage)
log.println(USAGE_SUMMARY);
return EXIT_CMDERR;
} catch (Exception x) {
x.printStackTrace();
return EXIT_ABNORMAL;
} finally {
log.flush();
}
}
private boolean run() throws IOException {
createImage();
return true;
}
class SimpleResolver {
private final Set<Module> initialMods;
private final Map<String,Module> nameToModule = new HashMap<>();
SimpleResolver(Set<String> mods, Set<Module> graph) {
graph.stream()
.forEach(m -> nameToModule.put(m.name(), m));
initialMods = mods.stream()
.map(this::nameToModule)
.collect(Collectors.toSet());
}
/** Returns the transitive closure, in topological order */
List<String> resolve() {
List<Module> result = new LinkedList<>();
Set<Module> visited = new HashSet<>();
Set<Module> done = new HashSet<>();
for (Module m : initialMods) {
if (!visited.contains(m))
visit(m, visited, result, done);
}
return result.stream()
.map(m -> m.name())
.collect(Collectors.toList());
}
private void visit(Module m, Set<Module> visited,
List<Module> result, Set<Module> done) {
if (visited.contains(m)) {
if (!done.contains(m))
throw new IllegalArgumentException("Cyclic detected: " +
m + " " + getModuleDependences(m));
return;
}
visited.add(m);
getModuleDependences(m).stream()
.forEach(d -> visit(d, visited, result, done));
done.add(m);
result.add(m);
}
private Module nameToModule(String name) {
Module m = nameToModule.get(name);
if (m == null)
throw new RuntimeException("No module definition for " + name);
return m;
}
private Set<Module> getModuleDependences(Module m) {
return m.requires().stream()
.map(d -> d.name())
.map(this::nameToModule)
.collect(Collectors.toSet());
}
}
private List<String> resolve(Set<String> mods ) {
return (new SimpleResolver(mods, moduleGraph)).resolve();
}
/**
* chmod ugo+x file
*/
private void setExecutable(Path file) {
try {
Set<PosixFilePermission> perms = Files.getPosixFilePermissions(file);
perms.add(PosixFilePermission.OWNER_EXECUTE);
perms.add(PosixFilePermission.GROUP_EXECUTE);
perms.add(PosixFilePermission.OTHERS_EXECUTE);
Files.setPosixFilePermissions(file, perms);
} catch (IOException ioe) {
throw new UncheckedIOException(ioe);
}
}
private void createImage() throws IOException {
Collection<String> modules = resolve(options.mods);
log.print(modules.stream().collect(Collectors.joining(" ")));
ImageFileHelper imageHelper = new ImageFileHelper(modules);
imageHelper.createModularImage(options.output);
// jspawnhelper, might be in lib or lib/ARCH
Path jspawnhelper = Paths.get("jspawnhelper");
Path lib = options.output.resolve("lib");
Optional<Path> helper = Files.walk(lib, 2)
.filter(f -> f.getFileName().equals(jspawnhelper))
.findFirst();
if (helper.isPresent())
setExecutable(helper.get());
}
private class ImageFileHelper {
final Collection<String> modules;
final Set<String> bootModules;
final Set<String> extModules;
final Set<String> appModules;
final ImageModules imf;
ImageFileHelper(Collection<String> modules) throws IOException {
this.modules = modules;
this.bootModules = modulesFor(BOOT_MODULES).stream()
.filter(modules::contains)
.collect(Collectors.toSet());
this.extModules = modulesFor(EXT_MODULES).stream()
.filter(modules::contains)
.collect(Collectors.toSet());
this.appModules = modules.stream()
.filter(m -> !bootModules.contains(m) && !extModules.contains(m))
.collect(Collectors.toSet());
this.imf = new ImageModules(bootModules, extModules, appModules);
}
void createModularImage(Path output) throws IOException {
Set<Archive> archives = modules.stream()
.map(this::toModuleArchive)
.collect(Collectors.toSet());
ImageFile.create(output, archives, imf, options.endian);
}
ModuleArchive toModuleArchive(String mn) {
return new ModuleArchive(mn,
moduleToPath(mn, options.classes, false/*true*/),
moduleToPath(mn, options.cmds, false),
moduleToPath(mn, options.libs, false),
moduleToPath(mn, options.configs, false));
}
private Path moduleToPath(String name, List<Path> paths, boolean expect) {
Set<Path> foundPaths = new HashSet<>();
if (paths != null) {
for (Path p : paths) {
Path rp = p.resolve(name);
if (Files.exists(rp))
foundPaths.add(rp);
}
}
if (foundPaths.size() > 1)
throw new RuntimeException("Found more that one path for " + name);
if (expect && foundPaths.size() != 1)
throw new RuntimeException("Expected to find classes path for " + name);
return foundPaths.size() == 0 ? null : foundPaths.iterator().next();
}
private List<String> modulesFor(String name) throws IOException {
try (InputStream is = ImageBuilder.class.getResourceAsStream(name);
BufferedReader reader = new BufferedReader(new InputStreamReader(is))) {
return reader.lines().collect(Collectors.toList());
}
}
}
public void handleOptions(String[] args) throws BadArgs {
// process options
for (int i=0; i < args.length; i++) {
if (args[i].charAt(0) == '-') {
String name = args[i];
Option option = getOption(name);
String param = null;
if (option.hasArg) {
if (name.startsWith("--") && name.indexOf('=') > 0) {
param = name.substring(name.indexOf('=') + 1, name.length());
} else if (i + 1 < args.length) {
param = args[++i];
}
if (param == null || param.isEmpty() || param.charAt(0) == '-') {
throw new BadArgs("Missing arg for %n", name).showUsage(true);
}
}
option.process(this, name, param);
if (option.ignoreRest()) {
i = args.length;
}
} else {
// process rest of the input arguments
Path p = Paths.get(args[i]);
try {
moduleGraph.addAll(ModulesXmlReader.readModules(p)
.stream()
.collect(Collectors.toSet()));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
}
private Option getOption(String name) throws BadArgs {
for (Option o : recognizedOptions) {
if (o.matches(name)) {
return o;
}
}
throw new BadArgs("Unknown option %s", name).showUsage(true);
}
private void reportError(String format, Object... args) {
log.format("Error: " + format + "%n", args);
}
private void warning(String format, Object... args) {
log.format("Warning: " + format + "%n", args);
}
private static final String USAGE =
"ImageBuilder <options> --output <path> path-to-modules-xml\n";
private static final String USAGE_SUMMARY =
USAGE + "Use --help for a list of possible options.";
private void showHelp() {
log.format(USAGE);
log.format("Possible options are:%n");
for (Option o : recognizedOptions) {
String name = o.aliases[0].substring(1); // there must always be at least one name
name = name.charAt(0) == '-' ? name.substring(1) : name;
if (o.isHidden() || name.equals("h"))
continue;
log.format(" --%s\t\t\t%s%n", name, o.description());
}
}
}

Some files were not shown because too many files have changed in this diff Show More