1240a9a23Smbalmer#
2240a9a23Smbalmer# Copyright (c) 2006 Matthieu Herrb
3240a9a23Smbalmer#
4240a9a23Smbalmer# Permission to use, copy, modify, and distribute this software for any
5240a9a23Smbalmer# purpose with or without fee is hereby granted, provided that the above
6240a9a23Smbalmer# copyright notice and this permission notice appear in all copies.
7240a9a23Smbalmer#
8240a9a23Smbalmer# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9240a9a23Smbalmer# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10240a9a23Smbalmer# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11240a9a23Smbalmer# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12240a9a23Smbalmer# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13240a9a23Smbalmer# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14240a9a23Smbalmer# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15240a9a23Smbalmer#
16240a9a23Smbalmerdrivermandir= $(DRIVER_MAN_DIR)
17240a9a23Smbalmerdriverman_PRE= @DRIVER_NAME@.man
18240a9a23Smbalmerdriverman_DATA= $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
19240a9a23Smbalmer
20240a9a23SmbalmerEXTRA_DIST= @DRIVER_NAME@.man
21240a9a23Smbalmer
22240a9a23SmbalmerCLEANFILES= $(driverman_DATA)
23240a9a23Smbalmer
24240a9a23SmbalmerSED= sed
25240a9a23Smbalmer
26240a9a23Smbalmer# Strings to replace in man pages
27240a9a23SmbalmerXORGRELSTRING = @PACKAGE_STRING@
28240a9a23Smbalmer  XORGMANNAME = X Version 11
29240a9a23Smbalmer
30240a9a23SmbalmerMAN_SUBSTS = \
31240a9a23Smbalmer        -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
32240a9a23Smbalmer        -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
33240a9a23Smbalmer        -e 's|__xservername__|Xorg|g' \
34240a9a23Smbalmer        -e 's|__xconfigfile__|xorg.conf|g' \
35240a9a23Smbalmer        -e 's|__projectroot__|$(prefix)|g' \
36240a9a23Smbalmer        -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
37240a9a23Smbalmer        -e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \
38240a9a23Smbalmer        -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
39240a9a23Smbalmer        -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
40240a9a23Smbalmer        -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
41240a9a23Smbalmer
42240a9a23SmbalmerSUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
43240a9a23Smbalmer
44240a9a23Smbalmer.man.$(DRIVER_MAN_SUFFIX):
45240a9a23Smbalmer	sed $(MAN_SUBSTS) < $< > $@
46