Makefile.am revision 52f9793f
152f9793fSmrg# $Id: Makefile.am,v 1.1.1.1 2008/07/30 02:48:59 mrg Exp $
252f9793fSmrg#
352f9793fSmrg# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
452f9793fSmrg# 
552f9793fSmrg# Permission to use, copy, modify, distribute, and sell this software and its
652f9793fSmrg# documentation for any purpose is hereby granted without fee, provided that
752f9793fSmrg# the above copyright notice appear in all copies and that both that
852f9793fSmrg# copyright notice and this permission notice appear in supporting
952f9793fSmrg# documentation.
1052f9793fSmrg# 
1152f9793fSmrg# The above copyright notice and this permission notice shall be included
1252f9793fSmrg# in all copies or substantial portions of the Software.
1352f9793fSmrg# 
1452f9793fSmrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1552f9793fSmrg# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1652f9793fSmrg# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1752f9793fSmrg# IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1852f9793fSmrg# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1952f9793fSmrg# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2052f9793fSmrg# OTHER DEALINGS IN THE SOFTWARE.
2152f9793fSmrg# 
2252f9793fSmrg# Except as contained in this notice, the name of the copyright holders shall
2352f9793fSmrg# not be used in advertising or otherwise to promote the sale, use or
2452f9793fSmrg# other dealings in this Software without prior written authorization
2552f9793fSmrg# from the copyright holders.
2652f9793fSmrg# 
2752f9793fSmrg
2852f9793fSmrglibmandir = $(LIB_MAN_DIR)
2952f9793fSmrg
3052f9793fSmrgLIB_MAN_DIR_SUFFIX = $(LIB_MAN_DIR:@mandir@/man%=%)
3152f9793fSmrg
3252f9793fSmrglibman_PRE = Xfontcache.man
3352f9793fSmrg
3452f9793fSmrgBUILT_SOURCES = shadows.DONE
3552f9793fSmrg
3652f9793fSmrgEXTRA_DIST = $(libman_PRE)
3752f9793fSmrg
3852f9793fSmrgCLEANFILES = $(libman_DATA) $(BUILT_SOURCES)
3952f9793fSmrg
4052f9793fSmrglibman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@) \
4152f9793fSmrg	      $(Xfontcache_shadows:=.@LIB_MAN_SUFFIX@)
4252f9793fSmrg
4352f9793fSmrgSED = sed
4452f9793fSmrg
4552f9793fSmrg# Strings to replace in man pages
4652f9793fSmrgXORGRELSTRING = @PACKAGE_STRING@
4752f9793fSmrg  XORGMANNAME = X Version 11
4852f9793fSmrg
4952f9793fSmrgMAN_SUBSTS = \
5052f9793fSmrg	-e 's/__vendorversion__/"$(XORGRELSTRING)" "$(XORGMANNAME)"/' \
5152f9793fSmrg	-e 's/__xservername__/Xorg/g' \
5252f9793fSmrg	-e 's/__xconfigfile__/xorg.conf/g' \
5352f9793fSmrg	-e 's/__miscmansuffix__/$(MISC_MAN_SUFFIX)/g' \
5452f9793fSmrg	-e 's/__libmansuffix__/$(LIB_MAN_SUFFIX)/g' \
5552f9793fSmrg	-e 's/__filemansuffix__/$(FILE_MAN_SUFFIX)/g'
5652f9793fSmrg
5752f9793fSmrgSUFFIXES = .$(LIB_MAN_SUFFIX) .man
5852f9793fSmrg
5952f9793fSmrg.man.$(LIB_MAN_SUFFIX):
6052f9793fSmrg	sed $(MAN_SUBSTS) < $< > $@
6152f9793fSmrg
6252f9793fSmrg# Generate man page shadow files (Replaces InstallManPageAliases from Imake)
6352f9793fSmrg
6452f9793fSmrgXfontcache_shadows =                        \
6552f9793fSmrg    FontCacheQueryExtension                 \
6652f9793fSmrg    FontCacheQueryVersion                   \
6752f9793fSmrg    FontCacheGetCacheSettings               \
6852f9793fSmrg    FontCacheChangeCacheSettings            \
6952f9793fSmrg    FontCacheGetCacheStatistics
7052f9793fSmrg
7152f9793fSmrgshadows.DONE:
7252f9793fSmrg	-rm -f $(Xfontcache_shadows:=.@LIB_MAN_SUFFIX@)
7352f9793fSmrg	(for i in $(Xfontcache_shadows:=.@LIB_MAN_SUFFIX@) ; do \
7452f9793fSmrg	 echo .so man$(LIB_MAN_DIR_SUFFIX)/Xfontcache.$(LIB_MAN_SUFFIX) > $$i; \
7552f9793fSmrg	 done)
76