8078058: Clean up mac bundles logic
Reviewed-by: erikj
This commit is contained in:
parent
968a4d3e25
commit
50d1f86836
@ -690,10 +690,10 @@ SYMBOLS_IMAGE_SUBDIR:=symbols
|
|||||||
SYMBOLS_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(SYMBOLS_IMAGE_SUBDIR)
|
SYMBOLS_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(SYMBOLS_IMAGE_SUBDIR)
|
||||||
|
|
||||||
# Macosx bundles directory definitions
|
# Macosx bundles directory definitions
|
||||||
JDK_BUNDLE_SUBDIR=jdk-bundle/jdk$(JDK_VERSION).jdk/Contents
|
JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle/jdk$(JDK_VERSION).jdk/Contents
|
||||||
JRE_BUNDLE_SUBDIR=jre-bundle/jre$(JDK_VERSION).jre/Contents
|
JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle/jre$(JDK_VERSION).jre/Contents
|
||||||
JDK_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR)
|
JDK_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR)
|
||||||
JRE_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR)
|
JRE_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR)
|
||||||
|
|
||||||
# This macro is called to allow inclusion of closed source counterparts.
|
# This macro is called to allow inclusion of closed source counterparts.
|
||||||
# Unless overridden in closed sources, it expands to nothing.
|
# Unless overridden in closed sources, it expands to nothing.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -91,8 +91,8 @@ $(JPRT_ARCHIVE_SYMBOLS_BUNDLE): bundles
|
|||||||
SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR)
|
SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR)
|
||||||
SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR)
|
SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR)
|
||||||
SRC_TEST_IMAGE_DIR := $(TEST_IMAGE_DIR)
|
SRC_TEST_IMAGE_DIR := $(TEST_IMAGE_DIR)
|
||||||
SRC_JDK_BUNDLE_DIR := $(JDK_BUNDLE_DIR)
|
SRC_JDK_MACOSX_BUNDLE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
|
||||||
SRC_JRE_BUNDLE_DIR := $(JRE_BUNDLE_DIR)
|
SRC_JRE_MACOSX_BUNDLE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
|
||||||
|
|
||||||
# Bundle up the images
|
# Bundle up the images
|
||||||
bundles: all
|
bundles: all
|
||||||
@ -123,10 +123,10 @@ final-images: all
|
|||||||
$(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/
|
$(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/
|
||||||
$(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/
|
$(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/
|
||||||
ifeq ($(OPENJDK_TARGET_OS),macosx)
|
ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||||
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)
|
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_MACOSX_BUNDLE_SUBDIR)
|
||||||
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)
|
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_MACOSX_BUNDLE_SUBDIR)
|
||||||
$(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/
|
$(CP) -R -P $(SRC_JDK_MACOSX_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_MACOSX_BUNDLE_SUBDIR)/
|
||||||
$(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/
|
$(CP) -R -P $(SRC_JRE_MACOSX_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_MACOSX_BUNDLE_SUBDIR)/
|
||||||
endif
|
endif
|
||||||
@$(call TargetExit)
|
@$(call TargetExit)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -33,32 +33,13 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
|||||||
|
|
||||||
bundles: jre-bundle jdk-bundle
|
bundles: jre-bundle jdk-bundle
|
||||||
|
|
||||||
# JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
|
# JDK_MACOSX_BUNDLE_DIR and JRE_MACOSX_BUNDLE_DIR are defined in SPEC.
|
||||||
|
|
||||||
MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle
|
MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle
|
||||||
|
|
||||||
# All these OPENJDK checks are needed since there is no coherency between
|
BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(JDK_MINOR_VERSION)u$(JDK_UPDATE_VERSION)
|
||||||
# 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 := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION)
|
||||||
BUNDLE_NAME_JRE := $(BUNDLE_NAME)
|
BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_VERSION)
|
||||||
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_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
|
||||||
BUNDLE_VERSION := $(JDK_VERSION)
|
BUNDLE_VERSION := $(JDK_VERSION)
|
||||||
ifeq ($(COMPANY_NAME), N/A)
|
ifeq ($(COMPANY_NAME), N/A)
|
||||||
@ -67,65 +48,66 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
|||||||
BUNDLE_VENDOR := $(COMPANY_NAME)
|
BUNDLE_VENDOR := $(COMPANY_NAME)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR))
|
JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR))
|
||||||
JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR))
|
JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR))
|
||||||
|
|
||||||
JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST))
|
JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_MACOSX_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST))
|
||||||
JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST))
|
JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_MACOSX_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST))
|
||||||
|
|
||||||
# Copy empty directories (jre/lib/applet).
|
# Copy empty directories (jre/lib/applet).
|
||||||
$(JDK_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
|
$(JDK_MACOSX_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
|
||||||
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||||
$(MKDIR) -p $(@D)
|
$(MKDIR) -p $(@D)
|
||||||
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
|
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
|
||||||
|
|
||||||
$(JRE_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
|
$(JRE_MACOSX_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
|
||||||
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||||
$(MKDIR) -p $(@D)
|
$(MKDIR) -p $(@D)
|
||||||
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
|
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
|
||||||
|
|
||||||
$(JDK_BUNDLE_DIR)/MacOS/libjli.dylib:
|
$(JDK_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib:
|
||||||
$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||||
$(MKDIR) -p $(@D)
|
$(MKDIR) -p $(@D)
|
||||||
$(RM) $@
|
$(RM) $@
|
||||||
$(LN) -s ../Home/lib/jli/libjli.dylib $@
|
$(LN) -s ../Home/lib/jli/libjli.dylib $@
|
||||||
|
|
||||||
$(JRE_BUNDLE_DIR)/MacOS/libjli.dylib:
|
$(JRE_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib:
|
||||||
$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||||
$(MKDIR) -p $(@D)
|
$(MKDIR) -p $(@D)
|
||||||
$(RM) $@
|
$(RM) $@
|
||||||
$(LN) -s ../Home/lib/jli/libjli.dylib $@
|
$(LN) -s ../Home/lib/jli/libjli.dylib $@
|
||||||
|
|
||||||
$(JDK_BUNDLE_DIR)/Info.plist: $(SPEC)
|
$(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \
|
||||||
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
|
||||||
$(MKDIR) -p $(@D)
|
OUTPUT_FILE := $(JDK_MACOSX_BUNDLE_DIR)/Info.plist, \
|
||||||
$(SED) -e "s/@@ID@@/$(BUNDLE_ID_JDK)/g" \
|
REPLACEMENTS := \
|
||||||
-e "s/@@NAME@@/$(BUNDLE_NAME_JDK)/g" \
|
@@ID@@ => $(BUNDLE_ID).jdk ; \
|
||||||
-e "s/@@INFO@@/$(BUNDLE_INFO_JDK)/g" \
|
@@NAME@@ => $(BUNDLE_NAME) ; \
|
||||||
-e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
|
@@INFO@@ => $(BUNDLE_INFO) ; \
|
||||||
-e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
|
@@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
|
||||||
-e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
|
@@VERSION@@ => $(BUNDLE_VERSION) ; \
|
||||||
< $(MACOSX_PLIST_SRC)/JDK-Info.plist > $@
|
@@VENDOR@@ => $(BUNDLE_VENDOR) , \
|
||||||
|
))
|
||||||
|
|
||||||
$(JRE_BUNDLE_DIR)/Info.plist: $(SPEC)
|
$(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \
|
||||||
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \
|
||||||
$(MKDIR) -p $(@D)
|
OUTPUT_FILE := $(JRE_MACOSX_BUNDLE_DIR)/Info.plist, \
|
||||||
$(SED) -e "s/@@ID@@/$(BUNDLE_ID_JRE)/g" \
|
REPLACEMENTS := \
|
||||||
-e "s/@@NAME@@/$(BUNDLE_NAME_JRE)/g" \
|
@@ID@@ => $(BUNDLE_ID).jre ; \
|
||||||
-e "s/@@INFO@@/$(BUNDLE_INFO_JRE)/g" \
|
@@NAME@@ => $(BUNDLE_NAME) ; \
|
||||||
-e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
|
@@INFO@@ => $(BUNDLE_INFO) ; \
|
||||||
-e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
|
@@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
|
||||||
-e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
|
@@VERSION@@ => $(BUNDLE_VERSION) ; \
|
||||||
< $(MACOSX_PLIST_SRC)/JRE-Info.plist > $@
|
@@VENDOR@@ => $(BUNDLE_VENDOR) , \
|
||||||
|
))
|
||||||
|
|
||||||
jdk-bundle: $(JDK_TARGET_LIST) $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib \
|
jdk-bundle: $(JDK_TARGET_LIST) $(JDK_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib \
|
||||||
$(JDK_BUNDLE_DIR)/Info.plist
|
$(BUILD_JDK_PLIST)
|
||||||
$(SETFILE) -a B $(dir $(JDK_BUNDLE_DIR))
|
$(SETFILE) -a B $(dir $(JDK_MACOSX_BUNDLE_DIR))
|
||||||
|
|
||||||
jre-bundle: $(JRE_TARGET_LIST) $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib \
|
jre-bundle: $(JRE_TARGET_LIST) $(JRE_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib \
|
||||||
$(JRE_BUNDLE_DIR)/Info.plist
|
$(BUILD_JRE_PLIST)
|
||||||
$(SETFILE) -a B $(dir $(JRE_BUNDLE_DIR))
|
$(SETFILE) -a B $(dir $(JRE_MACOSX_BUNDLE_DIR))
|
||||||
|
|
||||||
else # Not macosx
|
else # Not macosx
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user