Makefile revision 851
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt###############################################################################
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt#
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# xdm Makefile
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt#
938440694b33cd752e9e4b71a526368b4811c177Tinderbox User# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Use is subject to license terms.
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt#
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Permission is hereby granted, free of charge, to any person obtaining a
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# copy of this software and associated documentation files (the
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# "Software"), to deal in the Software without restriction, including
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# without limitation the rights to use, copy, modify, merge, publish,
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# distribute, and/or sell copies of the Software, and to permit persons
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# to whom the Software is furnished to do so, provided that the above
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# copyright notice(s) and this permission notice appear in all copies of
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# the Software and that both the above copyright notice(s) and this
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# permission notice appear in supporting documentation.
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt#
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
1753d3c4d74241a847794f7e7cfd94cc79be6600Evan Hunt# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
be0982e9e4b0631670a4c449ddf8a2bfaf04eb92Evan Hunt#
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Except as contained in this notice, the name of a copyright holder
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# shall not be used in advertising or otherwise to promote the sale, use
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# or other dealings in this Software without prior written authorization
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# of the copyright holder.
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt#
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt#
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Package name used in tarballs
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntMODULE_NAME=xdm
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Version number (used in path names)
9f40a783228eed48531756a6ab510d1e9c51648cTinderbox UserMODULE_VERSION=1.1.9
938440694b33cd752e9e4b71a526368b4811c177Tinderbox User
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Patches to apply to source after unpacking, in order
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntSOURCE_PATCHES = \
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt mkdir.patch,-p1 \
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt bindir.patch \
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt terminateServer.patch \
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt Xsession.patch
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Man pages to apply Sun footer to & attributes to list
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntSUNTOUCHED_MANPAGES=xdm.man.cpp
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntSUN_PACKAGE=SUNWxdm
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntMODULE_STABILITY=Committed
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntMODULE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/sbin/
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Where to install xdm files
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntMODULE_PREFIX=/usr
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntMODULE_PREFIX_SET=yes
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Additional configure script options
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Only build shared greeter module, not static
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Set various paths to better match Solaris
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntMODULE_CONFIG_OPTS= \
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt --enable-shared=yes --enable-static=no \
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt --with-xdmconfigdir=/etc/X11/xdm \
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt --with-piddir=/var/run/xdm \
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt --with-authdir=/var/run/xdm \
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt --bindir=/usr/sbin \
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt DEF_USER_PATH=/usr/bin:/usr/X11/bin:/usr/sbin:/sbin \
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt DEF_SYSTEM_PATH=/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Special handling while xdm is moved to /usr but other apps are still in
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# /usr/X11
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntMODULE_CONFIG_OPTS += \
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt --with-xrdb='$(X11_BIN_DIR)/xrdb' \
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt --with-default-session=command='$(X11_BIN_DIR)/xterm -ls' \
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Additional build & install targets
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntMODULE_ADD_BUILD_TARGETS=build_xdm_configs
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntMODULE_ADD_INSTALL_TARGETS=install_xdmshell install_xdm_configs
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Huntinclude ../Makefile.inc
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Move xdmshell from default location to the place we put in our packages
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Huntinstall_xdmshell: default_install
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt -rm -f $(PROTODIR)/usr/lib/X11/xdm/xdmshell
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt mv $(PROTODIR)/usr/sbin/xdmshell $(PROTODIR)/usr/lib/X11/xdm/xdmshell
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Copy xdm config files from /etc to /usr for use as prototypes
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXDM_CONFIG_FILES=Xaccess Xresources Xservers xdm-config
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXDM_ETC_CONFIGDIR=/etc/X11/xdm
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXDM_USR_CONFIGDIR=/usr/lib/X11/xdm
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXCF_USR_FILES=$(XDM_CONFIG_FILES:%=$(PROTODIR)/$(XDM_USR_CONFIGDIR)/%)
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXCF_ETC_SRCDIR=$(SOURCE_DIR)/config
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXCF_ETC_SRCFILES=$(XDM_CONFIG_FILES:%=$(XCF_ETC_SRCDIR)/%)
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXCF_USR_SRCDIR=$(SOURCE_DIR)/config/annotated
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXCF_USR_SRCFILES=$(XDM_CONFIG_FILES:%=$(XCF_USR_SRCDIR)/%)
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Huntbuild_xdm_configs: $(XCF_USR_SRCFILES)
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Huntinstall_xdm_configs: $(XCF_USR_FILES) $(PROTODIR)/$(XDM_USR_CONFIGDIR)/README
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt$(XCF_ETC_SRCFILES): default_build
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXCF_HEADER = %1$$s----------------------------------------------------------------------------
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXCF_HEADER += \n%1$$s NOTE: The file provided in $(XDM_USR_CONFIGDIR) is a sample %2$$s
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXCF_HEADER += \n%1$$s configuration file provided for your reference.
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXCF_HEADER += \n%1$$s
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXCF_HEADER += \n%1$$s xdm reads the actual configuration from the copies located in $(XDM_ETC_CONFIGDIR)
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXCF_HEADER += \n%1$$s (unless configured otherwise by $(XDM_ETC_CONFIGDIR)/xdm-config or
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXCF_HEADER += \n%1$$s a file specified via the -config command line option).
0f66aced2640d964aeb6db41210711ba0640d7f2Evan HuntXCF_HEADER += \n%1$$s----------------------------------------------------------------------------\n
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt
$(PROTODIR)/$(XDM_USR_CONFIGDIR) $(XCF_USR_SRCDIR):
mkdir -p $@
$(XCF_USR_FILES): $(PROTODIR)/$(XDM_USR_CONFIGDIR) $(XCF_USR_SRCFILES)
-rm -f $@
mkdir -p $(PROTODIR)/$(XDM_USR_CONFIGDIR)
@ $(START_CMD_ECHO) ; cp -p $(XCF_USR_SRCDIR)/$$(basename $@) $@
$(XCF_USR_SRCFILES): $(XCF_USR_SRCDIR) $(XCF_ETC_SRCFILES)
-rm -f $@
FILENAME=$$(basename $@) ; \
COMMENT_CHAR=$$(head -n 1 $(XCF_ETC_SRCDIR)/$${FILENAME}) ; \
printf '$(XCF_HEADER)' $${COMMENT_CHAR} $${FILENAME} > $@ ; \
cat $(XCF_ETC_SRCDIR)/$${FILENAME} >> $@
$(PROTODIR)/$(XDM_USR_CONFIGDIR)/README:$(PROTODIR)/$(XDM_USR_CONFIGDIR) config-README.txt
cp -p config-README.txt $@