22807351 X gate makefiles no longer need to carry around $(X11_DIR) baggage
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Mon, 22 Feb 2016 16:57:16 -0800
changeset 1610 77a2e608a1ff
parent 1609 d5bab3427828
child 1611 69d07754b00f
22807351 X gate makefiles no longer need to carry around $(X11_DIR) baggage
open-src/README
open-src/app/Makefile.inc
open-src/app/mesa-demos/Makefile
open-src/app/mkfontscale/Makefile
open-src/app/synergy/Makefile
open-src/app/winsysck/Makefile
open-src/app/xcolor/Makefile
open-src/app/xdm/Makefile
open-src/app/xfd/Makefile
open-src/app/xfd/xfd.po
open-src/app/xfontsel/Makefile
open-src/app/xfs/Makefile
open-src/app/xhost/Makefile
open-src/app/xload/Makefile
open-src/app/xlock/Makefile
open-src/app/xmakemap/Makefile
open-src/app/xman/Makefile
open-src/app/xrandr/Makefile
open-src/app/xterm/Makefile
open-src/common/Makefile.defs
open-src/common/Makefile.inc
open-src/common/Makefile.init
open-src/data/ogl-select/Makefile
open-src/data/workspace-patterns/Makefile
open-src/data/xcursor-themes/Makefile
open-src/doc/Makefile.inc
open-src/doc/xorg-docs/Makefile
open-src/driver/xf86-video-intel/Makefile
open-src/driver/xf86-video-openchrome/Makefile
open-src/font/Makefile.inc
open-src/font/util/Makefile
open-src/kernel/Makefile.inc
open-src/kernel/Makefile.rules
open-src/lib/Makefile.inc
open-src/lib/fontconfig/Makefile
open-src/lib/freetype/Makefile
open-src/lib/libX11/Makefile
open-src/lib/libXaw/Makefile
open-src/lib/libXmu/Makefile
open-src/lib/libXpm/Makefile
open-src/lib/libXt/Makefile
open-src/lib/libdrm/Makefile
open-src/lib/libpciaccess/Makefile
open-src/lib/libpthread-stubs/Makefile
open-src/lib/libxcb/Makefile
open-src/lib/pixman/Makefile
open-src/util/Makefile.inc
open-src/xserver/Makefile.inc
open-src/xserver/xorg/Makefile
open-src/xserver/xserver-common/Makefile
open-src/xserver/xvnc/Makefile
pkg/Makefile
--- a/open-src/README	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/README	Mon Feb 22 16:57:16 2016 -0800
@@ -386,8 +386,9 @@
    Default: "$(MAKE)" (which is assumed to be Solaris make, not GNU).
 
 MODULE_PREFIX
- - Prefix to install files under, passed to configure scripts via --prefix.
-   Default: $(X11_DIR) (aka /usr).
+ - Prefix to install files under, passed to configure scripts via --prefix,
+   and used as base for other $(MODULE_*_DIR) paths.
+   Default: /usr
 
 MODULE_DOC_DIR
  - Directory to install documentation under
@@ -684,7 +685,7 @@
 
 =============================================================================
 
-Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 
 Permission is hereby granted, free of charge, to any person obtaining a
 copy of this software and associated documentation files (the "Software"),
--- a/open-src/app/Makefile.inc	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/Makefile.inc	Mon Feb 22 16:57:16 2016 -0800
@@ -1,6 +1,6 @@
 # -*- Makefile -*- rules common to most X.Org application modules
 #
-# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -39,7 +39,7 @@
 include $(TOP)/open-src/common/Makefile.init
 
 # Changes to apply to man pages
-MODTYPE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/bin/
+MODTYPE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_BIN_DIR)/
 
 # Flags to build & link applications with
 MODTYPE_CFLAGS=$(PROG_CFLAGS)
--- a/open-src/app/mesa-demos/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/mesa-demos/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -1,6 +1,6 @@
 ###############################################################################
 #
-# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -109,11 +109,11 @@
 BINSUBDIR_64    = # None
 
 install_demos: $(INSTALL_DEPS)
-	mkdir -p $(DESTDIR)$(MODULE_PREFIX)/bin$(BINSUBDIR)
-	cp -pf $(GLXGEARS_BIN) $(GLXINFO_BIN) $(DESTDIR)$(MODULE_PREFIX)/bin$(BINSUBDIR)
+	mkdir -p $(DESTDIR)$(MODULE_BIN_DIR)$(BINSUBDIR)
+	cp -pf $(GLXGEARS_BIN) $(GLXINFO_BIN) $(DESTDIR)$(MODULE_BIN_DIR)$(BINSUBDIR)
 
 install_man: 
-	mkdir -p $(DESTDIR)$(MODULE_PREFIX)/share/man/man1
-	cp -pf glxgears.1 glxinfo.1 $(DESTDIR)$(MODULE_PREFIX)/share/man/man1
+	mkdir -p $(DESTDIR)$(MODULE_MAN_DIR)/man1
+	cp -pf glxgears.1 glxinfo.1 $(DESTDIR)$(MODULE_MAN_DIR)/man1
 
 
--- a/open-src/app/mkfontscale/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/mkfontscale/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # mkfontscale - legacy X11 core font metadata creation tool
 #
-# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -66,5 +66,5 @@
 
 # Need to find libfontenc & libfreetype in matching directory when used
 # in alternate root environments, like during the build of the fonts
-MODULE_LD_OPTIONS= -R $$ORIGIN/$(X11_SERVERLIBS_DIR:$(X11_DIR)%=..%)$(ARCHLIBSUBDIR)
+MODULE_LD_OPTIONS= -R $$ORIGIN/$(X11_SERVERLIBS_DIR:/usr%=..%)$(ARCHLIBSUBDIR)
 include ../Makefile.inc
--- a/open-src/app/synergy/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/synergy/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -57,10 +57,6 @@
 TARBALL_MD5  = 2c565afe5f920d363eef38dd97449b73
 TARBALL_SHA1 = 17b2dc2611974189ad0d54367b6c96b7932d9e32
 
-# Where to install synergy files
-MODULE_PREFIX=/usr
-MODULE_PREFIX_SET=yes
-
 # Source tarball
 SOURCE_TARBALL_NAME=synergy-plus-$(MODULE_VERSION).tar.gz
 SOURCE_TARBALL_NAME_SET=yes
@@ -94,13 +90,8 @@
 		  -DWINAPI_XWINDOWS=1 \
 		  -I/usr/include/stdcxx4/ansi \
 		  -I/usr/include/stdcxx4/tr1 \
-		  -I/usr/include/stdcxx4 \
-		  -I$(PROTODIR)$(X11_INCLUDES_DIR) \
-		  -I$(PROTODIR)/usr/include \
-		  -I$(PROTODIR)/usr/include/freetype2
+		  -I/usr/include/stdcxx4
 MODULE_LDFLAGS = -L$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR) \
-		 -L$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR) \
-		 -R$(X11_DIR)/lib$(ARCHLIBSUBDIR) \
 		 -KPIC -Bdynamic $(ZDISCARD_UNUSED_DEP) \
 		 -lstdcxx4 -lCrun
 MODULE_LD_OPTIONS = $(ZDISCARD_UNUSED_DEP)
@@ -109,19 +100,12 @@
 MODULE_MAKE_SET=yes
 
 MODULE_ENV = \
-	     SHELL="/bin/ksh93" \
-	     CC="$(CC)" \
-	     CXX="$(CXX)" \
-	     CXXFLAGS="$(CXXFLAGS) $(MODULE_CXXFLAGS)" \
-	     CPPFLAGS="$(MODULE_CPPFLAGS)" \
 	     CPP="$(CC) -E $(MODULE_CPPFLAGS) $(CPPFLAGS)" \
 	     CXXCPP="$(CXX) -E $(MODULE_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS)" \
 	     LDFLAGS="$(PROG_LDFLAGS) $(MODULE_LDFLAGS)" \
 	     LD="$(CXX) $(CXXFLAGS) $(LDFLAGS)" \
 	     CXXLD="$(CXX) $(MODULE_CXXFLAGS) $(CXXFLAGS) $(MODULE_LDFLAGS) $(LDFLAGS)" \
 	     INSTALL="$(INSTALL)" \
-	     MAKE=$(GNUMAKE) \
-	     GNUMAKE=$(GNUMAKE) \
 	     LD_OPTIONS="$(LD_OPTIONS)"
 
 MODULE_CONFIG_OPTS = --disable-debug
--- a/open-src/app/winsysck/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/winsysck/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # winsysck - utility to check & report if a window system is in use
 #
-# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -62,7 +62,7 @@
 REL_SOURCE_DIR = ../$(SOURCE_DIR)
 MODULE_MAKEFLAGS  = VPATH=$(REL_SOURCE_DIR) -f $(REL_SOURCE_DIR)/Makefile
 MODULE_BUILD_ENV  = $(CONFIG_ENV) PREFIX=$(MODULE_PREFIX)
-MODULE_INSTALL_MAKEFLAGS = bindir=$(X11_BIN_DIR) mandir=$(X11_MAN_DIR)
+MODULE_INSTALL_MAKEFLAGS = bindir=$(MODULE_BIN_DIR) mandir=$(MODULE_MAN_DIR)
 
 # Compatibility links from /usr/X11/bin to /usr/bin
 MODULE_X11_BINCOMPAT_LINKS = winsysck
--- a/open-src/app/xcolor/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/xcolor/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # xcolor - utility to display used & available entries in PseudoColor colormaps
 #
-# Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -59,7 +59,7 @@
 REL_SOURCE_DIR = ../$(SOURCE_DIR)
 MODULE_MAKEFLAGS  = VPATH=$(REL_SOURCE_DIR) -f $(REL_SOURCE_DIR)/Makefile
 MODULE_BUILD_ENV  = $(CONFIG_ENV) PREFIX=$(MODULE_PREFIX)
-MODULE_INSTALL_MAKEFLAGS = bindir=$(X11_BIN_DIR) mandir=$(X11_MAN_DIR)
+MODULE_INSTALL_MAKEFLAGS = bindir=$(MODULE_BIN_DIR) mandir=$(MODULE_MAN_DIR)
 
 # Allow linker to skip linking to libm if compiler inlined all math functions
 MODULE_LDFLAGS = $(ZDISCARD_UNUSED_DEP)
--- a/open-src/app/xdm/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/xdm/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -60,11 +60,7 @@
 # Man pages to apply Sun footer to & attributes to list
 SUNTOUCHED_MANPAGES=xdm.man.cpp
 MODULE_STABILITY=Committed
-MODULE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/sbin/
-
-# Where to install xdm files
-MODULE_PREFIX=/usr
-MODULE_PREFIX_SET=yes
+MODULE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_SBIN_DIR)/
 
 # Additional configure script options
 # Only build shared greeter module, not static
@@ -76,7 +72,7 @@
 	--with-xdmconfigdir=/etc/X11/xdm \
 	--with-piddir=/var/run/xdm \
 	--with-authdir=/var/run/xdm \
-	--bindir=/usr/sbin \
+	--bindir=$(MODULE_SBIN_DIR) \
 	--with-xrdb='$(X11_BIN_DIR)/xrdb' \
 	--with-default-session=command='$(X11_BIN_DIR)/xterm -ls' \
 	DEF_SERVER='$(X11_BIN_DIR)/X' \
--- a/open-src/app/xfd/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/xfd/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # xfd - simple X11/Xft font display application
 #
-# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -55,6 +55,6 @@
 
 include ../Makefile.inc
 
-install_po:
-	mkdir -p $(PROTODIR)$(X11_LC_MESSAGES_DIR)
-	cp -f xfd.po $(PROTODIR)$(X11_LC_MESSAGES_DIR)
+install_po: $(INSTALL_DEPS)
+	mkdir -p $(PROTODIR)$(MODULE_LC_MESSAGES_DIR)
+	ginstall -m 0444 $(BUILD_DIR)/xfd.po $(PROTODIR)$(MODULE_LC_MESSAGES_DIR)
--- a/open-src/app/xfd/xfd.po	Fri Feb 19 16:57:44 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-domain "xfd"
-# File:xfd.c, line:174, textdomain("xfd");
-msgid  "%s:  no font to display\n"
-msgstr
-msgid  "center each character inside its grid\n"
-msgstr
-msgid  "dpy           X server to contact\n"
-msgstr
-msgid  "geom         size and location of window\n"
-msgstr
-msgid  "num             first character to show\n"
-msgstr
-msgid  "number           number of rows in grid\n"
-msgstr
-msgid  "number        number of columns in grid\n"
-msgstr
-msgid  "show a box around each character\n"
-msgstr
-msgid  "unknown font!"
-msgstr
-msgid  "usage:  %s [-options ...] "
-msgstr
-msgid  "font\n\n"
-msgstr
-msgid  "where options include:\n"
-msgstr
--- a/open-src/app/xfontsel/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/xfontsel/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # xfontsel - simple X11 font selection/display application
 #
-# Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -53,6 +53,6 @@
 include ../Makefile.inc
 
 install_po: $(SOURCE_TARGETS) $(BUILD_DIR)
-	mkdir -p $(PROTODIR)$(X11_LC_MESSAGES_DIR)
+	mkdir -p $(PROTODIR)$(MODULE_LC_MESSAGES_DIR)
 	(cd $(SOURCE_DIR) ; xgettext -n -d xfontsel -p ../$(BUILD_DIR) *.c)
-	cp -f $(BUILD_DIR)/xfontsel.po $(PROTODIR)$(X11_LC_MESSAGES_DIR)
+	ginstall -m 0444 $(BUILD_DIR)/xfontsel.po $(PROTODIR)$(MODULE_LC_MESSAGES_DIR)
--- a/open-src/app/xfs/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/xfs/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # xfs - X11 font server
 #
-# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -64,10 +64,10 @@
 MODULE_ARC_CASES += PSARC/2015/221
 
 # Additional command line options to GNU autoconf configure script
-MODULE_CONFIG_OPTS= --sysconfdir=$(X11_DIR)/lib \
+MODULE_CONFIG_OPTS= --sysconfdir=$(MODULE_PREFIX)/lib \
 	--enable-syslog --enable-inetd --disable-devel-docs \
 	--with-default-font-path='catalogue:/etc/X11/fontpath.d' \
-	--with-default-config-file='/etc/X11/fs/config,$(X11_X11LIB_DIR)/fs/config,/etc/openwin/fs/fontserver.cfg,/usr/openwin/lib/X11/fontserver.cfg'
+	--with-default-config-file='/etc/X11/fs/config,/usr/lib/X11/fs/config,/etc/openwin/fs/fontserver.cfg,/usr/openwin/lib/X11/fontserver.cfg'
 MODULE_CPPFLAGS = -DNO_ALLOCA
 
 # Need to link with libfontenc in server private directory
@@ -85,17 +85,15 @@
 check_smf: xfs.xml
 	/usr/sbin/svccfg validate xfs.xml
 
-X11_SMF_MANIFEST_DIR=$(SMF_MANIFEST_DIR)/application/x11
-
 install_smf: check_smf
 	mkdir -p $(PROTODIR)$(X11_SMF_MANIFEST_DIR)
 	$(INSTALL_SCRIPT) -m 0444 xfs.xml $(PROTODIR)$(X11_SMF_MANIFEST_DIR)
 
 install_fsadmin:
-	mkdir -p $(PROTODIR)$(X11_DIR)/sbin \
-		$(PROTODIR)$(X11_MAN_DIR)/man1
-	$(INSTALL_SCRIPT) -m 0755 fsadmin $(PROTODIR)$(X11_DIR)/sbin/fsadmin
-	$(INSTALL_SCRIPT) -m 0444 fsadmin.1 $(PROTODIR)$(X11_MAN_DIR)/man1/
+	mkdir -p $(PROTODIR)$(MODULE_SBIN_DIR) \
+		$(PROTODIR)$(MODULE_MAN_DIR)/man1
+	$(INSTALL_SCRIPT) -m 0755 fsadmin $(PROTODIR)$(MODULE_SBIN_DIR)/fsadmin
+	$(INSTALL_SCRIPT) -m 0444 fsadmin.1 $(PROTODIR)$(MODULE_MAN_DIR)/man1/
 
 # Special compatibility link from /usr/X11/bin/fsadmin to /usr/sbin/fsadmin
 install: $(X11_BINCOMPAT_DIR)/fsadmin
--- a/open-src/app/xhost/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/xhost/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -65,5 +65,5 @@
 include ../Makefile.inc
 
 install_po:
-	mkdir -p $(PROTODIR)$(X11_LC_MESSAGES_DIR)
-	cp -f xhost.po $(PROTODIR)$(X11_LC_MESSAGES_DIR)
+	mkdir -p $(PROTODIR)$(MODULE_LC_MESSAGES_DIR)
+	ginstall -m 0444 xhost.po $(PROTODIR)$(MODULE_LC_MESSAGES_DIR)
--- a/open-src/app/xload/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/xload/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -1,8 +1,8 @@
 ###############################################################################
 #
-# xload 1.x Makefile
+# xload - system load average display for X
 #
-# Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -59,6 +59,6 @@
 include ../Makefile.inc
 
 install_po: $(BUILD_TARGETS)
-	mkdir -p $(PROTODIR)$(X11_LC_MESSAGES_DIR)
-	cp -f $(BUILD_DIR)/xload.po $(PROTODIR)$(X11_LC_MESSAGES_DIR)
+	mkdir -p $(PROTODIR)$(MODULE_LC_MESSAGES_DIR)
+	ginstall -m 0444 $(BUILD_DIR)/xload.po $(PROTODIR)$(MODULE_LC_MESSAGES_DIR)
 
--- a/open-src/app/xlock/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/xlock/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # xlock - manually activated screen lock program
 #
-# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -56,7 +56,7 @@
 MODULE_MAKEFLAGS  = VPATH=$(REL_SOURCE_DIR) -f $(REL_SOURCE_DIR)/Makefile
 MODULE_BUILD_ENV  = $(CONFIG_ENV) PREFIX=$(MODULE_PREFIX)
 MODULE_INSTALL_MAKEFLAGS = \
-   bindir=$(X11_BIN_DIR) datadir=$(MODULE_PREFIX)/share mandir=$(X11_MAN_DIR)
+   bindir=$(MODULE_BIN_DIR) datadir=$(MODULE_DATA_DIR) mandir=$(MODULE_MAN_DIR)
 
 # Compatibility links from /usr/X11/bin to /usr/bin
 MODULE_X11_BINCOMPAT_LINKS = xlock
--- a/open-src/app/xmakemap/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/xmakemap/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # xmakemap script to generate xmodmap files from current keyboard settings
 #
-# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -67,10 +67,10 @@
 DESTDIR=$(PROTODIR)
 
 install_xmakemap: $(SOURCE_TARGETS) $(INSTALL_DEPS)
-	mkdir -p $(DESTDIR)$(X11_BIN_DIR) \
-		$(DESTDIR)$(X11_MAN_DIR)/man1
+	mkdir -p $(DESTDIR)$(MODULE_BIN_DIR) \
+		$(DESTDIR)$(MODULE_MAN_DIR)/man1
 	$(INSTALL_SCRIPT) -m 0555 $(SOURCE_DIR)/xmakemap \
-		$(DESTDIR)$(X11_BIN_DIR)
+		$(DESTDIR)$(MODULE_BIN_DIR)
 	$(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/xmakemap.man \
-		$(DESTDIR)$(X11_MAN_DIR)/man1/xmakemap.1
+		$(DESTDIR)$(MODULE_MAN_DIR)/man1/xmakemap.1
 
--- a/open-src/app/xman/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/xman/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # xman - manual page browser
 #
-# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -52,5 +52,5 @@
 include ../Makefile.inc
 
 install_po:
-	mkdir -p $(PROTODIR)$(X11_LC_MESSAGES_DIR)
-	cp -f xman.po $(PROTODIR)$(X11_LC_MESSAGES_DIR)
+	mkdir -p $(PROTODIR)$(MODULE_LC_MESSAGES_DIR)
+	ginstall -m 0444 xman.po $(PROTODIR)$(MODULE_LC_MESSAGES_DIR)
--- a/open-src/app/xrandr/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/xrandr/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # xrandr - utility to configure screen sizes and layout via XRANDR extension
 #
-# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -68,6 +68,6 @@
 
 # Remove xkeystone utility that requires nickle interpreter we don't ship yet
 remove_xkeystone: $(INSTALL_RULES)
-	-rm -f $(PROTODIR)$(MODULE_PREFIX)/bin/xkeystone
+	-rm -f $(PROTODIR)$(MODULE_BIN_DIR)/xkeystone
 
 install: remove_xkeystone
--- a/open-src/app/xterm/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/app/xterm/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -93,8 +93,7 @@
 # Paths to find Xft/fontconfig/freetype headers libraries at build time
 # and run time 
 FT_CFLAGS= -I$(PROTODIR)/usr/include -I$(PROTODIR)/usr/include/freetype2
-FT_LIBS= \
-  -L$(PROTODIR)/usr/lib$(LIBSUBDIR) -R/usr/lib$(LIBSUBDIR) -lXft -lfontconfig
+FT_LIBS= -L$(PROTODIR)/usr/lib$(LIBSUBDIR) -lXft -lfontconfig
 
 # Override the flags xterm's configure script generates, since it incorrectly
 # adds -R flags pointing to the build proto area, which are not wanted.
--- a/open-src/common/Makefile.defs	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/common/Makefile.defs	Mon Feb 22 16:57:16 2016 -0800
@@ -1,6 +1,6 @@
 # -*- Makefile -*- rules commonly shared among X consolidation open source dirs
 #
-# Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -39,13 +39,13 @@
 
 # Where to install files
 MODTYPE_PREFIX_DEFAULT		= $(MODTYPE_PREFIX_SET:yes=$(POUND_SIGN))
-$(MODTYPE_PREFIX_DEFAULT)	MODTYPE_PREFIX=$(X11_DIR)
+$(MODTYPE_PREFIX_DEFAULT)	MODTYPE_PREFIX=/usr
 MODULE_PREFIX_DEFAULT		= $(MODULE_PREFIX_SET:yes=$(POUND_SIGN))
 $(MODULE_PREFIX_DEFAULT)	MODULE_PREFIX=$(MODTYPE_PREFIX)
 
 # Where to install documentation files
 MODTYPE_DOC_DIR_DEFAULT		= $(MODTYPE_DOC_DIR_SET:yes=$(POUND_SIGN))
-$(MODTYPE_DOC_DIR_DEFAULT)	MODTYPE_DOC_DIR=$(MODULE_PREFIX)/share/doc/$(MODULE_NAME)
+$(MODTYPE_DOC_DIR_DEFAULT)	MODTYPE_DOC_DIR=$(MODULE_DATA_DIR)/doc/$(MODULE_NAME)
 MODULE_DOC_DIR_DEFAULT		= $(MODULE_DOC_DIR_SET:yes=$(POUND_SIGN))
 $(MODULE_DOC_DIR_DEFAULT)	MODULE_DOC_DIR=$(MODTYPE_DOC_DIR)
 
--- a/open-src/common/Makefile.inc	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/common/Makefile.inc	Mon Feb 22 16:57:16 2016 -0800
@@ -1,6 +1,6 @@
 # -*- Makefile -*- rules commonly shared among X consolidation open source dirs
 #
-# Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -277,10 +277,14 @@
 $(SOURCE_ADD_TARGET): $(SOURCE_INIT_TARGET)
 	@if [[ "$(ADDITIONAL_SOURCE_DIR)" != "" ]] ; then \
 	  if [[ ! -x $(LNDIR) ]] ; then \
-	    (cd $(TOP)/open-src/util/lndir && $(MAKE) $(MAKEFLAGS) install) ; \
+	    if [[ -x /usr/bin/lndir ]] ; then \
+	      lndir=/usr/bin/lndir ; \
+	    else \
+	      (cd $(TOP)/open-src/util/lndir && $(MAKE) $(MAKEFLAGS) install) ; \
+	    fi ; \
 	  fi ; \
 	  $(START_CMD_ECHO) ; \
-	  cd $(SOURCE_DIR) && $(LNDIR) ../$(ADDITIONAL_SOURCE_DIR) ; \
+	  cd $(SOURCE_DIR) && $${lndir:-$(LNDIR)} ../$(ADDITIONAL_SOURCE_DIR) ; \
 	fi
 	touch $(SOURCE_ADD_TARGET)
 
@@ -403,11 +407,9 @@
 
 # Environment variable options to GNU autoconf configure script
 $(USE_DEFAULT_CONFIG_CPPFLAGS:no=$(POUND_SIGN)) DEFAULT_CONFIG_CPPFLAGS= \
-	-I$(PROTODIR)$(X11_INCLUDES_DIR) \
 	-I$(PROTODIR)/usr/include -I$(PROTODIR)/usr/include/freetype2
 $(USE_DEFAULT_CONFIG_LDFLAGS:no=$(POUND_SIGN)) DEFAULT_CONFIG_LDFLAGS= \
-	-L$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR) \
-	-L$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR)
+	-L$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)
 
 DEFAULT_PKG_CONFIG_PATH=$(PROTODIR)$(PKGCONFIG_DIR):$(PROTODIR)$(PKGCONFIG_DIR_SHARE):$(PKGCONFIG_DIR):$(PKGCONFIG_DIR_SHARE)
 
@@ -419,7 +421,6 @@
 
 # Set USE_DEFAULT_CONFIG_ENV=no in a Makefile to not use this default
 # autoconfig environment
-# gnu/nm added for working around 17596443
 DEFAULT_CONFIG_ENV  = CC="$(CC)" CXX="$(CXX)" AR="$(AR)"
 DEFAULT_CONFIG_ENV += LD="$(CC) $(ARCH_FLAGS) $(LDFLAGS)"
 DEFAULT_CONFIG_ENV += CFLAGS="$(MODTYPE_CFLAGS) $(MODULE_CFLAGS)" 
@@ -433,7 +434,11 @@
 DEFAULT_CONFIG_ENV += am_cv_python_pyexecdir="$(PYTHON_VENDOR_DIR)"
 DEFAULT_CONFIG_ENV += INSTALL="$(INSTALL_SCRIPT)" CPPROG="cp -p"
 DEFAULT_CONFIG_ENV += MAKE="$(MODULE_MAKE)" CONFIG_SHELL="$(CONFIG_SHELL)"
+# gnu/nm added for working around 17596443 - nm -p output change breaks autoconf
 DEFAULT_CONFIG_ENV += NM="/usr/gnu/bin/nm"
+# Never use xmkmf to find X libraries from autoconf - may not be installed
+# on all machines and imake config files are generally not kept up to date
+DEFAULT_CONFIG_ENV += XMKMF="false"
 # Override default man page sections until all X.Org modules are updated
 # to use new xorg-macros with Solaris 12 man page section support
 DEFAULT_CONFIG_ENV += DRIVER_MAN_SUFFIX=4 FILE_MAN_SUFFIX=5
--- a/open-src/common/Makefile.init	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/common/Makefile.init	Mon Feb 22 16:57:16 2016 -0800
@@ -284,7 +284,7 @@
 # Common flags for all binaries
 DEFAULT_LD_OPTIONS	= -z lazyload -B direct -z guidance
 DEFAULT_LD_OPTIONS     += $(MAPFILES_FOR_ALL)
-DEFAULT_LD_OPTIONS     += -L$(PROTODIR)$(X11_DIR)/lib$(LIBSUBDIR)
+DEFAULT_LD_OPTIONS     += -L$(PROTODIR)/usr/lib$(LIBSUBDIR)
 
 # Strip debug info out of non-debug builds
 $(BUILD_DEBUG:yes=$(POUND_SIGN))  DEFAULT_LD_OPTIONS += -z strip-class=debug
@@ -315,34 +315,43 @@
 PROTODIR_DEBUG=$(PROTOTOP)/root_$(MACH)-debug
 PROTOMETA=$(PROTOTOP)/metadata_$(MACH)
 
-SMF_MANIFEST_DIR=/lib/svc/manifest
-SMF_METHOD_DIR=/lib/svc/method
+# Standard paths for modules to install into, relative to $(MODULE_PREFIX)
+# See also MODULE_DOC_DIR & MODULE_PKGCONFIG_DIR in Makefile.defs
+MODULE_BIN_DIR		= $(MODULE_PREFIX)/bin
+MODULE_INCLUDES_DIR	= $(MODULE_PREFIX)/include
+MODULE_LIB_DIR		= $(MODULE_PREFIX)/lib
+MODULE_FULLARCH_LIB_DIR	= $(MODULE_LIB_DIR)$(MODULE_ADD_LIB_SUBDIR)$(ARCHLIBSUBDIR)
+MODULE_DATA_DIR		= $(MODULE_PREFIX)/share
+MODULE_LOCALE_DIR	= $(MODULE_PREFIX)/share/locale
+MODULE_LC_MESSAGES_DIR	= $(MODULE_LOCALE_DIR)/C/LC_MESSAGES
+MODULE_MAN_DIR		= $(MODULE_PREFIX)/share/man
+MODULE_SBIN_DIR		= $(MODULE_PREFIX)/sbin
 
-X11_DIR=/usr
-X11_BIN_DIR=$(X11_DIR)/bin
-X11_LIB_DIR=$(X11_DIR)/lib
-X11_INCLUDES_DIR=$(X11_DIR)/include
-XORG_SDK_INCLUDES_DIR=$(X11_INCLUDES_DIR)/xorg
-X11_X11LIB_DIR=$(X11_LIB_DIR)/X11
-SHARE_FONT_DIR=/usr/share/fonts
-X11_FONT_DIR=$(SHARE_FONT_DIR)/X11
-X11_FONT_CATALOGUE=/etc/X11/fontpath.d
-TRUETYPE_FONT_DIR=$(SHARE_FONT_DIR)/TrueType
-X11_DOC_DIR=/usr/share/doc/X11
-X11_SGML_DIR=$(X11_DIR)/share/sgml/X11
-X11_LOCALE_DIR=$(X11_DIR)/share/locale
-X11_MAN_DIR=$(X11_DIR)/share/man
-X11_ACLOCAL_DIR=$(X11_DIR)/share/aclocal
-X11_LC_MESSAGES_DIR=$(X11_LOCALE_DIR)/C/LC_MESSAGES
+# System-wide standard paths that don't differ depending on $(MODULE_PREFIX)
+SMF_MANIFEST_DIR	= /lib/svc/manifest
+X11_SMF_MANIFEST_DIR	= $(SMF_MANIFEST_DIR)/application/x11
+SMF_METHOD_DIR		= /lib/svc/method
+SHARE_FONT_DIR		= /usr/share/fonts
+TRUETYPE_FONT_DIR	= $(SHARE_FONT_DIR)/TrueType
+X11_FONT_DIR		= $(SHARE_FONT_DIR)/X11
+X11_FONT_CATALOGUE	= /etc/X11/fontpath.d
+X11_ACLOCAL_DIR		= /usr/share/aclocal
+X11_BIN_DIR		= /usr/bin
+X11_DOC_DIR		= /usr/share/doc/X11
+X11_INCLUDES_DIR	= /usr/include
+X11_LIB_DIR		= /usr/lib
+X11_SGML_DIR		= /usr/share/sgml/X11
+X11_X11LIB_DIR		= $(X11_LIB_DIR)/X11
+XORG_SDK_INCLUDES_DIR	= $(X11_INCLUDES_DIR)/xorg
 
 # Subdirectory of /usr/lib for X server private libraries
-X11_SERVERLIBS_SUBDIR=/xorg
-X11_SERVERLIBS_DIR=$(X11_LIB_DIR)$(X11_SERVERLIBS_SUBDIR)
+X11_SERVERLIBS_SUBDIR	= /xorg
+X11_SERVERLIBS_DIR	= $(X11_LIB_DIR)$(X11_SERVERLIBS_SUBDIR)
 
 # Subdirectory of /usr/lib for X server loadable modules
-X11_SERVERMODS_SUBDIR=/xorg/modules
-X11_SERVERMODS_DIR=$(X11_LIB_DIR)$(X11_SERVERMODS_SUBDIR)
-MESA_XSERVERMODS_DIR=$(X11_LIB_DIR)/mesa/modules
+X11_SERVERMODS_SUBDIR	= /xorg/modules
+X11_SERVERMODS_DIR	= $(X11_LIB_DIR)$(X11_SERVERMODS_SUBDIR)
+MESA_XSERVERMODS_DIR	= /usr/lib/mesa/modules
 
 # PKGCONFIG_DIR is constructed of _prefix + ARCHLIBSUBDIR + _suffix
 PKGCONFIG_DIR_prefix=/usr/lib
@@ -397,16 +406,17 @@
 
 # Directory to find tools used during build, even when installing to a
 # temporary dest dir, such as during 'make manifest'
-PROTOTOOLSDIR=$(PROTODIR)
+PROTOTOOLSDIR		= $(PROTODIR)
+PROTOTOOLS_BIN_DIR	= $(PROTODIR)/usr/bin
 
 # Some modules use lndir to merge in sources from Sun specific directories
-LNDIR=$(PROTOTOOLSDIR)$(X11_BIN_DIR)/lndir
+LNDIR			= $(PROTOTOOLS_BIN_DIR)/lndir
 
 # Commands to run font utilities from proto area
-MKFONTSCALE=$(PROTOTOOLSDIR)$(X11_BIN_DIR)/mkfontscale
-INSTALLALIAS=$(PROTOTOOLSDIR)$(X11_X11LIB_DIR)/installalias
-FC_QUERY=$(PROTOTOOLSDIR)$(X11_BIN_DIR)/fc-query
-FC_SCAN=$(PROTOTOOLSDIR)$(X11_BIN_DIR)/fc-scan
+MKFONTSCALE		= $(PROTOTOOLS_BIN_DIR)/mkfontscale
+INSTALLALIAS		= $(PROTOTOOLSDIR)$(X11_X11LIB_DIR)/installalias
+FC_QUERY		= $(PROTOTOOLS_BIN_DIR)/fc-query
+FC_SCAN			= $(PROTOTOOLS_BIN_DIR)/fc-scan
 # mkfontdir is just a shell wrapper around /usr/bin/mkfontscale, so we call
 # it directly here, instead of futzing with command paths in the script
 MKFONTDIR=$(MKFONTSCALE) -b -s -l
--- a/open-src/data/ogl-select/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/data/ogl-select/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # ogl-select - Solaris SMF service to choose between OpenGL implementations
 #
-# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -79,13 +79,13 @@
 install_ogl-select:
 	mkdir -p $(DESTDIR)$(OGL_SMF_MANIFEST_DIR) \
 		$(DESTDIR)$(SMF_METHOD_DIR) \
-		$(DESTDIR)$(X11_DIR)/share/man/man1 \
+		$(DESTDIR)$(MODULE_MAN_DIR)/man1 \
 		$(DESTDIR)/lib/opengl/ogl_select/
 	$(INSTALL_SCRIPT) -c -m 0444 ogl-select.xml \
 		$(DESTDIR)$(OGL_SMF_MANIFEST_DIR)
 	$(INSTALL_SCRIPT) -c -m 0555 ogl-select \
 		$(DESTDIR)$(SMF_METHOD_DIR)/ogl-select
 	$(INSTALL_SCRIPT) -c -m 0444 ogl-select.man \
-		$(DESTDIR)$(X11_DIR)/share/man/man1/ogl-select.1
+		$(DESTDIR)$(MODULE_MAN_DIR)/man1/ogl-select.1
 	$(INSTALL_SCRIPT) -c -m 0555 $(OGL_VENDOR_SCRIPTS) \
 		$(DESTDIR)/lib/opengl/ogl_select/
--- a/open-src/data/workspace-patterns/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/data/workspace-patterns/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -1,6 +1,6 @@
 ###############################################################################
 #
-# Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -53,7 +53,7 @@
 include ../Makefile.inc
 
 DESTDIR=$(PROTODIR)
-INSTDIR=$(DESTDIR)$(X11_DIR)/share/patterns/
+INSTDIR=$(DESTDIR)$(MODULE_DATA_DIR)/patterns/
 
 PATTERN_FILES = \
 	attributes      \
--- a/open-src/data/xcursor-themes/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/data/xcursor-themes/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # xcursor-themes: X.Org default X11 cursor themes
 #
-# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -44,11 +44,12 @@
 SOURCE_PATCHES=	
 
 # Additional environment variable options to GNU autoconf configure script
-MODULE_CONFIG_ENV= PATH="$(PROTODIR)$(X11_DIR)/bin:$(PATH)"
+MODULE_CONFIG_ENV= PATH="$(PROTODIR)$(X11_BIN_DIR):$(PATH)"
 
 # Additional environment variable options needed when building
-MODULE_BUILD_ENV = LD_LIBRARY_PATH="$(PROTODIR)$(X11_DIR)/lib" \
-	PATH="$(PROTODIR)$(X11_DIR)/bin:$(PATH)"
+MODULE_BUILD_ENV = LD_LIBRARY_PATH_32="$(PROTODIR)$(X11_LIB_DIR)" \
+	LD_LIBRARY_PATH_64="$(PROTODIR)$(X11_LIB_DIR)$(LIBSUBDIR_64)" \
+	PATH="$(PROTODIR)$(X11_BIN_DIR):$(PATH)"
 
 # ARC cases that covered this module
 # LSARC/2007/491 libXcursor
--- a/open-src/doc/Makefile.inc	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/doc/Makefile.inc	Mon Feb 22 16:57:16 2016 -0800
@@ -1,6 +1,6 @@
 # -*- Makefile -*- rules common to most X.Org doc modules
 #
-# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -47,8 +47,7 @@
 MODTYPE_LDFLAGS=$(PROG_LDFLAGS)
 MODTYPE_LD_OPTIONS=
 
-DOCTOOLS_PATH = \
-    PATH="$(PROTODIR)$(X11_DIR)/bin:$(DOCBOOKUTIL_BINDIR):$$PATH"
+DOCTOOLS_PATH = PATH="$(PROTODIR)$(X11_BIN_DIR):$$PATH"
 
 # Additional environment variable options to GNU autoconf configure script
 MODTYPE_CONFIG_ENV = $(DOCTOOLS_PATH)
--- a/open-src/doc/xorg-docs/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/doc/xorg-docs/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -1,6 +1,6 @@
 ###############################################################################
 #
-# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -49,7 +49,7 @@
 
 # Additional arguments to configure script
 MODULE_CONFIG_OPTS= --docdir='$(X11_DOC_DIR)' \
-	XORG_SGML_PATH=$(PROTODIR)$(X11_DIR)/share/sgml
+	XORG_SGML_PATH=$(PROTODIR)$(X11_SGML_DIR:/X11=)
 
 # Additional rules to fix up unpacked source
 MODULE_ADD_SOURCE_TARGETS = fix_entity_paths
@@ -63,9 +63,9 @@
 # Fix entity paths in DocBook files so that gnome-help can resolve them
 fix_entity_paths: $(UNPACK_TARGET)
 	find $(SOURCE_DIR) -name '*.xml' | xargs $(PERL) -i.orig -p -e \
-	 's{SYSTEM ".*/X11/defs.ent"}{SYSTEM "$(X11_DIR)/share/sgml/X11/defs.ent"}'
+	 's{SYSTEM ".*/X11/defs.ent"}{SYSTEM "$(X11_SGML_DIR)/defs.ent"}'
 
-MAN_DIR=$(PROTODIR)$(X11_MAN_DIR)
+MAN_DIR=$(PROTODIR)$(MODULE_MAN_DIR)
 
 install_docs: $(MAN_DIR)/man7/X11.7 $(MAN_DIR)/man7/XStandards.7
 
--- a/open-src/driver/xf86-video-intel/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/driver/xf86-video-intel/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # xf86-video-intel Makefile
 #
-# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -72,7 +72,7 @@
 # Extra flags to pass to configure script
 # --libdir is needed to set path for XvMC libraries
 MODULE_CONFIG_OPTS=--enable-dri2 --enable-dri3 \
-	  	   --libdir='$(X11_LIB_DIR)$(ARCHLIBSUBDIR)' \
+	  	   --libdir='$(MODULE_FULLARCH_LIB_DIR)' \
 		   --enable-sna --enable-uxa --with-default-accel=uxa \
 		   --disable-udev
 
--- a/open-src/driver/xf86-video-openchrome/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/driver/xf86-video-openchrome/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -1,6 +1,6 @@
 ###############################################################################
 #
-# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -67,7 +67,7 @@
 # - Disable DRI since the kernel module isn't ported
 MODULE_CONFIG_OPTS=--disable-dri --disable-kms
 # --libdir is needed to set path for XvMC libraries
-MODULE_CONFIG_OPTS += --libdir='$(X11_LIB_DIR)$(ARCHLIBSUBDIR)'
+MODULE_CONFIG_OPTS += --libdir='$(MODULE_FULLARCH_LIB_DIR)'
 
 # Instead of allowing the default MODTYPE_LD_SHARED_OPTIONS to link all
 # the libraries against the Xorg server binary, ldflags.patch adds
--- a/open-src/font/Makefile.inc	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/font/Makefile.inc	Mon Feb 22 16:57:16 2016 -0800
@@ -1,6 +1,6 @@
 # -*- Makefile -*- rules common to most X.Org font modules
 #
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -95,8 +95,8 @@
 MODTYPE_LD_OPTIONS=
 
 # Paths to find mkfontscale, fc-cache & the libraries they need in build area
-FONT_UTILS_PATH=$(PROTODIR)$(X11_DIR)/bin:$(PROTODIR)/usr/bin
-FONT_LIBS_PATH=$(PROTODIR)$(X11_SERVERLIBS_DIR)$(LIBSUBDIR_64):$(PROTODIR)$(X11_DIR)/lib$(LIBSUBDIR_64):$(PROTODIR)/usr/lib$(LIBSUBDIR_64)
+FONT_UTILS_PATH=$(PROTODIR)/usr/bin
+FONT_LIBS_PATH=$(PROTODIR)$(X11_SERVERLIBS_DIR)$(LIBSUBDIR_64):$(PROTODIR)/usr/lib$(LIBSUBDIR_64)
 
 # Additional environment variable options to GNU autoconf configure script
 MODTYPE_CONFIG_ENV = PATH="$(FONT_UTILS_PATH):$$PATH" \
--- a/open-src/font/util/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/font/util/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -1,6 +1,6 @@
 ###############################################################################
 #
-# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -66,7 +66,7 @@
 # Man pages to apply Sun footer to & attributes to list
 SUNTOUCHED_MANPAGES=man/bdftruncate.man man/ucs2any.man
 MODULE_STABILITY=Volatile
-MODULE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/bin/
+MODULE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_BIN_DIR)/
 
 ### Include common rulesets
 include ../Makefile.inc
--- a/open-src/kernel/Makefile.inc	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/kernel/Makefile.inc	Mon Feb 22 16:57:16 2016 -0800
@@ -109,7 +109,6 @@
 CONFIG_ENV	+= NM="/usr/gnu/bin/nm"
 CONFIG_ENV	+= POUND_SIGN="$(POUND_SIGN)"
 CONFIG_ENV	+= PROTOMETA="$(PROTOMETA)/$(MODULE_PKG)"
-CONFIG_ENV	+= X11_MAN_DIR="$(X11_MAN_DIR)"
 
 # Where to find the common include files
 DRM_INCL	= -I$(TOP)/open-src/kernel/sys/drm -I$(TOP)/open-src/kernel/sys
--- a/open-src/kernel/Makefile.rules	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/kernel/Makefile.rules	Mon Feb 22 16:57:16 2016 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -53,6 +53,6 @@
 ROOT_MISC_DIR	= /kernel/misc/$(MACH64_i386)
 ROOT_MDB_DIR	= /usr/lib/mdb/kvm/$(MACH64_i386)
 ROOT_KMOD_DIR	= /kernel/kmdb/$(MACH64_i386)
-ROOT_MAN_DIR	= $(X11_MAN_DIR)
+ROOT_MAN_DIR	= /usr/share/man
 
 MANTARGET	= $(ROOT_MAN_DIR)/$(MANSECTION)
--- a/open-src/lib/Makefile.inc	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/lib/Makefile.inc	Mon Feb 22 16:57:16 2016 -0800
@@ -1,6 +1,6 @@
 # -*- Makefile -*- rules common to most X.Org library modules
 #
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -75,7 +75,7 @@
 
 # Additional arguments to pass to make when running make install
 MODTYPE_INSTALL_MAKEFLAGS = \
-	libdir=$(MODULE_PREFIX)/lib$(MODULE_ADD_LIB_SUBDIR)$(ARCHLIBSUBDIR)
+	libdir=$(MODULE_FULLARCH_LIB_DIR)
 
 # Need to fix libtool interference with our linker flags, unless module overrides
 DELIBTOOLIZE_1 =	$(DELIBTOOLIZE:no=$(POUND_SIGN))
--- a/open-src/lib/fontconfig/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/lib/fontconfig/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -111,7 +111,7 @@
 # API docs are in doc/*.3
 SUNTOUCH_MAN_FLAGS_*.3 = $(MODTYPE_SUNTOUCH_MAN_FLAGS)
 # Command docs are in per-command dirs
-SUNTOUCH_MAN_FLAGS_CMDS = -p $(MODULE_PREFIX)/bin/
+SUNTOUCH_MAN_FLAGS_CMDS = -p $(MODULE_BIN_DIR)/
 SUNTOUCH_MAN_FLAGS_fc-cache.1	= $(SUNTOUCH_MAN_FLAGS_CMDS)
 SUNTOUCH_MAN_FLAGS_fc-list.1	= $(SUNTOUCH_MAN_FLAGS_CMDS)
 SUNTOUCH_MAN_FLAGS_fc-query.1	= $(SUNTOUCH_MAN_FLAGS_CMDS)
@@ -146,8 +146,7 @@
 MODULE_MAKE_SET=yes
 
 # Paths to find libraries
-MODULE_BUILD_ENV = LD_LIBRARY_PATH=$(PROTODIR)/usr/lib$(LIBSUBDIR) \
-	LD_RUN_PATH=/usr/lib$(LIBSUBDIR) $(DOC_PATH)
+MODULE_BUILD_ENV = LD_LIBRARY_PATH=$(PROTODIR)/usr/lib$(LIBSUBDIR)
 
 # Need to rebuild autoconf/automake files
 AUTORECONF=yes
--- a/open-src/lib/freetype/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/lib/freetype/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # Freetype 2.x font rendering library
 #
-# Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -87,10 +87,6 @@
 	freetype-GS-conflict.patch,-p1 \
 	unix-cc.in.9.patch,-p1
 
-# Where to install freetype files
-MODULE_PREFIX=/usr
-MODULE_PREFIX_SET=yes
-
 # Additional command line options to GNU autoconf configure script
 MODULE_CONFIG_OPTS= \
 	--enable-biarch-config \
@@ -116,7 +112,7 @@
 # an incremental rebuild.
 USE_DEFAULT_CONFIG_CPPFLAGS=no
 
-MODULE_INSTALL_MAKEFLAGS=bindir=$(MODULE_PREFIX)/bin$(ARCHLIBSUBDIR)
+MODULE_INSTALL_MAKEFLAGS=bindir=$(MODULE_BIN_DIR)$(ARCHLIBSUBDIR)
 
 # Don't touch apinames when running set-elf-comments or it will trigger
 # a rebuild during "make install" that loses the comments.
@@ -127,11 +123,9 @@
 
 ### Rules specific to this directory:
 
-FT_libdir=$(MODULE_PREFIX)/lib$(ARCHLIBSUBDIR)
+install_freetype_links: $(PROTODIR)$(MODULE_FULLARCH_LIB_DIR)/libfreetype.so
 
-install_freetype_links: $(PROTODIR)$(FT_libdir)/libfreetype.so
-
-$(PROTODIR)$(FT_libdir)/libfreetype.so: default_install
+$(PROTODIR)$(MODULE_FULLARCH_LIB_DIR)/libfreetype.so: default_install
 	mkdir -p $(@D)
 	-rm -f $@
 	ln -s libfreetype.so.6 $@
--- a/open-src/lib/libX11/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/lib/libX11/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -137,8 +137,6 @@
 		  -I$(PROTODIR)/usr/include/X11 \
 		  -I$(PROTODIR)/usr/include/xcb
 
-MODULE_LDFLAGS = -R$(X11_LIB_DIR)$(ARCHLIBSUBDIR)
-
 # Need to discard -lc in .so's that don't need it, but leave it for those
 # which do need to link to it.
 MODULE_LD_OPTIONS = $(ZDISCARD_UNUSED_DEP)
@@ -195,7 +193,7 @@
 		$(TOOLS_DIR)$(X11_INCLUDES_DIR)/X11/xcms
 
 # Install additional links to libX11 that we include in our packages
-EXTRA_PROTO_LINKS = $(EXTRA_LINKS:%=$(PROTODIR)$(MODULE_PREFIX)/lib$(ARCHLIBSUBDIR)/%)
+EXTRA_PROTO_LINKS = $(EXTRA_LINKS:%=$(PROTODIR)$(MODULE_FULLARCH_LIB_DIR)/%)
 
 $(EXTRA_PROTO_LINKS): $(INSTALL_DEPS)
 	@rm -f $@
--- a/open-src/lib/libXaw/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/lib/libXaw/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # libXaw - Athena Widgets toolkit, based on libXt intrinsics
 #
-# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -75,7 +75,7 @@
 include ../Makefile.inc
 
 # Additional man page to install
-MAN3LIB_DIR = $(PROTODIR)$(X11_MAN_DIR)/man3lib
+MAN3LIB_DIR = $(PROTODIR)$(MODULE_MAN_DIR)/man3lib
 install: $(MAN3LIB_DIR)/libXaw.3lib
 
 $(MAN3LIB_DIR)/libXaw.3lib: libXaw.3lib
--- a/open-src/lib/libXmu/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/lib/libXmu/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # libXmu - miscellaneous utility functions based on libX11 & libXt
 #
-# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -66,7 +66,7 @@
 ADDITIONAL_SOURCE_DIR=sun-src
 
 # sun-src/src/VisGamma.c requires libX11 private headers for _Xcms functions
-MODULE_CPPFLAGS += -I $(TOOLS_DIR)$(X11_INCLUDES_DIR)/X11/xcms
+MODULE_CPPFLAGS += -I $(TOOLS_DIR)/usr/include/X11/xcms
 
 # pkg-config files that need to have -R added
 FIX_PC_FILES=xmu.pc.in xmuu.pc.in
@@ -90,14 +90,13 @@
 
 # Additional files we need to install
 CP = cp -pf
-MANDIR = $(PROTODIR)$(X11_MAN_DIR)/man3xmu
+MANDIR = $(PROTODIR)$(MODULE_MAN_DIR)/man3xmu
 
 install_solaris_exts: $(INSTALL_DEPS)
-	mkdir -p $(PROTODIR)$(X11_INCLUDES_DIR)/X11/Xmu $(MANDIR) \
-		 $(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR)
+	mkdir -p $(PROTODIR)$(MODULE_INCLUDES_DIR)/X11/Xmu $(MANDIR)
 	$(CP) $(SOURCE_DIR)/include/X11/Xmu/XmuSolaris.h \
 	       $(SOURCE_DIR)/include/X11/Xmu/WhitePoint.h \
-		$(PROTODIR)$(X11_INCLUDES_DIR)/X11/Xmu
+		$(PROTODIR)$(MODULE_INCLUDES_DIR)/X11/Xmu
 	$(CP) $(SOURCE_DIR)/man/*.3xmu $(MANDIR)
 
 # Metadata for libxmuu package
--- a/open-src/lib/libXpm/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/lib/libXpm/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # libXpm - library for handling XPM format images
 #
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -70,7 +70,7 @@
 # - in 32-bit builds, only install library, not apps or headers
 # - install 64-bit apps in default directory, not 64-bit subdir
 MODULE_INSTALL_MAKEFLAGS_32 = -e SUBDIRS="src"
-MODULE_INSTALL_MAKEFLAGS_64 = bindir=$(MODULE_PREFIX)/bin
+MODULE_INSTALL_MAKEFLAGS_64 = bindir=$(MODULE_BIN_DIR)
 MODULE_INSTALL_MAKEFLAGS = $(MODULE_INSTALL_MAKEFLAGS_$(BUILD_TYPE))
 
 # Install docs & l10n files as well
@@ -85,7 +85,7 @@
 
 include ../Makefile.inc
 
-3LIB_MAN_DIR = $(X11_MAN_DIR)/man3lib
+3LIB_MAN_DIR = $(MODULE_MAN_DIR)/man3lib
 
 install-docs: $(PROTODIR)$(MODULE_DOC_DIR)/xpm.ps
 install-docs: $(PROTODIR)$(3LIB_MAN_DIR)/libXpm.3lib
@@ -99,8 +99,8 @@
 
 PO_FILES = $(BUILD_DIR)/cxpm/cxpm.po $(BUILD_DIR)/sxpm/sxpm.po
 
-install-po: $(INSTALL_DEPS) $(PROTODIR)$(X11_LC_MESSAGES_DIR)
-	ginstall -m 0444 $(PO_FILES) $(PROTODIR)$(X11_LC_MESSAGES_DIR)
+install-po: $(INSTALL_DEPS) $(PROTODIR)$(MODULE_LC_MESSAGES_DIR)
+	ginstall -m 0444 $(PO_FILES) $(PROTODIR)$(MODULE_LC_MESSAGES_DIR)
 
-$(PROTODIR)$(3LIB_MAN_DIR) $(PROTODIR)$(X11_LC_MESSAGES_DIR):
+$(PROTODIR)$(3LIB_MAN_DIR) $(PROTODIR)$(MODULE_LC_MESSAGES_DIR):
 	mkdir -p $@
--- a/open-src/lib/libXt/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/lib/libXt/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # X Toolkit Intrinsics library (libXt)
 #
-# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -87,7 +87,7 @@
 include ../Makefile.inc
 
 # Install additional links to libXt that we include in our packages
-EXTRA_PROTO_LINKS = $(EXTRA_LINKS:%=$(PROTODIR)$(MODULE_PREFIX)/lib$(ARCHLIBSUBDIR)/%)
+EXTRA_PROTO_LINKS = $(EXTRA_LINKS:%=$(PROTODIR)$(MODULE_FULLARCH_LIB_DIR)/%)
 
 $(EXTRA_PROTO_LINKS): $(INSTALL_DEPS)
 	@rm -f $@
--- a/open-src/lib/libdrm/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/lib/libdrm/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -78,7 +78,7 @@
 
 # Where to install files
 MODULE_ADD_LIB_SUBDIR = $(X11_SERVERLIBS_SUBDIR)
-MODULE_LDFLAGS = -R $(MODULE_PREFIX)/lib$(MODULE_ADD_LIB_SUBDIR)$(ARCHLIBSUBDIR)
+MODULE_LDFLAGS = -R $(MODULE_FULLARCH_LIB_DIR)
 MODULE_PKGCONFIG_DIR = $(PKGCONFIG_DIR)
 MODULE_PKGCONFIG_DIR_SET = yes
 
@@ -93,7 +93,7 @@
 install-gen: install_fixed_manpages
 
 # Need to apply suntouch changes to man pages generated during build
-MANDIR = $(PROTODIR)$(X11_MAN_DIR)
+MANDIR = $(PROTODIR)$(MODULE_MAN_DIR)
 install_fixed_manpages: default_install
 	$(PERL) $(TOP)/open-src/common/suntouch-manpages.pl \
 		$(SUNTOUCH_MAN_FLAGS) $(BUILD_DIR)/man/*.{3,7}
--- a/open-src/lib/libpciaccess/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/lib/libpciaccess/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # libpciaccess - generic PCI access software library & scanpci utility
 #
-# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -44,10 +44,6 @@
 # Library name
 LIBNAME=libpciaccess
 
-# Where to install libpciaccess files
-MODULE_PREFIX=/usr
-MODULE_PREFIX_SET=yes
-
 # Package metadata
 MODULE_DESC = the libpciaccess library and scanpci utility
 # pkg(5) name we deliver the files in (override default)
@@ -68,7 +64,7 @@
 
 # Update scanpci.man with program man page flags instead of library ones
 SUNTOUCH_MAN_FLAGS  = $(COMMON_SUNTOUCH_MAN_FLAGS)
-SUNTOUCH_MAN_FLAGS +=-p $(MODULE_PREFIX)/bin/
+SUNTOUCH_MAN_FLAGS +=-p $(MODULE_BIN_DIR)/
 SUNTOUCH_MAN_FLAGS_SET=yes
 
 # pkg-config files that need to have -R added
@@ -94,12 +90,12 @@
 
 # We want to install scanpci, even though the upstream Makefile doesn't
 install_scanpci: default_install
-	mkdir -p $(PROTODIR)$(MODULE_PREFIX)/bin \
+	mkdir -p $(PROTODIR)$(MODULE_BIN_DIR) \
 		 $(PROTODIR)/etc/security/exec_attr.d/ \
-		 $(PROTODIR)$(MODULE_PREFIX)/share/man/man1
+		 $(PROTODIR)$(MODULE_MAN_DIR)/man1
 	$(INSTALL_SCRIPT) -m 755 $(BUILD_DIR)/scanpci/scanpci \
-		$(PROTODIR)$(MODULE_PREFIX)/bin/scanpci
+		$(PROTODIR)$(MODULE_BIN_DIR)/scanpci
 	$(INSTALL_SCRIPT) -m 444 $(BUILD_DIR)/man/scanpci.1 \
-		$(PROTODIR)$(MODULE_PREFIX)/share/man/man1/scanpci.1
+		$(PROTODIR)$(MODULE_MAN_DIR)/man1/scanpci.1
 	$(INSTALL_SCRIPT) -m 444 exec_attr \
 		$(PROTODIR)/etc/security/exec_attr.d/scanpci
--- a/open-src/lib/libpthread-stubs/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/lib/libpthread-stubs/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # libpthread-stubs Makefile
 #
-# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -50,10 +50,6 @@
 # Library name
 LIBNAME=pthread-stubs
 
-# Where to install libpthread-stubs files
-MODULE_PREFIX=/usr
-MODULE_PREFIX_SET=yes
-
 # Package classification (override default)
 MODULE_PKGCLASS=Development/X11
 MODULE_PKGCLASS_SET=yes
--- a/open-src/lib/libxcb/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/lib/libxcb/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # xcb - Lighter weight X11 client libraries
 #
-# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -105,7 +105,7 @@
 include ../Makefile.inc
 
 # Additional files we need to install
-MANDIR = $(PROTODIR)$(X11_MAN_DIR)/man3xcb
+MANDIR = $(PROTODIR)$(MODULE_MAN_DIR)/man3xcb
 
 # Need to apply suntouch changes to man pages generated during build
 install_solaris_exts: $(INSTALL_DEPS)
--- a/open-src/lib/pixman/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/lib/pixman/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # Pixman: The pixel-manipulation library for X and Cairo.
 #
-# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -41,10 +41,6 @@
 # Library name
 LIBNAME=pixman
 
-# Where to install pixman files
-MODULE_PREFIX=/usr
-MODULE_PREFIX_SET=yes
-
 # Package metadata
 MODULE_DESC = the pixman pixel-manipulation library
 GIT_URL     = $(FDO_GIT_URL)/pixman
--- a/open-src/util/Makefile.inc	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/util/Makefile.inc	Mon Feb 22 16:57:16 2016 -0800
@@ -1,6 +1,6 @@
 # -*- Makefile -*- rules common to most X.Org utility modules
 #
-# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -44,7 +44,7 @@
 include $(TOP)/open-src/common/Makefile.init
 
 # Most util modules have no man pages, but show path in those that do
-MODTYPE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/bin/
+MODTYPE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_BIN_DIR)/
 
 # No common dependencies
 MODTYPE_CONFIGURE_DEPS=
--- a/open-src/xserver/Makefile.inc	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/xserver/Makefile.inc	Mon Feb 22 16:57:16 2016 -0800
@@ -49,7 +49,7 @@
 DRI_MODULES_DIR='$(X11_SERVERMODS_DIR)/dri$(ARCHLIBSUBDIR)'
 
 # Changes to apply to man pages
-MODTYPE_SUNTOUCH_MAN_FLAGS = -p $(MODULE_PREFIX)/bin/
+MODTYPE_SUNTOUCH_MAN_FLAGS = -p $(MODULE_BIN_DIR)/
 
 # Command line options to GNU autoconf configure script for xorg-server
 XSERVER_CONFIG_OPTS_COMMON = \
@@ -115,7 +115,7 @@
 # Environment variable options to use when building
 #  - PATH - include /usr/sbin for dtrace command (needed for building probes)
 MODTYPE_BUILD_ENV= PATH=$(PATH):/usr/sbin \
-	LD_LIBRARY_PATH=$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR):$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR)
+	LD_LIBRARY_PATH=$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR):$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)
 
 # Mark packages as only compatible with the current server minor release series,
 # since Xorg tends to break ABI's in each minor release train (1.8, 1.9, etc.)
@@ -135,7 +135,7 @@
 # choose between them.   Now we just deliver 64-bit and make symlinks from
 # the amd64 paths to the default paths for compatibility
 
-ISAEXEC_DIR = $(PROTODIR)$(MODULE_PREFIX)/bin/$(SUBDIR64)
+ISAEXEC_DIR = $(PROTODIR)$(MODULE_BIN_DIR)/$(SUBDIR64)
 ISAEXEC_LINKS = $(LINKED_TO_ISAEXEC:%=$(ISAEXEC_DIR)/%)
 
 install_fix_paths_amd64_links: $(ISAEXEC_LINKS)
--- a/open-src/xserver/xorg/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/xserver/xorg/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # Xorg server Makefile
 #
-# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -134,7 +134,7 @@
 
 # Need to convert dtrace docs from xml to text/html ourselves, since
 # Solaris doesn't bundle the xmlto tool used upstream
-MODULE_DOC_DIR  = $(MODULE_PREFIX)/share/doc/Xserver
+MODULE_DOC_DIR  = $(MODULE_DATA_DIR)/doc/Xserver
 MODULE_DOC_DIR_SET=yes
 MODULE_XML_PATH = $(SOURCE_DIR)/doc
 DTRACE_DOC_DIR  = $(MODULE_XML_PATH)/dtrace
@@ -223,7 +223,7 @@
 
 $(XORGSERVER_BIN): default_build
 
-SDK_INCLUDES_DIR=$(PROTODIR)$(X11_INCLUDES_DIR)/xorg/
+SDK_INCLUDES_DIR=$(PROTODIR)$(XORG_SDK_INCLUDES_DIR)
 
 install_extras: default_install
 	-rm -f $(SDK_INCLUDES_DIR)/xorg-server.h
@@ -232,10 +232,10 @@
 	cp -pf $(SOURCE_DIR)/mi/mioverlay.h \
 	       $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h \
 	       $(SOURCE_DIR)/hw/xfree86/dri/*.h $(SDK_INCLUDES_DIR)/
-	mkdir -p $(PROTODIR)$(X11_MAN_DIR)/man1
+	mkdir -p $(PROTODIR)$(MODULE_MAN_DIR)/man1
 	cp -pf $(SOURCE_DIR)/hw/xfree86/man/xorgcfg.1 \
 	       $(SOURCE_DIR)/hw/xfree86/man/xorgconfig.1 \
-	       $(PROTODIR)$(X11_MAN_DIR)/man1
+	       $(PROTODIR)$(MODULE_MAN_DIR)/man1
 	mkdir -p $(PROTODIR)/etc/hal/fdi/preprobe/10osvendor
 	cp -pf $(SOURCE_DIR)/config/x11-input.fdi \
 	 $(PROTODIR)/etc/hal/fdi/preprobe/10osvendor/10-x11-input.fdi
@@ -278,9 +278,9 @@
 
 # Fix paths in proto area to match paths in packages / installed systems
 install_fix_paths_X: default_install
-	rm -f $(PROTODIR)$(MODULE_PREFIX)/bin/X \
-	      $(PROTODIR)$(MODULE_PREFIX)/bin/$(ARCHBINSUBDIR)/X
-	ln -s Xserver $(PROTODIR)$(MODULE_PREFIX)/bin/X
+	rm -f $(PROTODIR)$(MODULE_BIN_DIR)/X \
+	      $(PROTODIR)$(MODULE_BIN_DIR)/$(ARCHBINSUBDIR)/X
+	ln -s Xserver $(PROTODIR)$(MODULE_BIN_DIR)/X
 
 install_fix_paths: install_fix_paths_X
 
--- a/open-src/xserver/xserver-common/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/xserver/xserver-common/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -1,6 +1,6 @@
 ###############################################################################
 #
-# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -65,7 +65,6 @@
 ### Include common rulesets
 include ../Makefile.inc
 
-X11_SMF_MANIFEST_DIR=$(SMF_MANIFEST_DIR)/application/x11
 DESTDIR=$(PROTODIR)
 
 check: x11-server.xml
@@ -75,16 +74,16 @@
 	mkdir -p \
 		$(DESTDIR)$(X11_SMF_MANIFEST_DIR) \
 		$(DESTDIR)$(SMF_METHOD_DIR) \
-		$(DESTDIR)$(X11_DIR)/bin \
-		$(DESTDIR)$(X11_DIR)/share/man/man1 \
+		$(DESTDIR)$(MODULE_BIN_DIR) \
+		$(DESTDIR)$(MODULE_MAN_DIR)/man1 \
 		$(DESTDIR)/etc/security/auth_attr.d \
 		$(DESTDIR)/etc/security/prof_attr.d
 	$(INSTALL_SCRIPT) -c -m 0444 x11-server.xml \
 		$(DESTDIR)$(X11_SMF_MANIFEST_DIR)/
 	$(INSTALL_SCRIPT) -c -m 0755 x11-server $(DESTDIR)$(SMF_METHOD_DIR)/
-	$(INSTALL_SCRIPT) -c -m 0755 Xserver $(DESTDIR)$(X11_DIR)/bin/
+	$(INSTALL_SCRIPT) -c -m 0755 Xserver $(DESTDIR)$(MODULE_BIN_DIR)/
 	$(INSTALL_SCRIPT) -c -m 0444 auth_attr \
 		$(DESTDIR)/etc/security/auth_attr.d/$(MODULE_NAME)
 	$(INSTALL_SCRIPT) -c -m 0444 prof_attr \
 		$(DESTDIR)/etc/security/prof_attr.d/$(MODULE_NAME)
-	$(INSTALL_SCRIPT) -c -m 0444 Xnest.1 $(DESTDIR)$(X11_MAN_DIR)/man1/
+	$(INSTALL_SCRIPT) -c -m 0444 Xnest.1 $(DESTDIR)$(MODULE_MAN_DIR)/man1/
--- a/open-src/xserver/xvnc/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/open-src/xserver/xvnc/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -254,7 +254,7 @@
 
 Xvnc_install_data: $(SOURCE_TARGETS)
 	mkdir -p $(PROTODIR)/usr/share/man/man1 \
-		$(PROTODIR)$(SMF_MANIFEST_DIR)/application/x11 
+		$(PROTODIR)$(X11_SMF_MANIFEST_DIR)
 	$(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/unix/vncserver.man \
 		$(PROTODIR)/usr/share/man/man1/vncserver.1
 	$(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/unix/vncconfig/vncconfig.man \
@@ -267,7 +267,7 @@
 	    $(SOURCE_DIR)/unix/x0vncserver/x0vncserver.man \
 		$(PROTODIR)/usr/share/man/man1/x0vncserver.1
 	$(INSTALL_SCRIPT) -m 0444 xvnc-inetd.xml \
-		$(PROTODIR)$(SMF_MANIFEST_DIR)/application/x11/
+		$(PROTODIR)$(X11_SMF_MANIFEST_DIR)/
 	$(INSTALL_SCRIPT) -m 0555 vnclock.sh \
 		$(PROTODIR)/usr/lib/vnclock
 
--- a/pkg/Makefile	Fri Feb 19 16:57:44 2016 -0800
+++ b/pkg/Makefile	Mon Feb 22 16:57:16 2016 -0800
@@ -2,7 +2,7 @@
 #
 # Makefile for X Consolidation packages
 #
-# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -147,7 +147,7 @@
 
 $(FONT_ATTRS): $(FONT_METADATA)
 
-FONT_LIBS_PATH=$(PROTODIR)$(X11_SERVERLIBS_DIR)$(LIBSUBDIR_64):$(PROTODIR)$(X11_DIR)/lib$(LIBSUBDIR_64):$(PROTODIR)/usr/lib$(LIBSUBDIR_64)
+FONT_LIBS_PATH=$(PROTODIR)$(X11_SERVERLIBS_DIR)$(LIBSUBDIR_64):$(PROTODIR)/usr/lib$(LIBSUBDIR_64)
 
 $(PDIR)/%.font: $(PDIR)/%.p5m
 	@print "## Generating font metadata in $(@F)"