7110002: Rename xawt/libmawt.so and headless/libmawt.so so they can be colocated with libawt
authorchegar
Fri, 27 Jan 2012 13:48:40 +0000
changeset 11665 98dad53a8ba1
parent 11664 5e4b10294666
child 11666 46e4f3b9cbfa
7110002: Rename xawt/libmawt.so and headless/libmawt.so so they can be colocated with libawt Reviewed-by: art, prr, dholmes, alanb
jdk/make/common/Release-embedded.gmk
jdk/make/sun/font/Makefile
jdk/make/sun/font/t2k/Makefile
jdk/make/sun/headless/Makefile
jdk/make/sun/jawt/Makefile
jdk/make/sun/xawt/Makefile
jdk/src/solaris/native/java/lang/java_props_md.c
jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c
--- a/jdk/make/common/Release-embedded.gmk	Fri Jan 27 17:36:35 2012 +0400
+++ b/jdk/make/common/Release-embedded.gmk	Fri Jan 27 13:48:40 2012 +0000
@@ -189,7 +189,7 @@
 	$(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/audio
 	$(RM) -fr $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/applet
 	$(RM)  $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/awt_robot
-	$(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/xawt
+	$(RM)  $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/libawt_xawt.so
 	$(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/libsplashscreen.so
 	@# Remove oblique fonts and reduce font support to LucidaSansRegular only
 	$(RM) -fr $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/oblique-fonts
--- a/jdk/make/sun/font/Makefile	Fri Jan 27 17:36:35 2012 +0400
+++ b/jdk/make/sun/font/Makefile	Fri Jan 27 13:48:40 2012 +0000
@@ -175,7 +175,7 @@
 ifeq ($(PLATFORM), solaris)
   # Note that on Solaris, fontmanager is built against the headless library.
   LDFLAGS      += -L$(LIBDIR)/$(LIBARCH)/headless
-  OTHER_LDLIBS += -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt -lc $(LIBM) $(LIBCXX)
+  OTHER_LDLIBS += -lawt -lawt_xawt -lc $(LIBM) $(LIBCXX)
 else # PLATFORM is linux
  OTHER_LDLIBS  += -lawt $(LIBM) $(LIBCXX)
   ifeq ("$(CC_VER_MAJOR)", "3")
--- a/jdk/make/sun/font/t2k/Makefile	Fri Jan 27 17:36:35 2012 +0400
+++ b/jdk/make/sun/font/t2k/Makefile	Fri Jan 27 13:48:40 2012 +0000
@@ -99,7 +99,7 @@
     endif                           
   else
     ifeq ($(PLATFORM), solaris)
-      OTHER_LDLIBS += -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt
+      OTHER_LDLIBS += -lawt -lawt_xawt
     endif
   endif
 endif
--- a/jdk/make/sun/headless/Makefile	Fri Jan 27 17:36:35 2012 +0400
+++ b/jdk/make/sun/headless/Makefile	Fri Jan 27 13:48:40 2012 +0000
@@ -28,11 +28,9 @@
 NO_ROBOT = true
 MOTIF_VERSION = none
 MOTIF_VERSION_STRING=none
-LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/headless
 
 PACKAGE = sun.awt
-LIBRARY = mawt
-LIBRARY_OUTPUT = headless
+LIBRARY = awt_headless
 PRODUCT = sun
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/make/sun/jawt/Makefile	Fri Jan 27 17:36:35 2012 +0400
+++ b/jdk/make/sun/jawt/Makefile	Fri Jan 27 13:48:40 2012 +0000
@@ -113,17 +113,17 @@
 #
 ifeq ($(PLATFORM), solaris)
   ifndef BUILD_HEADLESS_ONLY
-    OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -L$(OPENWIN_LIB) -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt -L/usr/openwin/sfw/lib$(ISA_DIR) -lXrender
+    OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -L$(OPENWIN_LIB) -lawt_xawt -L/usr/openwin/sfw/lib$(ISA_DIR) -lXrender
   else
-    OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -L$(OPENWIN_LIB) -L$(LIBDIR)/$(LIBARCH)/headless -lmawt -L/usr/openwin/sfw/lib$(ISA_DIR) -lXrender
+    OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -L$(OPENWIN_LIB) -lawt_headless -L/usr/openwin/sfw/lib$(ISA_DIR) -lXrender
   endif
 endif # PLATFORM
 
 ifeq ($(PLATFORM), linux)
   ifndef BUILD_HEADLESS_ONLY
-    OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt
+    OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -lawt -lawt_xawt
   else
-    OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -lawt -L$(LIBDIR)/$(LIBARCH)/headless -lmawt
+    OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -lawt -lawt_headless
     CFLAGS += -DHEADLESS
   endif
 endif # PLATFORM
--- a/jdk/make/sun/xawt/Makefile	Fri Jan 27 17:36:35 2012 +0400
+++ b/jdk/make/sun/xawt/Makefile	Fri Jan 27 13:48:40 2012 +0000
@@ -25,9 +25,7 @@
 
 BUILDDIR = ../..
 PACKAGE = sun.awt.X11
-LIBRARY = mawt
-LIBRARY_OUTPUT = xawt
-LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/xawt
+LIBRARY = awt_xawt
 PRODUCT = sun
 
 include $(BUILDDIR)/common/Defs.gmk
--- a/jdk/src/solaris/native/java/lang/java_props_md.c	Fri Jan 27 17:36:35 2012 +0400
+++ b/jdk/src/solaris/native/java/lang/java_props_md.c	Fri Jan 27 13:48:40 2012 +0000
@@ -310,7 +310,7 @@
 }
 
 #ifdef JAVASE_EMBEDDED
-/* Determine the default embedded toolkit based on whether lib/xawt/
+/* Determine the default embedded toolkit based on whether libawt_xawt
  * exists in the JRE. This can still be overridden by -Dawt.toolkit=XXX
  */
 static char* getEmbeddedToolkit() {
@@ -325,8 +325,8 @@
     realpath((char *)dlinfo.dli_fname, buf);
     len = strlen(buf);
     p = strrchr(buf, '/');
-    /* Default AWT Toolkit on Linux and Solaris is XAWT. */
-    strncpy(p, "/xawt/", MAXPATHLEN-len-1);
+    /* Default AWT Toolkit on Linux and Solaris is XAWT (libawt_xawt.so). */
+    strncpy(p, "/libawt_xawt.so", MAXPATHLEN-len-1);
     /* Check if it exists */
     if (stat(buf, &statbuf) == -1 && errno == ENOENT) {
         /* No - this is a reduced-headless-jre so use special HToolkit */
--- a/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c	Fri Jan 27 17:36:35 2012 +0400
+++ b/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c	Fri Jan 27 13:48:40 2012 +0000
@@ -105,7 +105,7 @@
 
     /*
      * The code below is responsible for:
-     * 1. Loading appropriate awt library, i.e. xawt/libmawt or headless/libwawt
+     * 1. Loading appropriate awt library, i.e. libawt_xawt or libawt_headless
      * 2. Setting "awt.toolkit" system property to use the appropriate Java toolkit class,
      *    (if user has specified the toolkit in env varialble)
      */
@@ -130,10 +130,10 @@
 
     /* Calculate library name to load */
     if (AWTIsHeadless()) {
-        strncpy(p, "/headless/libmawt.so", MAXPATHLEN-len-1);
+        strncpy(p, "/libawt_headless.so", MAXPATHLEN-len-1);
     } else {
         /* Default AWT Toolkit on Linux and Solaris is XAWT. */
-        strncpy(p, "/xawt/libmawt.so", MAXPATHLEN-len-1);
+        strncpy(p, "/libawt_xawt.so", MAXPATHLEN-len-1);
     }
 
     if (toolkit) {
@@ -161,7 +161,7 @@
 /*
  * This entry point must remain in libawt.so as part of a contract
  * with the CDE variant of Java Media Framework. (sdtjmplay)
- * Reflect this call over to the correct libmawt.so.
+ * Reflect this call over to the correct libawt_<toolkit>.so.
  */
 JNIEXPORT void JNICALL
 Java_sun_awt_motif_XsessionWMcommand(JNIEnv *env, jobject this,
@@ -191,7 +191,7 @@
 /*
  * This entry point must remain in libawt.so as part of a contract
  * with the CDE variant of Java Media Framework. (sdtjmplay)
- * Reflect this call over to the correct libmawt.so.
+ * Reflect this call over to the correct libawt_<toolkit>.so.
  */
 JNIEXPORT void JNICALL
 Java_sun_awt_motif_XsessionWMcommand_New(JNIEnv *env, jobjectArray jargv)
@@ -250,7 +250,7 @@
 
 /*
  * These entry point must remain in libawt.so ***for Java Plugin ONLY***
- * Reflect this call over to the correct libmawt.so.
+ * Reflect this call over to the correct libawt_<toolkit>.so.
  */
 
 REFLECT_VOID_FUNCTION(getAwtLockFunctions,