2 # Copyright 2005 Sun Microsystems, Inc. All rights reserved.
4 # Permission is hereby granted, free of charge, to any person obtaining a
5 # copy of this software and associated documentation files (the "Software"),
6 # to deal in the Software without restriction, including without limitation
7 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 # and/or sell copies of the Software, and to permit persons to whom the
9 # Software is furnished to do so, subject to the following conditions:
11 # The above copyright notice and this permission notice (including the next
12 # paragraph) shall be included in all copies or substantial portions of the
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 # DEALINGS IN THE SOFTWARE.
24 libmandir = $(LIB_MAN_DIR)
26 # Source files for X Input v2 man pages
28 XIChangeHierarchy.txt \
37 XISetClientPointer.txt \
40 XIListProperties.txt \
43 # Source files for X Input v1 man pages
45 XAllowDeviceEvents.txt \
46 XChangeDeviceDontPropagateList.txt \
47 XChangeKeyboardDevice.txt \
48 XChangePointerDevice.txt \
50 XGetDeviceControl.txt \
51 XGetDeviceKeyMapping.txt \
52 XGetDeviceModifierMapping.txt \
53 XGetDeviceMotionEvents.txt \
54 XGetDeviceProperty.txt \
55 XGetExtensionVersion.txt \
56 XGetFeedbackControl.txt \
57 XGrabDeviceButton.txt \
60 XListDeviceProperties.txt \
61 XListInputDevices.txt \
63 XQueryDeviceState.txt \
64 XSelectExtensionEvent.txt \
65 XSendExtensionEvent.txt \
66 XSetDeviceButtonMapping.txt \
69 XSetDeviceValuators.txt \
72 # Name of DocBook XML files generated from .txt files by asciidoc
73 libman_xml = $(libman_txt:.txt=.xml)
75 # Shadow man pages are simply links to a main man page.
76 # They are created by the xmlto command when generating man pages from DocBook
77 # The shadow man page contains a gtroff .so request to include the main man page
79 XIUndefineCursor.man \
87 XIGetClientPointer.man \
89 XIGetSelectedEvents.man \
90 XIDeleteProperty.man \
95 XGetDeviceDontPropagateList.man \
96 XChangeDeviceControl.man \
97 XChangeDeviceKeyMapping.man \
98 XSetDeviceModifierMapping.man \
99 XChangeFeedbackControl.man \
100 XUngrabDeviceButton.man \
101 XUngrabDeviceKey.man \
103 XDeviceTimeCoord.man \
104 XFreeDeviceList.man \
106 XGetSelectedExtensionEvents.man \
107 XGetDeviceButtonMapping.man \
108 XGetDeviceFocus.man \
109 XChangeDeviceProperty.man \
110 XDeleteDeviceProperty.man \
113 # Name of man page files generated from DocBook XML files by xmlto
114 libman_PRE = $(libman_txt:.txt=.man) $(libman_shadows)
117 libman_DATA = $(libman_PRE:.man=.$(LIB_MAN_SUFFIX))
120 EXTRA_DIST = $(libman_txt) $(libman_PRE)
121 CLEANFILES = $(libman_DATA) *.libmansuffix
122 MAINTAINERCLEANFILES = $(libman_PRE) *.xml
124 # Dependencies for X Input v1 shadow pages
125 XGetDeviceDontPropagateList.man: XChangeDeviceDontPropagateList.man
126 XChangeDeviceControl.man: XGetDeviceControl.man
127 XChangeDeviceKeyMapping.man: XGetDeviceKeyMapping.man
128 XSetDeviceModifierMapping.man: XGetDeviceModifierMapping.man
129 XDeviceTimeCoord.man: XGetDeviceMotionEvents.man
130 XChangeFeedbackControl.man: XGetFeedbackControl.man
131 XUngrabDeviceButton.man: XGrabDeviceButton.man
132 XUngrabDeviceKey.man: XGrabDeviceKey.man
133 XUngrabDevice.man: XGrabDevice.man
134 XFreeDeviceList.man: XListInputDevices.man
135 XCloseDevice.man: XOpenDevice.man
136 XGetSelectedExtensionEvents.man: XSelectExtensionEvent.man
137 XGetDeviceButtonMapping.man: XSetDeviceButtonMapping.man
138 XGetDeviceFocus.man: XSetDeviceFocus.man
139 XChangeDeviceProperty.man: XGetDeviceProperty.man
140 XDeleteDeviceProperty.man: XGetDeviceProperty.man
142 # Dependencies for X Input v2 shadow pages
143 XIUndefineCursor.man: XIDefineCursor.man
144 XIUngrabButton.man XIGrabKeycode.man XIUngrabKeycode.man: XIGrabButton.man
145 XIGetClientPointer.man: XISetClientPointer.man
146 XIGetFocus.man: XISetFocus.man
147 XIUngrabDevice.man: XIGrabDevice.man
148 XIGetProperty.man: XIChangeProperty.man
149 XIDeleteProperty.man: XIChangeProperty.man
150 XIUngrabEnter.man XIGrabFocusIn.man XIUngrabFocusIn.man: XIGrabEnter.man
151 XIGetSelectedEvents.man: XISelectEvents.man
152 XIFreeDeviceInfo.man: XIQueryDevice.man
154 # String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
155 # Unable to use __libmansuffix__ as underscores are lost in txt --> xml conversion
156 MAN_SUBSTS += -e 's/libmansuffix/$(LIB_MAN_SUFFIX)/g'
158 # asciidoc is generating [FIXME...] values in the .TH line we should fix.
159 MAN_SUBSTS += -e 's/\[FIXME: source\]/$(XORG_MAN_PAGE)/'
160 MAN_SUBSTS += -e 's/\[FIXME: manual\]/XINPUT FUNCTIONS/'
162 # asciidoc generates shadow page references without the man section directory
163 MAN_SUBSTS += -e 's/^\.so X/.so man$(LIB_MAN_SUFFIX)\/X/'
165 SUFFIXES = .man .$(LIB_MAN_SUFFIX)
166 .man.$(LIB_MAN_SUFFIX):
167 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
169 # Generate man pages and shadow pages from .txt and then from DocBook XML
171 SUFFIXES += .txt .xml
173 $(AM_V_GEN)$(ASCIIDOC) -b docbook -d manpage -o $@ $<
175 $(AM_V_GEN)$(XMLTO) man $<
176 $(AM_V_at)mv -f $(@:.man=.libmansuffix) $@
178 # Invoke asciidoc/xmlto main man page generation for shadow pages
180 @if test ! -f $(@:.man=.libmansuffix); then \
182 $(MAKE) $(AM_MAKEFLAGS) $< || exit 1; \
184 $(AM_V_at)mv -f $(@:.man=.libmansuffix) $@