Makefile revision 1197
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt###############################################################################
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# xdm Makefile
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# Permission is hereby granted, free of charge, to any person obtaining a
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# copy of this software and associated documentation files (the "Software"),
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# to deal in the Software without restriction, including without limitation
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# the rights to use, copy, modify, merge, publish, distribute, sublicense,
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# and/or sell copies of the Software, and to permit persons to whom the
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# Software is furnished to do so, subject to the following conditions:
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# The above copyright notice and this permission notice (including the next
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# paragraph) shall be included in all copies or substantial portions of the
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# DEALINGS IN THE SOFTWARE.
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# Package name used in tarballs
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# pkg(5) name we deliver the files in (override default)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# Version number (used in path names)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# Checksums for upstream tarball
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntTARBALL_SHA1 = ea0ee2923999d54848dc8a165867ffa7c628fd7b
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# Patches to apply to source after unpacking, in order
dbb012765c735ee0d82dedb116cdc7cf18957814Evan Hunt# Man pages to apply Sun footer to & attributes to list
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntMODULE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/sbin/
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# Where to install xdm files
699f790c49d03a9ef3c3234a72d272bb469203e8Evan Hunt# Additional configure script options
699f790c49d03a9ef3c3234a72d272bb469203e8Evan Hunt# Only build shared greeter module, not static
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# Set various paths to better match Solaris
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# configure scripts add libraries like -lXt & -lXinerama to the global $(LIBS)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# when only some objects need them, so ignore them in the rest.
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# Additional build & install targets
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntMODULE_ADD_INSTALL_TARGETS=install_xdmshell install_xdm_configs
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# Need to fix libtool interference with our linker flags
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# Move xdmshell from default location to the place we put in our packages
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt mv $(PROTODIR)/usr/sbin/xdmshell $(PROTODIR)/usr/lib/X11/xdm/xdmshell
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# Copy xdm config files from /etc to /usr for use as prototypes
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntXDM_CONFIG_FILES=Xaccess Xresources Xservers xdm-config
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntXCF_USR_FILES=$(XDM_CONFIG_FILES:%=$(PROTODIR)/$(XDM_USR_CONFIGDIR)/%)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntXCF_ETC_SRCFILES=$(XDM_CONFIG_FILES:%=$(XCF_ETC_SRCDIR)/%)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntXCF_USR_SRCFILES=$(XDM_CONFIG_FILES:%=$(XCF_USR_SRCDIR)/%)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Huntinstall_xdm_configs: $(XCF_USR_FILES) $(PROTODIR)/$(XDM_USR_CONFIGDIR)/README
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntXCF_HEADER = %1$$s----------------------------------------------------------------------------
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntXCF_HEADER += \n%1$$s NOTE: The file provided in $(XDM_USR_CONFIGDIR) is a sample %2$$s
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntXCF_HEADER += \n%1$$s configuration file provided for your reference.
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntXCF_HEADER += \n%1$$s xdm reads the actual configuration from the copies located in $(XDM_ETC_CONFIGDIR)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntXCF_HEADER += \n%1$$s (unless configured otherwise by $(XDM_ETC_CONFIGDIR)/xdm-config or
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntXCF_HEADER += \n%1$$s a file specified via the -config command line option).
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntXCF_HEADER += \n%1$$s----------------------------------------------------------------------------\n
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt$(PROTODIR)/$(XDM_USR_CONFIGDIR) $(XCF_USR_SRCDIR):
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt$(XCF_USR_FILES): $(PROTODIR)/$(XDM_USR_CONFIGDIR) $(XCF_USR_SRCFILES)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt$(XCF_USR_SRCFILES): $(XCF_USR_SRCDIR) $(XCF_ETC_SRCFILES)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt COMMENT_CHAR=$$(head -n 1 $(XCF_ETC_SRCDIR)/$${FILENAME}) ; \
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt printf '$(XCF_HEADER)' $${COMMENT_CHAR} $${FILENAME} > $@ ; \