jdk/make/common/Release.gmk
changeset 12047 320a714614e9
parent 11994 74f1488b7347
child 12054 e395fe961b4a
--- a/jdk/make/common/Release.gmk	Tue Mar 06 10:25:45 2012 +0800
+++ b/jdk/make/common/Release.gmk	Tue Mar 06 20:34:38 2012 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2012, 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
@@ -74,6 +74,10 @@
 
 JTG_DOCS            = $(JDK_TOPDIR)/src/solaris/doc
 
+ifeq ($(PLATFORM), macosx)
+  include $(JDK_TOPDIR)/make/common/Release-$(PLATFORM).gmk
+endif
+
 # The base names of all the license and document files for the jdk and jre
 #   (These files get placed in the jdk and jre install images)
 ifdef OPENJDK
@@ -230,11 +234,22 @@
 	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
 
 # Order is important here, trim jre after jdk image is created
+ifeq ($(PLATFORM), macosx)
+
+images:: sanity-images post-sanity-images  \
+	 $(INITIAL_IMAGE_JRE) $(EXTRA_JRE_TARGETS) $(INITIAL_IMAGE_JDK) \
+	 trim-image-jre trim-image-jdk \
+     identify-image-jre identify-image-jdk \
+	 process-image-jre process-image-jdk sec-files sec-files-win jgss-files \
+	 $(EXTRA_IMAGE_TARGETS)
+else
+
 images:: sanity-images post-sanity-images  \
 	 $(INITIAL_IMAGE_JRE) $(INITIAL_IMAGE_JDK) \
 	 trim-image-jre trim-image-jdk \
          identify-image-jre identify-image-jdk \
-	 process-image-jre process-image-jdk sec-files sec-files-win jgss-files
+	 process-image-jre process-image-jdk sec-files sec-files-win jgss-files 
+endif
 
 # Don't use these
 image-jre:: initial-image-jre trim-image-jre identify-image-jre process-image-jre
@@ -810,6 +825,10 @@
 	    $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \
 		-o meta-index *.jar
 	@$(CD) $(JRE_IMAGE_DIR)/lib/ext && $(java-vm-cleanup)
+ifeq ($(PLATFORM), macosx)
+	@#install jobjc, apple mac only
+	$(CP) $(OUTPUTDIR)/JObjC.build/JObjC.jar $(JRE_IMAGE_DIR)/lib/JObjC.jar
+endif
 ifeq ($(PLATFORM), windows)
 	@# Remove certain *.lib files
 	$(CD) $(JRE_IMAGE_DIR)/lib && \
@@ -952,6 +971,10 @@
 	$(RM) $(JDK_IMAGE_DIR)/db/index.html $(JDK_IMAGE_DIR)/db/register.html
 endif
 
+# The launcher source files we need for src.zip
+FILES_launcher = $(wildcard $(SHARE_SRC)/bin/*) \
+                 $(wildcard $(PLATFORM_SRC)/bin/java_md*)
+
 # Standard jdk image
 initial-image-jdk:: initial-image-jdk-setup \
 		    initial-image-jdk-db \
@@ -1038,7 +1061,8 @@
 	@# generated by the more efficient solaris/windows method of copying files.
 	@# So for Linux, make use of the -T option (like Solaris' -I option) of
 	@# obtaining the list of files from a file. MKS tar has no such option.
-  ifeq ($(PLATFORM), linux)
+
+  ifneq (,$(findstring $(PLATFORM), linux macosx))
 	for d in $(SOURCE_DIRS); do \
 	  $(RM) $(ABS_TEMPDIR)/src-files.list; \
 	  ($(CD) $$d &&  \
@@ -1076,20 +1100,7 @@
 	$(RM) $(ABS_TEMPDIR)/src-files.list
 	$(CHMOD) -R +w $(JDK_IMAGE_DIR)/src
 	$(MKDIR) -p $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/java.c $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/java.h $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/manifest_info.h $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/parse_manifest.c $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/version_comp.c $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/version_comp.h $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/wildcard.h $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/wildcard.c $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/jli_util.h $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/jli_util.c $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/splashscreen_stubs.c $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(SHARE_SRC)/bin/splashscreen.h $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(PLATFORM_SRC)/bin/java_md.c $(JDK_IMAGE_DIR)/src/launcher
-	$(CP) $(PLATFORM_SRC)/bin/java_md.h $(JDK_IMAGE_DIR)/src/launcher
+	$(CP) $(FILES_launcher) $(JDK_IMAGE_DIR)/src/launcher
 	$(CD) $(JDK_IMAGE_DIR)/src && $(ZIPEXE) -qr ../src.zip *
 	$(RM) -r $(JDK_IMAGE_DIR)/src
 	@#