Makefile.am revision 3e256790
1c43cc173Smrg#
2c43cc173Smrg# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3c27c18e8Smrg#
4c43cc173Smrg# Permission to use, copy, modify, distribute, and sell this software and its
5c43cc173Smrg# documentation for any purpose is hereby granted without fee, provided that
6c43cc173Smrg# the above copyright notice appear in all copies and that both that
7c43cc173Smrg# copyright notice and this permission notice appear in supporting
8c43cc173Smrg# documentation.
9c27c18e8Smrg#
10c43cc173Smrg# The above copyright notice and this permission notice shall be included
11c43cc173Smrg# in all copies or substantial portions of the Software.
12c27c18e8Smrg#
13c43cc173Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14c43cc173Smrg# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15c43cc173Smrg# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16c43cc173Smrg# IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
17c43cc173Smrg# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
18c43cc173Smrg# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
19c43cc173Smrg# OTHER DEALINGS IN THE SOFTWARE.
20c27c18e8Smrg#
21c43cc173Smrg# Except as contained in this notice, the name of the copyright holders shall
22c43cc173Smrg# not be used in advertising or otherwise to promote the sale, use or
23c43cc173Smrg# other dealings in this Software without prior written authorization
24c43cc173Smrg# from the copyright holders.
25c27c18e8Smrg#
26c43cc173Smrg
27c43cc173Smrglibmandir = $(LIB_MAN_DIR)
28c43cc173Smrg
29c43cc173SmrgLIB_MAN_DIR_SUFFIX = $(LIB_MAN_DIR:@mandir@/man%=%)
30c43cc173Smrg
31c27c18e8SmrgXI2_manpages = \
32c27c18e8Smrg	XIChangeHierarchy.txt \
33c27c18e8Smrg	XIDefineCursor.txt \
34c27c18e8Smrg	XIGrabButton.txt \
35c27c18e8Smrg	XIGrabDevice.txt \
36c27c18e8Smrg        XIGrabEnter.txt \
37c27c18e8Smrg	XIQueryDevice.txt \
38c27c18e8Smrg	XIQueryPointer.txt \
39c27c18e8Smrg	XIQueryVersion.txt \
40c27c18e8Smrg	XISelectEvents.txt \
41c27c18e8Smrg	XISetClientPointer.txt \
42c27c18e8Smrg	XISetFocus.txt \
43c27c18e8Smrg	XIWarpPointer.txt \
44c27c18e8Smrg	XIListProperties.txt \
45c27c18e8Smrg	XIChangeProperty.txt
46c27c18e8Smrg
47c27c18e8Smrglibman_txt = \
48c27c18e8Smrg	XAllowDeviceEvents.txt \
49c27c18e8Smrg	XChangeDeviceDontPropagateList.txt \
50c27c18e8Smrg	XChangeKeyboardDevice.txt \
51c27c18e8Smrg	XChangePointerDevice.txt \
52c27c18e8Smrg	XDeviceBell.txt \
53c27c18e8Smrg	XGetDeviceControl.txt \
54c27c18e8Smrg	XGetDeviceKeyMapping.txt \
55c27c18e8Smrg	XGetDeviceModifierMapping.txt \
56c27c18e8Smrg	XGetDeviceMotionEvents.txt \
57c27c18e8Smrg	XGetDeviceProperty.txt \
58c27c18e8Smrg	XGetExtensionVersion.txt \
59c27c18e8Smrg	XGetFeedbackControl.txt \
60c27c18e8Smrg	XGrabDeviceButton.txt \
61c27c18e8Smrg	XGrabDeviceKey.txt \
62c27c18e8Smrg	XGrabDevice.txt \
63c27c18e8Smrg	XListDeviceProperties.txt \
64c27c18e8Smrg	XListInputDevices.txt \
65c27c18e8Smrg	XOpenDevice.txt \
66c27c18e8Smrg	XQueryDeviceState.txt \
67c27c18e8Smrg	XSelectExtensionEvent.txt \
68c27c18e8Smrg	XSendExtensionEvent.txt \
69c27c18e8Smrg	XSetDeviceButtonMapping.txt \
70c27c18e8Smrg	XSetDeviceFocus.txt \
71c27c18e8Smrg	XSetDeviceMode.txt \
72c27c18e8Smrg	XSetDeviceValuators.txt \
73c27c18e8Smrg        $(XI2_manpages)
74c27c18e8Smrg
75c27c18e8Smrglibman_xml = $(libman_txt:.txt=.xml)
76c27c18e8Smrg# manpages that are references to another page. These are produced as a
77c27c18e8Smrg# side effect of the xmlto rule, so they need to be handled specially.
78c27c18e8Smrg
79c27c18e8SmrgXI2_refpages = \
80c27c18e8Smrg	XIUndefineCursor.man \
81c27c18e8Smrg	XIUngrabButton.man \
82c27c18e8Smrg	XIGrabKeycode.man \
83c27c18e8Smrg	XIUngrabKeycode.man \
84c27c18e8Smrg	XIUngrabDevice.man  \
85c27c18e8Smrg        XIUngrabEnter.man \
86c27c18e8Smrg        XIGrabFocusIn.man \
87c27c18e8Smrg        XIUngrabFocusIn.man \
88c27c18e8Smrg	XIGetClientPointer.man \
89c27c18e8Smrg	XIGetFocus.man \
90c27c18e8Smrg	XIGetSelectedEvents.man \
91c27c18e8Smrg	XIDeleteProperty.man \
92c27c18e8Smrg	XIGetProperty.man \
93c27c18e8Smrg	XIFreeDeviceInfo.man
94c27c18e8Smrg
95c27c18e8Smrglibman_ref = \
96c27c18e8Smrg	XGetDeviceDontPropagateList.man \
97c27c18e8Smrg	XChangeDeviceControl.man \
98c27c18e8Smrg	XChangeDeviceKeyMapping.man \
99c27c18e8Smrg	XSetDeviceModifierMapping.man \
100c27c18e8Smrg	XChangeFeedbackControl.man \
101c27c18e8Smrg	XUngrabDeviceButton.man \
102c27c18e8Smrg	XUngrabDeviceKey.man \
103c27c18e8Smrg	XUngrabDevice.man \
104c27c18e8Smrg	XDeviceTimeCoord.man \
105c27c18e8Smrg	XFreeDeviceList.man \
106c27c18e8Smrg	XCloseDevice.man \
107c27c18e8Smrg	XGetSelectedExtensionEvents.man \
108c27c18e8Smrg	XGetDeviceButtonMapping.man \
109c27c18e8Smrg	XGetDeviceFocus.man \
110c27c18e8Smrg	XChangeDeviceProperty.man \
111c27c18e8Smrg	XDeleteDeviceProperty.man \
112c27c18e8Smrg        $(XI2_refpages)
113c27c18e8Smrg
114c27c18e8Smrg
115c27c18e8Smrglibman_pre = $(libman_txt:.txt=.man) $(libman_ref)
116c27c18e8Smrg
1173e256790Smrgif INSTALL_MANPAGES
118c27c18e8Smrgnodist_libman_DATA = $(libman_pre:.man=.$(LIB_MAN_SUFFIX))
119c27c18e8Smrgendif
120c27c18e8Smrg
121c27c18e8SmrgEXTRA_DIST = $(libman_txt) $(libman_pre)
122c27c18e8SmrgCLEANFILES = $(nodist_libman_DATA) *.libmansuffix
123c27c18e8SmrgMAINTAINERCLEANFILES = $(libman_pre) *.xml
124c27c18e8Smrg
125c27c18e8Smrg# prerequisites for the side effect pages
126c27c18e8SmrgXGetDeviceDontPropagateList.man: XChangeDeviceDontPropagateList.man
127c27c18e8SmrgXChangeDeviceControl.man: XGetDeviceControl.man
128c27c18e8SmrgXChangeDeviceKeyMapping.man: XGetDeviceKeyMapping.man
129c27c18e8SmrgXSetDeviceModifierMapping.man: XGetDeviceModifierMapping.man
130c27c18e8SmrgXDeviceTimeCoord.man: XGetDeviceMotionEvents.man
131c27c18e8SmrgXChangeFeedbackControl.man: XGetFeedbackControl.man
132c27c18e8SmrgXUngrabDeviceButton.man: XGrabDeviceButton.man
133c27c18e8SmrgXUngrabDeviceKey.man: XGrabDeviceKey.man
134c27c18e8SmrgXUngrabDevice.man: XGrabDevice.man
135c27c18e8SmrgXFreeDeviceList.man: XListInputDevices.man
136c27c18e8SmrgXCloseDevice.man: XOpenDevice.man
137c27c18e8SmrgXGetSelectedExtensionEvents.man: XSelectExtensionEvent.man
138c27c18e8SmrgXGetDeviceButtonMapping.man: XSetDeviceButtonMapping.man
139c27c18e8SmrgXGetDeviceFocus.man: XSetDeviceFocus.man
140c27c18e8SmrgXChangeDeviceProperty.man: XGetDeviceProperty.man
141c27c18e8SmrgXDeleteDeviceProperty.man: XGetDeviceProperty.man
142c27c18e8Smrg
143c27c18e8Smrg# XI2 prereqs
144c27c18e8SmrgXIUndefineCursor.man: XIDefineCursor.man
145c27c18e8SmrgXIUngrabButton.man XIGrabKeycode.man XIUngrabKeycode.man: XIGrabButton.man
146c27c18e8SmrgXIGetClientPointer.man: XISetClientPointer.man
147c27c18e8SmrgXIGetFocus.man: XISetFocus.man
148c27c18e8SmrgXIUngrabDevice.man: XIGrabDevice.man
149c27c18e8SmrgXIGetProperty.man: XIChangeProperty.man
150c27c18e8SmrgXIDeleteProperty.man: XIChangeProperty.man
151c27c18e8SmrgXIUngrabEnter.man XIGrabFocusIn.man XIUngrabFocusIn.man: XIGrabEnter.man
152c27c18e8SmrgXIGetSelectedEvents.man: XISelectEvents.man
153c27c18e8SmrgXIFreeDeviceInfo.man: XIQueryDevice.man
154c43cc173Smrg
155c43cc173Smrg# Strings to replace in man pages
156c27c18e8SmrgXORGRELSTRING = $(PACKAGE_STRING)
157c43cc173Smrg  XORGMANNAME = X Version 11
158c43cc173Smrg
159c27c18e8SmrgMAN_SUBSTS = \
160c27c18e8Smrg	-e 's/__xorgversion__/"$(XORGRELSTRING)" "$(XORGMANNAME)"/' \
161c27c18e8Smrg	-e 's/__xservername__/Xorg/g' \
162c27c18e8Smrg	-e 's/__xconfigfile__/xorg.conf/g' \
163c27c18e8Smrg	-e 's/__appmansuffix__/$(APP_MAN_SUFFIX)/g' \
164c27c18e8Smrg	-e 's/libmansuffix/$(LIB_MAN_SUFFIX)/g' \
165c27c18e8Smrg	-e 's/__filemansuffix__/$(FILE_MAN_SUFFIX)/g'
166c43cc173Smrg
167c27c18e8SmrgSUFFIXES = .man .$(LIB_MAN_SUFFIX)
168c43cc173Smrg.man.$(LIB_MAN_SUFFIX):
169c27c18e8Smrg	$(SED) $(MAN_SUBSTS) < $< > $@
170c27c18e8Smrg
171c27c18e8Smrgif HAVE_DOCTOOLS
172c27c18e8SmrgSUFFIXES += .txt .xml
173c27c18e8Smrg.txt.xml:
174c27c18e8Smrg	$(ASCIIDOC) -b docbook -d manpage -o $@ $<
175c27c18e8Smrg.xml.man:
176c27c18e8Smrg	$(XMLTO) man $<
177c27c18e8Smrg	mv -f $(@:.man=.libmansuffix) $@
178c27c18e8Smrg
179c27c18e8Smrg# need to force asciidoc/xmlto to run if necessary for side effect pages
180c27c18e8Smrg$(libman_ref):
181c27c18e8Smrg	@if test ! -f $(@:.man=.libmansuffix); then \
182c27c18e8Smrg	  rm -f $<; \
183c27c18e8Smrg	  $(MAKE) $(AM_MAKEFLAGS) $< || exit 1; \
184c27c18e8Smrg	fi
185c27c18e8Smrg	mv -f $(@:.man=.libmansuffix) $@
186c27c18e8Smrgendif
187