~ubuntu-branches/ubuntu/oneiric/libxi/oneiric-proposed

« back to all changes in this revision

Viewing changes to man/Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2011-02-08 00:04:32 UTC
  • mfrom: (1.2.1 upstream) (4.1.3 experimental)
  • Revision ID: james.westby@ubuntu.com-20110208000432-3f8ewrpwmfmf0in5
Tags: 2:1.4.1-1
* New upstream release.
* Use xorg-sgml-doctool's copy of xorg.css.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
2
# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3
3
#
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
8
 
# documentation.
9
 
#
10
 
# The above copyright notice and this permission notice shall be included
11
 
# in all copies or substantial portions of the Software.
12
 
#
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.
20
 
#
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:
 
10
#
 
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
 
13
# Software.
 
14
#
 
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.
25
22
#
26
23
 
27
24
libmandir = $(LIB_MAN_DIR)
28
25
 
29
 
LIB_MAN_DIR_SUFFIX = $(LIB_MAN_DIR:@mandir@/man%=%)
30
 
 
31
 
XI2_manpages = \
32
 
        XIChangeHierarchy.txt \
33
 
        XIDefineCursor.txt \
34
 
        XIGrabButton.txt \
35
 
        XIGrabDevice.txt \
36
 
        XIGrabEnter.txt \
37
 
        XIQueryDevice.txt \
38
 
        XIQueryPointer.txt \
39
 
        XIQueryVersion.txt \
40
 
        XISelectEvents.txt \
41
 
        XISetClientPointer.txt \
42
 
        XISetFocus.txt \
43
 
        XIWarpPointer.txt \
44
 
        XIListProperties.txt \
 
26
# Source files for X Input v2 man pages
 
27
XI2_txt =                                       \
 
28
        XIChangeHierarchy.txt                   \
 
29
        XIDefineCursor.txt                      \
 
30
        XIGrabButton.txt                        \
 
31
        XIGrabDevice.txt                        \
 
32
        XIGrabEnter.txt                         \
 
33
        XIQueryDevice.txt                       \
 
34
        XIQueryPointer.txt                      \
 
35
        XIQueryVersion.txt                      \
 
36
        XISelectEvents.txt                      \
 
37
        XISetClientPointer.txt                  \
 
38
        XISetFocus.txt                          \
 
39
        XIWarpPointer.txt                       \
 
40
        XIListProperties.txt                    \
45
41
        XIChangeProperty.txt
46
42
 
 
43
# Source files for X Input v1 man pages
47
44
libman_txt = \
48
 
        XAllowDeviceEvents.txt \
49
 
        XChangeDeviceDontPropagateList.txt \
50
 
        XChangeKeyboardDevice.txt \
51
 
        XChangePointerDevice.txt \
52
 
        XDeviceBell.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 \
61
 
        XGrabDeviceKey.txt \
62
 
        XGrabDevice.txt \
63
 
        XListDeviceProperties.txt \
64
 
        XListInputDevices.txt \
65
 
        XOpenDevice.txt \
66
 
        XQueryDeviceState.txt \
67
 
        XSelectExtensionEvent.txt \
68
 
        XSendExtensionEvent.txt \
69
 
        XSetDeviceButtonMapping.txt \
70
 
        XSetDeviceFocus.txt \
71
 
        XSetDeviceMode.txt \
72
 
        XSetDeviceValuators.txt \
73
 
        $(XI2_manpages)
 
45
        XAllowDeviceEvents.txt                  \
 
46
        XChangeDeviceDontPropagateList.txt      \
 
47
        XChangeKeyboardDevice.txt               \
 
48
        XChangePointerDevice.txt                \
 
49
        XDeviceBell.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                   \
 
58
        XGrabDeviceKey.txt                      \
 
59
        XGrabDevice.txt                         \
 
60
        XListDeviceProperties.txt               \
 
61
        XListInputDevices.txt                   \
 
62
        XOpenDevice.txt                         \
 
63
        XQueryDeviceState.txt                   \
 
64
        XSelectExtensionEvent.txt               \
 
65
        XSendExtensionEvent.txt                 \
 
66
        XSetDeviceButtonMapping.txt             \
 
67
        XSetDeviceFocus.txt                     \
 
68
        XSetDeviceMode.txt                      \
 
69
        XSetDeviceValuators.txt                 \
 
70
        $(XI2_txt)
74
71
 
 
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.
78
74
 
79
 
XI2_refpages = \
80
 
        XIUndefineCursor.man \
81
 
        XIUngrabButton.man \
82
 
        XIGrabKeycode.man \
83
 
        XIUngrabKeycode.man \
84
 
        XIUngrabDevice.man  \
85
 
        XIUngrabEnter.man \
86
 
        XIGrabFocusIn.man \
87
 
        XIUngrabFocusIn.man \
88
 
        XIGetClientPointer.man \
89
 
        XIGetFocus.man \
90
 
        XIGetSelectedEvents.man \
91
 
        XIDeleteProperty.man \
92
 
        XIGetProperty.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
 
78
XI2_shadows =                                   \
 
79
        XIUndefineCursor.man                    \
 
80
        XIUngrabButton.man                      \
 
81
        XIGrabKeycode.man                       \
 
82
        XIUngrabKeycode.man                     \
 
83
        XIUngrabDevice.man                      \
 
84
        XIUngrabEnter.man                       \
 
85
        XIGrabFocusIn.man                       \
 
86
        XIUngrabFocusIn.man                     \
 
87
        XIGetClientPointer.man                  \
 
88
        XIGetFocus.man                          \
 
89
        XIGetSelectedEvents.man                 \
 
90
        XIDeleteProperty.man                    \
 
91
        XIGetProperty.man                       \
93
92
        XIFreeDeviceInfo.man
94
93
 
95
 
libman_ref = \
96
 
        XGetDeviceDontPropagateList.man \
97
 
        XChangeDeviceControl.man \
98
 
        XChangeDeviceKeyMapping.man \
99
 
        XSetDeviceModifierMapping.man \
100
 
        XChangeFeedbackControl.man \
101
 
        XUngrabDeviceButton.man \
102
 
        XUngrabDeviceKey.man \
103
 
        XUngrabDevice.man \
104
 
        XDeviceTimeCoord.man \
105
 
        XFreeDeviceList.man \
106
 
        XCloseDevice.man \
107
 
        XGetSelectedExtensionEvents.man \
108
 
        XGetDeviceButtonMapping.man \
109
 
        XGetDeviceFocus.man \
110
 
        XChangeDeviceProperty.man \
111
 
        XDeleteDeviceProperty.man \
112
 
        $(XI2_refpages)
113
 
 
114
 
 
115
 
libman_pre = $(libman_txt:.txt=.man) $(libman_ref)
116
 
 
117
 
if HAVE_DOCTOOLS
118
 
nodist_libman_DATA = $(libman_pre:.man=.$(LIB_MAN_SUFFIX))
 
94
libman_shadows =                                \
 
95
        XGetDeviceDontPropagateList.man         \
 
96
        XChangeDeviceControl.man                \
 
97
        XChangeDeviceKeyMapping.man             \
 
98
        XSetDeviceModifierMapping.man           \
 
99
        XChangeFeedbackControl.man              \
 
100
        XUngrabDeviceButton.man                 \
 
101
        XUngrabDeviceKey.man                    \
 
102
        XUngrabDevice.man                       \
 
103
        XDeviceTimeCoord.man                    \
 
104
        XFreeDeviceList.man                     \
 
105
        XCloseDevice.man                        \
 
106
        XGetSelectedExtensionEvents.man         \
 
107
        XGetDeviceButtonMapping.man             \
 
108
        XGetDeviceFocus.man                     \
 
109
        XChangeDeviceProperty.man               \
 
110
        XDeleteDeviceProperty.man               \
 
111
        $(XI2_shadows)
 
112
 
 
113
# Name of man page files generated from DocBook XML files by xmlto
 
114
libman_PRE = $(libman_txt:.txt=.man) $(libman_shadows)
 
115
 
 
116
if INSTALL_MANPAGES
 
117
libman_DATA = $(libman_PRE:.man=.$(LIB_MAN_SUFFIX))
119
118
endif
120
119
 
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
124
123
 
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
140
139
XChangeDeviceProperty.man: XGetDeviceProperty.man
141
140
XDeleteDeviceProperty.man: XGetDeviceProperty.man
142
141
 
143
 
# XI2 prereqs
 
142
# Dependencies for X Input v2 shadow pages
144
143
XIUndefineCursor.man: XIDefineCursor.man
145
144
XIUngrabButton.man XIGrabKeycode.man XIUngrabKeycode.man: XIGrabButton.man
146
145
XIGetClientPointer.man: XISetClientPointer.man
152
151
XIGetSelectedEvents.man: XISelectEvents.man
153
152
XIFreeDeviceInfo.man: XIQueryDevice.man
154
153
 
155
 
# Strings to replace in man pages
156
 
XORGRELSTRING = $(PACKAGE_STRING)
157
 
  XORGMANNAME = X Version 11
158
 
 
159
 
MAN_SUBSTS = \
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'
166
157
 
167
158
SUFFIXES = .man .$(LIB_MAN_SUFFIX)
168
159
.man.$(LIB_MAN_SUFFIX):
169
 
        $(SED) $(MAN_SUBSTS) < $< > $@
 
160
        $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
170
161
 
 
162
# Generate man pages and shadow pages from .txt and then from DocBook XML
171
163
if HAVE_DOCTOOLS
172
164
SUFFIXES += .txt .xml
173
165
.txt.xml:
174
 
        $(ASCIIDOC) -b docbook -d manpage -o $@ $<
 
166
        $(AM_V_GEN)$(ASCIIDOC) -b docbook -d manpage -o $@ $<
175
167
.xml.man:
176
 
        $(XMLTO) man $<
177
 
        mv -f $(@:.man=.libmansuffix) $@
 
168
        $(AM_V_GEN)$(XMLTO) man $<
 
169
        $(AM_V_GEN)mv -f $(@:.man=.libmansuffix) $@
178
170
 
179
 
# need to force asciidoc/xmlto to run if necessary for side effect pages
180
 
$(libman_ref):
 
171
# Invoke asciidoc/xmlto main man page generation for shadow pages
 
172
$(libman_shadows):
181
173
        @if test ! -f $(@:.man=.libmansuffix); then \
182
 
          rm -f $<; \
183
 
          $(MAKE) $(AM_MAKEFLAGS) $< || exit 1; \
 
174
          $(AM_V_GEN)rm -f $<; \
 
175
          $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) $< || exit 1; \
184
176
        fi
185
 
        mv -f $(@:.man=.libmansuffix) $@
 
177
        $(AM_V_GEN)mv -f $(@:.man=.libmansuffix) $@
186
178
endif