Makefile.am revision c27c18e8
1# 2# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 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. 25# 26 27libmandir = $(LIB_MAN_DIR) 28 29LIB_MAN_DIR_SUFFIX = $(LIB_MAN_DIR:@mandir@/man%=%) 30 31XI2_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 \ 45 XIChangeProperty.txt 46 47libman_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) 74 75libman_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 79XI2_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 \ 93 XIFreeDeviceInfo.man 94 95libman_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 115libman_pre = $(libman_txt:.txt=.man) $(libman_ref) 116 117if HAVE_DOCTOOLS 118nodist_libman_DATA = $(libman_pre:.man=.$(LIB_MAN_SUFFIX)) 119endif 120 121EXTRA_DIST = $(libman_txt) $(libman_pre) 122CLEANFILES = $(nodist_libman_DATA) *.libmansuffix 123MAINTAINERCLEANFILES = $(libman_pre) *.xml 124 125# prerequisites for the side effect pages 126XGetDeviceDontPropagateList.man: XChangeDeviceDontPropagateList.man 127XChangeDeviceControl.man: XGetDeviceControl.man 128XChangeDeviceKeyMapping.man: XGetDeviceKeyMapping.man 129XSetDeviceModifierMapping.man: XGetDeviceModifierMapping.man 130XDeviceTimeCoord.man: XGetDeviceMotionEvents.man 131XChangeFeedbackControl.man: XGetFeedbackControl.man 132XUngrabDeviceButton.man: XGrabDeviceButton.man 133XUngrabDeviceKey.man: XGrabDeviceKey.man 134XUngrabDevice.man: XGrabDevice.man 135XFreeDeviceList.man: XListInputDevices.man 136XCloseDevice.man: XOpenDevice.man 137XGetSelectedExtensionEvents.man: XSelectExtensionEvent.man 138XGetDeviceButtonMapping.man: XSetDeviceButtonMapping.man 139XGetDeviceFocus.man: XSetDeviceFocus.man 140XChangeDeviceProperty.man: XGetDeviceProperty.man 141XDeleteDeviceProperty.man: XGetDeviceProperty.man 142 143# XI2 prereqs 144XIUndefineCursor.man: XIDefineCursor.man 145XIUngrabButton.man XIGrabKeycode.man XIUngrabKeycode.man: XIGrabButton.man 146XIGetClientPointer.man: XISetClientPointer.man 147XIGetFocus.man: XISetFocus.man 148XIUngrabDevice.man: XIGrabDevice.man 149XIGetProperty.man: XIChangeProperty.man 150XIDeleteProperty.man: XIChangeProperty.man 151XIUngrabEnter.man XIGrabFocusIn.man XIUngrabFocusIn.man: XIGrabEnter.man 152XIGetSelectedEvents.man: XISelectEvents.man 153XIFreeDeviceInfo.man: XIQueryDevice.man 154 155# Strings to replace in man pages 156XORGRELSTRING = $(PACKAGE_STRING) 157 XORGMANNAME = X Version 11 158 159MAN_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' 166 167SUFFIXES = .man .$(LIB_MAN_SUFFIX) 168.man.$(LIB_MAN_SUFFIX): 169 $(SED) $(MAN_SUBSTS) < $< > $@ 170 171if HAVE_DOCTOOLS 172SUFFIXES += .txt .xml 173.txt.xml: 174 $(ASCIIDOC) -b docbook -d manpage -o $@ $< 175.xml.man: 176 $(XMLTO) man $< 177 mv -f $(@:.man=.libmansuffix) $@ 178 179# need to force asciidoc/xmlto to run if necessary for side effect pages 180$(libman_ref): 181 @if test ! -f $(@:.man=.libmansuffix); then \ 182 rm -f $<; \ 183 $(MAKE) $(AM_MAKEFLAGS) $< || exit 1; \ 184 fi 185 mv -f $(@:.man=.libmansuffix) $@ 186endif 187