| 1 |
# |
| 2 |
# Copyright 2005 Sun Microsystems, Inc. All rights reserved. |
| 3 |
# |
| 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. |
| 22 |
# |
| 23 |
|
| 24 |
libmandir = $(LIB_MAN_DIR) |
| 25 |
|
| 26 |
# Source files for X Input v2 man pages |
| 27 |
XI2_txt = \ |
| 28 |
XIAllowEvents.txt \ |
| 29 |
XIBarrierReleasePointer.txt \ |
| 30 |
XIChangeHierarchy.txt \ |
| 31 |
XIDefineCursor.txt \ |
| 32 |
XIGrabButton.txt \ |
| 33 |
XIGrabDevice.txt \ |
| 34 |
XIGrabEnter.txt \ |
| 35 |
XIQueryDevice.txt \ |
| 36 |
XIQueryPointer.txt \ |
| 37 |
XIQueryVersion.txt \ |
| 38 |
XISelectEvents.txt \ |
| 39 |
XISetClientPointer.txt \ |
| 40 |
XISetFocus.txt \ |
| 41 |
XIWarpPointer.txt \ |
| 42 |
XIListProperties.txt \ |
| 43 |
XIChangeProperty.txt |
| 44 |
|
| 45 |
# Source files for X Input v1 man pages |
| 46 |
libman_txt = \ |
| 47 |
XAllowDeviceEvents.txt \ |
| 48 |
XChangeDeviceDontPropagateList.txt \ |
| 49 |
XChangeKeyboardDevice.txt \ |
| 50 |
XChangePointerDevice.txt \ |
| 51 |
XDeviceBell.txt \ |
| 52 |
XGetDeviceControl.txt \ |
| 53 |
XGetDeviceKeyMapping.txt \ |
| 54 |
XGetDeviceModifierMapping.txt \ |
| 55 |
XGetDeviceMotionEvents.txt \ |
| 56 |
XGetDeviceProperty.txt \ |
| 57 |
XGetExtensionVersion.txt \ |
| 58 |
XGetFeedbackControl.txt \ |
| 59 |
XGrabDeviceButton.txt \ |
| 60 |
XGrabDeviceKey.txt \ |
| 61 |
XGrabDevice.txt \ |
| 62 |
XListDeviceProperties.txt \ |
| 63 |
XListInputDevices.txt \ |
| 64 |
XOpenDevice.txt \ |
| 65 |
XQueryDeviceState.txt \ |
| 66 |
XSelectExtensionEvent.txt \ |
| 67 |
XSendExtensionEvent.txt \ |
| 68 |
XSetDeviceButtonMapping.txt \ |
| 69 |
XSetDeviceFocus.txt \ |
| 70 |
XSetDeviceMode.txt \ |
| 71 |
XSetDeviceValuators.txt \ |
| 72 |
$(XI2_txt) |
| 73 |
|
| 74 |
# Name of DocBook XML files generated from .txt files by asciidoc |
| 75 |
libman_xml = $(libman_txt:.txt=.xml) |
| 76 |
|
| 77 |
# Shadow man pages are simply links to a main man page. |
| 78 |
# They are created by the xmlto command when generating man pages from DocBook |
| 79 |
# The shadow man page contains a gtroff .so request to include the main man page |
| 80 |
XI2_shadows = \ |
| 81 |
XIBarrierReleasePointers.man \ |
| 82 |
XIUndefineCursor.man \ |
| 83 |
XIUngrabButton.man \ |
| 84 |
XIGrabKeycode.man \ |
| 85 |
XIUngrabKeycode.man \ |
| 86 |
XIUngrabDevice.man \ |
| 87 |
XIUngrabEnter.man \ |
| 88 |
XIGrabFocusIn.man \ |
| 89 |
XIUngrabFocusIn.man \ |
| 90 |
XIGetClientPointer.man \ |
| 91 |
XIGetFocus.man \ |
| 92 |
XIGetSelectedEvents.man \ |
| 93 |
XIDeleteProperty.man \ |
| 94 |
XIGetProperty.man \ |
| 95 |
XIFreeDeviceInfo.man \ |
| 96 |
XIGrabTouchBegin.man \ |
| 97 |
XIUngrabTouchBegin.man |
| 98 |
|
| 99 |
libman_shadows = \ |
| 100 |
XGetDeviceDontPropagateList.man \ |
| 101 |
XChangeDeviceControl.man \ |
| 102 |
XChangeDeviceKeyMapping.man \ |
| 103 |
XSetDeviceModifierMapping.man \ |
| 104 |
XChangeFeedbackControl.man \ |
| 105 |
XUngrabDeviceButton.man \ |
| 106 |
XUngrabDeviceKey.man \ |
| 107 |
XUngrabDevice.man \ |
| 108 |
XDeviceTimeCoord.man \ |
| 109 |
XFreeDeviceList.man \ |
| 110 |
XCloseDevice.man \ |
| 111 |
XGetSelectedExtensionEvents.man \ |
| 112 |
XGetDeviceButtonMapping.man \ |
| 113 |
XGetDeviceFocus.man \ |
| 114 |
XChangeDeviceProperty.man \ |
| 115 |
XDeleteDeviceProperty.man \ |
| 116 |
$(XI2_shadows) |
| 117 |
|
| 118 |
# Name of man page files generated from DocBook XML files by xmlto |
| 119 |
libman_PRE = $(libman_txt:.txt=.man) $(libman_shadows) |
| 120 |
|
| 121 |
if INSTALL_MANPAGES |
| 122 |
libman_DATA = $(libman_PRE:.man=.$(LIB_MAN_SUFFIX)) |
| 123 |
endif |
| 124 |
|
| 125 |
EXTRA_DIST = $(libman_txt) $(libman_PRE) |
| 126 |
CLEANFILES = $(libman_DATA) *.libmansuffix |
| 127 |
MAINTAINERCLEANFILES = $(libman_PRE) *.xml |
| 128 |
|
| 129 |
# Dependencies for X Input v1 shadow pages |
| 130 |
XGetDeviceDontPropagateList.man: XChangeDeviceDontPropagateList.man |
| 131 |
XChangeDeviceControl.man: XGetDeviceControl.man |
| 132 |
XChangeDeviceKeyMapping.man: XGetDeviceKeyMapping.man |
| 133 |
XSetDeviceModifierMapping.man: XGetDeviceModifierMapping.man |
| 134 |
XDeviceTimeCoord.man: XGetDeviceMotionEvents.man |
| 135 |
XChangeFeedbackControl.man: XGetFeedbackControl.man |
| 136 |
XUngrabDeviceButton.man: XGrabDeviceButton.man |
| 137 |
XUngrabDeviceKey.man: XGrabDeviceKey.man |
| 138 |
XUngrabDevice.man: XGrabDevice.man |
| 139 |
XFreeDeviceList.man: XListInputDevices.man |
| 140 |
XCloseDevice.man: XOpenDevice.man |
| 141 |
XGetSelectedExtensionEvents.man: XSelectExtensionEvent.man |
| 142 |
XGetDeviceButtonMapping.man: XSetDeviceButtonMapping.man |
| 143 |
XGetDeviceFocus.man: XSetDeviceFocus.man |
| 144 |
XChangeDeviceProperty.man: XGetDeviceProperty.man |
| 145 |
XDeleteDeviceProperty.man: XGetDeviceProperty.man |
| 146 |
|
| 147 |
# Dependencies for X Input v2 shadow pages |
| 148 |
XIUndefineCursor.man: XIDefineCursor.man |
| 149 |
XIUngrabButton.man XIGrabKeycode.man XIUngrabKeycode.man XIGrabTouchBegin.man XIUngrabTouchBegin.man: XIGrabButton.man |
| 150 |
XIGetClientPointer.man: XISetClientPointer.man |
| 151 |
XIGetFocus.man: XISetFocus.man |
| 152 |
XIUngrabDevice.man: XIGrabDevice.man |
| 153 |
XIGetProperty.man: XIChangeProperty.man |
| 154 |
XIDeleteProperty.man: XIChangeProperty.man |
| 155 |
XIUngrabEnter.man XIGrabFocusIn.man XIUngrabFocusIn.man: XIGrabEnter.man |
| 156 |
XIGetSelectedEvents.man: XISelectEvents.man |
| 157 |
XIFreeDeviceInfo.man: XIQueryDevice.man |
| 158 |
XIBarrierReleasePointers.man: XIBarrierReleasePointer.man |
| 159 |
|
| 160 |
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure |
| 161 |
# Unable to use __libmansuffix__ as underscores are lost in txt --> xml conversion |
| 162 |
MAN_SUBSTS += -e 's/libmansuffix/$(LIB_MAN_SUFFIX)/g' |
| 163 |
|
| 164 |
# asciidoc is generating [FIXME...] values in the .TH line we should fix. |
| 165 |
MAN_SUBSTS += -e 's/\[FIXME: source\]/$(XORG_MAN_PAGE)/' |
| 166 |
MAN_SUBSTS += -e 's/\[FIXME: manual\]/XINPUT FUNCTIONS/' |
| 167 |
|
| 168 |
# asciidoc generates shadow page references without the man section directory |
| 169 |
MAN_SUBSTS += -e 's/^\.so X/.so man$(LIB_MAN_SUFFIX)\/X/' |
| 170 |
|
| 171 |
SUFFIXES = .man .$(LIB_MAN_SUFFIX) |
| 172 |
.man.$(LIB_MAN_SUFFIX): |
| 173 |
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ |
| 174 |
|
| 175 |
# Generate man pages and shadow pages from .txt and then from DocBook XML |
| 176 |
if HAVE_DOCTOOLS |
| 177 |
SUFFIXES += .txt .xml |
| 178 |
.txt.xml: |
| 179 |
$(AM_V_GEN)$(ASCIIDOC) -b docbook -d manpage -o $@ $< |
| 180 |
.xml.man: |
| 181 |
$(AM_V_GEN)$(XMLTO) man $< |
| 182 |
$(AM_V_at)mv -f $(@:.man=.libmansuffix) $@ |
| 183 |
|
| 184 |
# Invoke asciidoc/xmlto main man page generation for shadow pages |
| 185 |
$(libman_shadows): |
| 186 |
@if test ! -f $(@:.man=.libmansuffix); then \ |
| 187 |
rm -f $<; \ |
| 188 |
$(MAKE) $(AM_MAKEFLAGS) $< || exit 1; \ |
| 189 |
fi |
| 190 |
$(AM_V_at)mv -f $(@:.man=.libmansuffix) $@ |
| 191 |
endif |