6928167 Integrate X server mdb module into xorg-server build & packages (fix SPARC build) nv_135
authorAlan Coopersmith <Alan.Coopersmith@Sun.COM>
Sun, 28 Feb 2010 15:25:31 -0800
changeset 916 a2113251a45c
parent 915 1bcb45a1b537
child 917 4b013f549850
6928167 Integrate X server mdb module into xorg-server build & packages (fix SPARC build)
open-src/xserver/Makefile.inc
open-src/xserver/xorg/Makefile
open-src/xserver/xvnc/Makefile
--- a/open-src/xserver/Makefile.inc	Sun Feb 28 13:19:52 2010 -0800
+++ b/open-src/xserver/Makefile.inc	Sun Feb 28 15:25:31 2010 -0800
@@ -124,3 +124,33 @@
 ### Include common rulesets
 include $(TOP)/common/Makefile.inc
 
+## mdb module rules
+# Build & install mdb modules & scripts that aren't integrated to
+# normal build process - these are here since they are built in
+# the Xorg build for 32-bit & 64-bit x86 and 64-bit SPARC, but
+# in the Xvnc build for 32-bit SPARC
+MDB_SOURCE_DIR=$(XORG_BUILD_DIR)/os/solaris/mdb
+MDB_MODULE_DIR=/usr/lib/mdb/proc/$(ARCHLIBSUBDIR)
+MDB_SCRIPT_DIR=/usr/demo/Xserver/mdb
+MDB_SCRIPTS=list_Xserver_clients \
+	list_Xserver_devicegrab_client \
+	list_Xserver_servergrab_client
+
+# Since configure options aren't used to build the mdb modules, pass
+# those variables at build tie
+MDB_BUILD_ENV=$(CONFIG_ENV) $(BUILD_ENV)
+
+build_mdb: $(MDB_SOURCE_DIR)/modules/Xserver.so
+
+$(MDB_SOURCE_DIR)/modules/Xserver.so: $(CONFIGURE_TARGETS)
+	(cd $(MDB_SOURCE_DIR) ; \
+         $(MDB_BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
+
+install_mdb: $(MDB_SOURCE_DIR)/modules/Xserver.so
+	mkdir -p $(PROTODIR)$(MDB_MODULE_DIR) $(PROTODIR)$(MDB_SCRIPT_DIR)
+	cp -pf $(MDB_SOURCE_DIR)/modules/Xserver.so \
+		 $(PROTODIR)$(MDB_MODULE_DIR)/
+	cp -pf $(MDB_SCRIPTS:%=$(MDB_SOURCE_DIR)/scripts/%) \
+		 $(PROTODIR)$(MDB_SCRIPT_DIR)/
+	chmod 0755 $(MDB_SCRIPTS:%=$(PROTODIR)$(MDB_SCRIPT_DIR)/%)
+	cp -pf $(MDB_SOURCE_DIR)/README $(PROTODIR)$(MDB_SCRIPT_DIR)/
--- a/open-src/xserver/xorg/Makefile	Sun Feb 28 13:19:52 2010 -0800
+++ b/open-src/xserver/xorg/Makefile	Sun Feb 28 15:25:31 2010 -0800
@@ -52,6 +52,10 @@
 # *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
 SOURCE_PATCHES=$(XORG_SOURCE_PATCHES)
 
+# Used in rules shared between Xorg & Xvnc builds in Makefile.inc
+# to allow for different source layouts
+XORG_BUILD_DIR=$(SOURCE_DIR)
+
 # Man pages to apply Sun footer to & attributes to list
 # XXX: Need to adjust some of these to correct packages/stability
 SUNTOUCHED_MANPAGES= \
@@ -161,30 +165,3 @@
 	printf '};\n' >> $@
 
 
-# Build & install mdb modules & scripts that aren't integrated to
-# normal build process
-MDB_SOURCE_DIR=$(SOURCE_DIR)/os/solaris/mdb
-MDB_MODULE_DIR=/usr/lib/mdb/proc/$(ARCHLIBSUBDIR)
-MDB_SCRIPT_DIR=/usr/demo/Xserver/mdb
-MDB_SCRIPTS=list_Xserver_clients \
-	list_Xserver_devicegrab_client \
-	list_Xserver_servergrab_client
-
-# Since configure options aren't used to build the mdb modules, pass
-# those variables at build tie
-MDB_BUILD_ENV=$(CONFIG_ENV) $(BUILD_ENV)
-
-build_mdb: $(MDB_SOURCE_DIR)/modules/Xserver.so
-
-$(MDB_SOURCE_DIR)/modules/Xserver.so: $(CONFIGURE_TARGETS)
-	(cd $(MDB_SOURCE_DIR) ; \
-         $(MDB_BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
-
-install_mdb: $(MDB_SOURCE_DIR)/modules/Xserver.so
-	mkdir -p $(PROTODIR)$(MDB_MODULE_DIR) $(PROTODIR)$(MDB_SCRIPT_DIR)
-	cp -pf $(MDB_SOURCE_DIR)/modules/Xserver.so \
-		 $(PROTODIR)$(MDB_MODULE_DIR)/
-	cp -pf $(MDB_SCRIPTS:%=$(MDB_SOURCE_DIR)/scripts/%) \
-		 $(PROTODIR)$(MDB_SCRIPT_DIR)/
-	chmod 0755 $(MDB_SCRIPTS:%=$(PROTODIR)$(MDB_SCRIPT_DIR)/%)
-	cp -pf $(MDB_SOURCE_DIR)/README $(PROTODIR)$(MDB_SCRIPT_DIR)/
--- a/open-src/xserver/xvnc/Makefile	Sun Feb 28 13:19:52 2010 -0800
+++ b/open-src/xserver/xvnc/Makefile	Sun Feb 28 15:25:31 2010 -0800
@@ -101,6 +101,14 @@
 INSTALL_TARGETS=$(INSTALL_TARGETS_common) $(INSTALL_TARGETS_$(BUILD_TYPE))
 INSTALL_TARGETS_SET=yes
 
+# Since we only build 64-bit versions of the Xorg servers on SPARC,
+# need to build a 32-bit version of the Xserver mdb module to allow
+# use with Xvnc on SPARC
+BUILD_TARGETS_sparc = build_mdb
+BUILD_TARGETS += $(BUILD_TARGETS_$(MACH))
+INSTALL_TARGETS_sparc = install_mdb
+INSTALL_TARGETS += $(INSTALL_TARGETS_$(MACH))
+
 include ../Makefile.inc
 
 # Merge in additional sources from Xorg tarball & sun-src directory