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 XIBarrierReleasePointer.txt \
29 XIChangeHierarchy.txt \
38 XISetClientPointer.txt \
41 XIListProperties.txt \
44 # Source files for X Input v1 man pages
46 XAllowDeviceEvents.txt \
47 XChangeDeviceDontPropagateList.txt \
48 XChangeKeyboardDevice.txt \
49 XChangePointerDevice.txt \
51 XGetDeviceControl.txt \
52 XGetDeviceKeyMapping.txt \
53 XGetDeviceModifierMapping.txt \
54 XGetDeviceMotionEvents.txt \
55 XGetDeviceProperty.txt \
56 XGetExtensionVersion.txt \
57 XGetFeedbackControl.txt \
58 XGrabDeviceButton.txt \
61 XListDeviceProperties.txt \
62 XListInputDevices.txt \
64 XQueryDeviceState.txt \
65 XSelectExtensionEvent.txt \
66 XSendExtensionEvent.txt \
67 XSetDeviceButtonMapping.txt \
70 XSetDeviceValuators.txt \
73 # Name of DocBook XML files generated from .txt files by asciidoc
74 libman_xml = $(libman_txt:.txt=.xml)
76 # Shadow man pages are simply links to a main man page.
77 # They are created by the xmlto command when generating man pages from DocBook
78 # The shadow man page contains a gtroff .so request to include the main man page
80 XIBarrierReleasePointers.man \
81 XIUndefineCursor.man \
89 XIGetClientPointer.man \
91 XIGetSelectedEvents.man \
92 XIDeleteProperty.man \
94 XIFreeDeviceInfo.man \
95 XIGrabTouchBegin.man \
96 XIUngrabTouchBegin.man
99 XGetDeviceDontPropagateList.man \
100 XChangeDeviceControl.man \
101 XChangeDeviceKeyMapping.man \
102 XSetDeviceModifierMapping.man \
103 XChangeFeedbackControl.man \
104 XUngrabDeviceButton.man \
105 XUngrabDeviceKey.man \
107 XDeviceTimeCoord.man \
108 XFreeDeviceList.man \
110 XGetSelectedExtensionEvents.man \
111 XGetDeviceButtonMapping.man \
112 XGetDeviceFocus.man \
113 XChangeDeviceProperty.man \
114 XDeleteDeviceProperty.man \
117 # Name of man page files generated from DocBook XML files by xmlto
118 libman_PRE = $(libman_txt:.txt=.man) $(libman_shadows)
121 libman_DATA = $(libman_PRE:.man=.$(LIB_MAN_SUFFIX))
124 EXTRA_DIST = $(libman_txt) $(libman_PRE)
125 CLEANFILES = $(libman_DATA) *.libmansuffix
126 MAINTAINERCLEANFILES = $(libman_PRE) *.xml
128 # Dependencies for X Input v1 shadow pages
129 XGetDeviceDontPropagateList.man: XChangeDeviceDontPropagateList.man
130 XChangeDeviceControl.man: XGetDeviceControl.man
131 XChangeDeviceKeyMapping.man: XGetDeviceKeyMapping.man
132 XSetDeviceModifierMapping.man: XGetDeviceModifierMapping.man
133 XDeviceTimeCoord.man: XGetDeviceMotionEvents.man
134 XChangeFeedbackControl.man: XGetFeedbackControl.man
135 XUngrabDeviceButton.man: XGrabDeviceButton.man
136 XUngrabDeviceKey.man: XGrabDeviceKey.man
137 XUngrabDevice.man: XGrabDevice.man
138 XFreeDeviceList.man: XListInputDevices.man
139 XCloseDevice.man: XOpenDevice.man
140 XGetSelectedExtensionEvents.man: XSelectExtensionEvent.man
141 XGetDeviceButtonMapping.man: XSetDeviceButtonMapping.man
142 XGetDeviceFocus.man: XSetDeviceFocus.man
143 XChangeDeviceProperty.man: XGetDeviceProperty.man
144 XDeleteDeviceProperty.man: XGetDeviceProperty.man
146 # Dependencies for X Input v2 shadow pages
147 XIUndefineCursor.man: XIDefineCursor.man
148 XIUngrabButton.man XIGrabKeycode.man XIUngrabKeycode.man XIGrabTouchBegin.man XIUngrabTouchBegin.man: XIGrabButton.man
149 XIGetClientPointer.man: XISetClientPointer.man
150 XIGetFocus.man: XISetFocus.man
151 XIUngrabDevice.man: XIGrabDevice.man
152 XIGetProperty.man: XIChangeProperty.man
153 XIDeleteProperty.man: XIChangeProperty.man
154 XIUngrabEnter.man XIGrabFocusIn.man XIUngrabFocusIn.man: XIGrabEnter.man
155 XIGetSelectedEvents.man: XISelectEvents.man
156 XIFreeDeviceInfo.man: XIQueryDevice.man
157 XIBarrierReleasePointers.man: XIBarrierReleasePointer.man
159 # String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
160 # Unable to use __libmansuffix__ as underscores are lost in txt --> xml conversion
161 MAN_SUBSTS += -e 's/libmansuffix/$(LIB_MAN_SUFFIX)/g'
163 # asciidoc is generating [FIXME...] values in the .TH line we should fix.
164 MAN_SUBSTS += -e 's/\[FIXME: source\]/$(XORG_MAN_PAGE)/'
165 MAN_SUBSTS += -e 's/\[FIXME: manual\]/XINPUT FUNCTIONS/'
167 # asciidoc generates shadow page references without the man section directory
168 MAN_SUBSTS += -e 's/^\.so X/.so man$(LIB_MAN_SUFFIX)\/X/'
170 SUFFIXES = .man .$(LIB_MAN_SUFFIX)
171 .man.$(LIB_MAN_SUFFIX):
172 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
174 # Generate man pages and shadow pages from .txt and then from DocBook XML
176 SUFFIXES += .txt .xml
178 $(AM_V_GEN)$(ASCIIDOC) -b docbook -d manpage -o $@ $<
180 $(AM_V_GEN)$(XMLTO) man $<
181 $(AM_V_at)mv -f $(@:.man=.libmansuffix) $@
183 # Invoke asciidoc/xmlto main man page generation for shadow pages
185 @if test ! -f $(@:.man=.libmansuffix); then \
187 $(MAKE) $(AM_MAKEFLAGS) $< || exit 1; \
189 $(AM_V_at)mv -f $(@:.man=.libmansuffix) $@