2
2
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
4
# Permission to use, copy, modify, distribute, and sell this software and its
5
# documentation for any purpose is hereby granted without fee, provided that
6
# the above copyright notice appear in all copies and that both that
7
# copyright notice and this permission notice appear in supporting
10
# The above copyright notice and this permission notice shall be included
11
# in all copies or substantial portions of the Software.
13
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16
# IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
17
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
18
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
19
# OTHER DEALINGS IN THE SOFTWARE.
21
# Except as contained in this notice, the name of the copyright holders shall
22
# not be used in advertising or otherwise to promote the sale, use or
23
# other dealings in this Software without prior written authorization
24
# from the copyright holders.
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.
27
24
libmandir = $(LIB_MAN_DIR)
29
LIB_MAN_DIR_SUFFIX = $(LIB_MAN_DIR:@mandir@/man%=%)
32
XIChangeHierarchy.txt \
41
XISetClientPointer.txt \
44
XIListProperties.txt \
26
# Source files for X Input v2 man pages
28
XIChangeHierarchy.txt \
37
XISetClientPointer.txt \
40
XIListProperties.txt \
45
41
XIChangeProperty.txt
43
# Source files for X Input v1 man pages
48
XAllowDeviceEvents.txt \
49
XChangeDeviceDontPropagateList.txt \
50
XChangeKeyboardDevice.txt \
51
XChangePointerDevice.txt \
53
XGetDeviceControl.txt \
54
XGetDeviceKeyMapping.txt \
55
XGetDeviceModifierMapping.txt \
56
XGetDeviceMotionEvents.txt \
57
XGetDeviceProperty.txt \
58
XGetExtensionVersion.txt \
59
XGetFeedbackControl.txt \
60
XGrabDeviceButton.txt \
63
XListDeviceProperties.txt \
64
XListInputDevices.txt \
66
XQueryDeviceState.txt \
67
XSelectExtensionEvent.txt \
68
XSendExtensionEvent.txt \
69
XSetDeviceButtonMapping.txt \
72
XSetDeviceValuators.txt \
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
75
73
libman_xml = $(libman_txt:.txt=.xml)
76
# manpages that are references to another page. These are produced as a
77
# side effect of the xmlto rule, so they need to be handled specially.
80
XIUndefineCursor.man \
88
XIGetClientPointer.man \
90
XIGetSelectedEvents.man \
91
XIDeleteProperty.man \
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 \
93
92
XIFreeDeviceInfo.man
96
XGetDeviceDontPropagateList.man \
97
XChangeDeviceControl.man \
98
XChangeDeviceKeyMapping.man \
99
XSetDeviceModifierMapping.man \
100
XChangeFeedbackControl.man \
101
XUngrabDeviceButton.man \
102
XUngrabDeviceKey.man \
104
XDeviceTimeCoord.man \
105
XFreeDeviceList.man \
107
XGetSelectedExtensionEvents.man \
108
XGetDeviceButtonMapping.man \
109
XGetDeviceFocus.man \
110
XChangeDeviceProperty.man \
111
XDeleteDeviceProperty.man \
115
libman_pre = $(libman_txt:.txt=.man) $(libman_ref)
118
nodist_libman_DATA = $(libman_pre:.man=.$(LIB_MAN_SUFFIX))
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))
121
EXTRA_DIST = $(libman_txt) $(libman_pre)
122
CLEANFILES = $(nodist_libman_DATA) *.libmansuffix
123
MAINTAINERCLEANFILES = $(libman_pre) *.xml
120
EXTRA_DIST = $(libman_txt) $(libman_PRE)
121
CLEANFILES = $(libman_DATA) *.libmansuffix
122
MAINTAINERCLEANFILES = $(libman_PRE) *.xml
125
# prerequisites for the side effect pages
124
# Dependencies for X Input v1 shadow pages
126
125
XGetDeviceDontPropagateList.man: XChangeDeviceDontPropagateList.man
127
126
XChangeDeviceControl.man: XGetDeviceControl.man
128
127
XChangeDeviceKeyMapping.man: XGetDeviceKeyMapping.man
152
151
XIGetSelectedEvents.man: XISelectEvents.man
153
152
XIFreeDeviceInfo.man: XIQueryDevice.man
155
# Strings to replace in man pages
156
XORGRELSTRING = $(PACKAGE_STRING)
157
XORGMANNAME = X Version 11
160
-e 's/__xorgversion__/"$(XORGRELSTRING)" "$(XORGMANNAME)"/' \
161
-e 's/__xservername__/Xorg/g' \
162
-e 's/__xconfigfile__/xorg.conf/g' \
163
-e 's/__appmansuffix__/$(APP_MAN_SUFFIX)/g' \
164
-e 's/libmansuffix/$(LIB_MAN_SUFFIX)/g' \
165
-e 's/__filemansuffix__/$(FILE_MAN_SUFFIX)/g'
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'
167
158
SUFFIXES = .man .$(LIB_MAN_SUFFIX)
168
159
.man.$(LIB_MAN_SUFFIX):
169
$(SED) $(MAN_SUBSTS) < $< > $@
160
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
162
# Generate man pages and shadow pages from .txt and then from DocBook XML
172
164
SUFFIXES += .txt .xml
174
$(ASCIIDOC) -b docbook -d manpage -o $@ $<
166
$(AM_V_GEN)$(ASCIIDOC) -b docbook -d manpage -o $@ $<
177
mv -f $(@:.man=.libmansuffix) $@
168
$(AM_V_GEN)$(XMLTO) man $<
169
$(AM_V_GEN)mv -f $(@:.man=.libmansuffix) $@
179
# need to force asciidoc/xmlto to run if necessary for side effect pages
171
# Invoke asciidoc/xmlto main man page generation for shadow pages
181
173
@if test ! -f $(@:.man=.libmansuffix); then \
183
$(MAKE) $(AM_MAKEFLAGS) $< || exit 1; \
174
$(AM_V_GEN)rm -f $<; \
175
$(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) $< || exit 1; \
185
mv -f $(@:.man=.libmansuffix) $@
177
$(AM_V_GEN)mv -f $(@:.man=.libmansuffix) $@