Makefile.am revision a253d6ae
1a253d6aeSmrg# 2a253d6aeSmrg# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 3a253d6aeSmrg# 4a253d6aeSmrg# Permission to use, copy, modify, distribute, and sell this software and its 5a253d6aeSmrg# documentation for any purpose is hereby granted without fee, provided that 6a253d6aeSmrg# the above copyright notice appear in all copies and that both that 7a253d6aeSmrg# copyright notice and this permission notice appear in supporting 8a253d6aeSmrg# documentation. 9a253d6aeSmrg# 10a253d6aeSmrg# The above copyright notice and this permission notice shall be included 11a253d6aeSmrg# in all copies or substantial portions of the Software. 12a253d6aeSmrg# 13a253d6aeSmrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 14a253d6aeSmrg# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 15a253d6aeSmrg# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16a253d6aeSmrg# IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 17a253d6aeSmrg# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 18a253d6aeSmrg# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 19a253d6aeSmrg# OTHER DEALINGS IN THE SOFTWARE. 20a253d6aeSmrg# 21a253d6aeSmrg# Except as contained in this notice, the name of the copyright holders shall 22a253d6aeSmrg# not be used in advertising or otherwise to promote the sale, use or 23a253d6aeSmrg# other dealings in this Software without prior written authorization 24a253d6aeSmrg# from the copyright holders. 25a253d6aeSmrg# 26a253d6aeSmrg 27a253d6aeSmrglibmandir = $(LIB_MAN_DIR) 28a253d6aeSmrg 29a253d6aeSmrgLIB_MAN_DIR_SUFFIX = $(LIB_MAN_DIR:@mandir@/man%=%) 30a253d6aeSmrg 31a253d6aeSmrglibman_xml = $(srcdir)/XTest.xml 32a253d6aeSmrg 33a253d6aeSmrgXTest_manpages = \ 34a253d6aeSmrg XTestQueryExtension \ 35a253d6aeSmrg XTestCompareCursorWithWindow \ 36a253d6aeSmrg XTestCompareCurrentCursorWithWindow \ 37a253d6aeSmrg XTestFakeKeyEvent \ 38a253d6aeSmrg XTestFakeButtonEvent \ 39a253d6aeSmrg XTestFakeMotionEvent \ 40a253d6aeSmrg XTestFakeRelativeMotionEvent \ 41a253d6aeSmrg XTestGrabControl \ 42a253d6aeSmrg XTestSetGContextOfGC \ 43a253d6aeSmrg XTestSetVisualIDOfVisual \ 44a253d6aeSmrg XTestDiscard 45a253d6aeSmrg 46a253d6aeSmrglibman_PRE = $(XTest_manpages:%=%.man) 47a253d6aeSmrg 48a253d6aeSmrgEXTRA_DIST = $(libman_PRE) $(libman_xml) 49a253d6aeSmrg 50a253d6aeSmrgCLEANFILES = $(libman_DATA) $(BUILT_SOURCES) 51a253d6aeSmrg 52a253d6aeSmrgMAINTAINERCLEANFILES = $(libman_PRE) 53a253d6aeSmrg 54a253d6aeSmrglibman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@) 55a253d6aeSmrg 56a253d6aeSmrgSED = sed 57a253d6aeSmrg 58a253d6aeSmrg# Strings to replace in man pages 59a253d6aeSmrgXORGRELSTRING = @PACKAGE_STRING@ 60a253d6aeSmrg XORGMANNAME = X Version 11 61a253d6aeSmrg 62a253d6aeSmrgMAN_SUBSTS = \ 63a253d6aeSmrg -e 's/__xorgversion__/"$(XORGRELSTRING)" "$(XORGMANNAME)"/' \ 64a253d6aeSmrg -e 's/__xservername__/Xorg/g' \ 65a253d6aeSmrg -e 's/__xconfigfile__/xorg.conf/g' \ 66a253d6aeSmrg -e 's/__appmansuffix__/$(APP_MAN_SUFFIX)/g' \ 67a253d6aeSmrg -e 's/__libmansuffix__/$(LIB_MAN_SUFFIX)/g' \ 68a253d6aeSmrg -e 's/__filemansuffix__/$(FILE_MAN_SUFFIX)/g' 69a253d6aeSmrg 70a253d6aeSmrgSUFFIXES = .$(LIB_MAN_SUFFIX) .man 71a253d6aeSmrg 72a253d6aeSmrg.man.$(LIB_MAN_SUFFIX): 73a253d6aeSmrg sed $(MAN_SUBSTS) < $< > $@ 74a253d6aeSmrg 75a253d6aeSmrg# Generate nroff sources from DocBook/xml 76a253d6aeSmrg 77a253d6aeSmrgdist-hook: $(libman_PRE) 78a253d6aeSmrg 79a253d6aeSmrgif HAVE_XMLTO 80a253d6aeSmrg$(libman_PRE): $(libman_xml) 81a253d6aeSmrg $(XMLTO) man $(libman_xml) 82a253d6aeSmrg for m in $(XTest_manpages); do \ 83a253d6aeSmrg mv -f $$m.__libmansuffix__ $$m.man ; \ 84a253d6aeSmrg done 85a253d6aeSmrg 86a253d6aeSmrgendif HAVE_XMLTO 87