Makefile.am revision 37eb1ca1
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 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 \ 41 XIChangeProperty.txt 42 43# Source files for X Input v1 man pages 44libman_txt = \ 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) 71 72# Name of DocBook XML files generated from .txt files by asciidoc 73libman_xml = $(libman_txt:.txt=.xml) 74 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 78XI2_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 \ 92 XIFreeDeviceInfo.man 93 94libman_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 114libman_PRE = $(libman_txt:.txt=.man) $(libman_shadows) 115 116if INSTALL_MANPAGES 117libman_DATA = $(libman_PRE:.man=.$(LIB_MAN_SUFFIX)) 118endif 119 120EXTRA_DIST = $(libman_txt) $(libman_PRE) 121CLEANFILES = $(libman_DATA) *.libmansuffix 122MAINTAINERCLEANFILES = $(libman_PRE) *.xml 123 124# Dependencies for X Input v1 shadow pages 125XGetDeviceDontPropagateList.man: XChangeDeviceDontPropagateList.man 126XChangeDeviceControl.man: XGetDeviceControl.man 127XChangeDeviceKeyMapping.man: XGetDeviceKeyMapping.man 128XSetDeviceModifierMapping.man: XGetDeviceModifierMapping.man 129XDeviceTimeCoord.man: XGetDeviceMotionEvents.man 130XChangeFeedbackControl.man: XGetFeedbackControl.man 131XUngrabDeviceButton.man: XGrabDeviceButton.man 132XUngrabDeviceKey.man: XGrabDeviceKey.man 133XUngrabDevice.man: XGrabDevice.man 134XFreeDeviceList.man: XListInputDevices.man 135XCloseDevice.man: XOpenDevice.man 136XGetSelectedExtensionEvents.man: XSelectExtensionEvent.man 137XGetDeviceButtonMapping.man: XSetDeviceButtonMapping.man 138XGetDeviceFocus.man: XSetDeviceFocus.man 139XChangeDeviceProperty.man: XGetDeviceProperty.man 140XDeleteDeviceProperty.man: XGetDeviceProperty.man 141 142# Dependencies for X Input v2 shadow pages 143XIUndefineCursor.man: XIDefineCursor.man 144XIUngrabButton.man XIGrabKeycode.man XIUngrabKeycode.man: XIGrabButton.man 145XIGetClientPointer.man: XISetClientPointer.man 146XIGetFocus.man: XISetFocus.man 147XIUngrabDevice.man: XIGrabDevice.man 148XIGetProperty.man: XIChangeProperty.man 149XIDeleteProperty.man: XIChangeProperty.man 150XIUngrabEnter.man XIGrabFocusIn.man XIUngrabFocusIn.man: XIGrabEnter.man 151XIGetSelectedEvents.man: XISelectEvents.man 152XIFreeDeviceInfo.man: XIQueryDevice.man 153 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 156MAN_SUBSTS += -e 's/libmansuffix/$(LIB_MAN_SUFFIX)/g' 157 158SUFFIXES = .man .$(LIB_MAN_SUFFIX) 159.man.$(LIB_MAN_SUFFIX): 160 $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ 161 162# Generate man pages and shadow pages from .txt and then from DocBook XML 163if HAVE_DOCTOOLS 164SUFFIXES += .txt .xml 165.txt.xml: 166 $(AM_V_GEN)$(ASCIIDOC) -b docbook -d manpage -o $@ $< 167.xml.man: 168 $(AM_V_GEN)$(XMLTO) man $< 169 $(AM_V_GEN)mv -f $(@:.man=.libmansuffix) $@ 170 171# Invoke asciidoc/xmlto main man page generation for shadow pages 172$(libman_shadows): 173 @if test ! -f $(@:.man=.libmansuffix); then \ 174 $(AM_V_GEN)rm -f $<; \ 175 $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) $< || exit 1; \ 176 fi 177 $(AM_V_GEN)mv -f $(@:.man=.libmansuffix) $@ 178endif 179