Makefile.am revision d9c7fc6c
1d9c7fc6cSmrg# $Id: Makefile.am,v 1.1.1.1 2008/07/30 02:47:02 mrg Exp $
2d9c7fc6cSmrg#
3d9c7fc6cSmrg# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4d9c7fc6cSmrg# 
5d9c7fc6cSmrg# Permission to use, copy, modify, distribute, and sell this software and its
6d9c7fc6cSmrg# documentation for any purpose is hereby granted without fee, provided that
7d9c7fc6cSmrg# the above copyright notice appear in all copies and that both that
8d9c7fc6cSmrg# copyright notice and this permission notice appear in supporting
9d9c7fc6cSmrg# documentation.
10d9c7fc6cSmrg# 
11d9c7fc6cSmrg# The above copyright notice and this permission notice shall be included
12d9c7fc6cSmrg# in all copies or substantial portions of the Software.
13d9c7fc6cSmrg# 
14d9c7fc6cSmrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15d9c7fc6cSmrg# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16d9c7fc6cSmrg# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17d9c7fc6cSmrg# IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
18d9c7fc6cSmrg# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19d9c7fc6cSmrg# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20d9c7fc6cSmrg# OTHER DEALINGS IN THE SOFTWARE.
21d9c7fc6cSmrg# 
22d9c7fc6cSmrg# Except as contained in this notice, the name of the copyright holders shall
23d9c7fc6cSmrg# not be used in advertising or otherwise to promote the sale, use or
24d9c7fc6cSmrg# other dealings in this Software without prior written authorization
25d9c7fc6cSmrg# from the copyright holders.
26d9c7fc6cSmrg# 
27d9c7fc6cSmrg
28d9c7fc6cSmrglibmandir = $(LIB_MAN_DIR)
29d9c7fc6cSmrg
30d9c7fc6cSmrgLIB_MAN_DIR_SUFFIX = $(LIB_MAN_DIR:@mandir@/man%=%)
31d9c7fc6cSmrg
32d9c7fc6cSmrglibman_PRE = Xevie.man
33d9c7fc6cSmrg
34d9c7fc6cSmrglibman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@) \
35d9c7fc6cSmrg	      $(Xevie_shadows:=.@LIB_MAN_SUFFIX@)
36d9c7fc6cSmrg
37d9c7fc6cSmrgBUILT_SOURCES = shadows.DONE
38d9c7fc6cSmrg
39d9c7fc6cSmrgEXTRA_DIST = $(libman_PRE)
40d9c7fc6cSmrg
41d9c7fc6cSmrgCLEANFILES = $(libman_DATA) $(BUILT_SOURCES)
42d9c7fc6cSmrg
43d9c7fc6cSmrgSED = sed
44d9c7fc6cSmrg
45d9c7fc6cSmrg# Strings to replace in man pages
46d9c7fc6cSmrgXORGRELSTRING = @PACKAGE_STRING@
47d9c7fc6cSmrg  XORGMANNAME = X Version 11
48d9c7fc6cSmrg
49d9c7fc6cSmrgMAN_SUBSTS = \
50d9c7fc6cSmrg	-e 's/__vendorversion__/"$(XORGRELSTRING)" "$(XORGMANNAME)"/' \
51d9c7fc6cSmrg	-e 's/__appmansuffix__/$(APP_MAN_SUFFIX)/g' \
52d9c7fc6cSmrg	-e 's/__libmansuffix__/$(LIB_MAN_SUFFIX)/g' \
53d9c7fc6cSmrg	-e 's/__filemansuffix__/$(FILE_MAN_SUFFIX)/g'
54d9c7fc6cSmrg
55d9c7fc6cSmrgSUFFIXES = .$(LIB_MAN_SUFFIX) .man
56d9c7fc6cSmrg
57d9c7fc6cSmrg.man.$(LIB_MAN_SUFFIX):
58d9c7fc6cSmrg	sed $(MAN_SUBSTS) < $< > $@
59d9c7fc6cSmrg
60d9c7fc6cSmrg# Generate man page shadow files (Replaces InstallManPageAliases from Imake)
61d9c7fc6cSmrg
62d9c7fc6cSmrgXevie_shadows =                             \
63d9c7fc6cSmrg    XevieQueryVersion                       \
64d9c7fc6cSmrg    XevieStart                              \
65d9c7fc6cSmrg    XevieSelectInput                        \
66d9c7fc6cSmrg    XevieSendEvent                          \
67d9c7fc6cSmrg    XevieEnd
68d9c7fc6cSmrg
69d9c7fc6cSmrgshadows.DONE:
70d9c7fc6cSmrg	-rm -f $(Xevie_shadows:=.@LIB_MAN_SUFFIX@)
71d9c7fc6cSmrg	(for i in $(Xevie_shadows:=.@LIB_MAN_SUFFIX@) ; do \
72d9c7fc6cSmrg	 echo .so man$(LIB_MAN_DIR_SUFFIX)/Xevie.$(LIB_MAN_SUFFIX) > $$i; \
73d9c7fc6cSmrg	 done)
74