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