Makefile.am revision 21e67964
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
31libman_PRE = \
32	XAllowDeviceEvents.man \
33	XChangeDeviceDontPropagateList.man \
34	XChangeKeyboardDevice.man \
35	XChangePointerDevice.man \
36	XDeviceBell.man \
37	XGetDeviceControl.man \
38	XGetDeviceKeyMapping.man \
39	XGetDeviceModifierMapping.man \
40	XGetDeviceMotionEvents.man \
41	XGetExtensionVersion.man \
42	XGetFeedbackControl.man \
43	XGrabDevice.man \
44	XGrabDeviceButton.man \
45	XGrabDeviceKey.man \
46	XListInputDevices.man \
47	XOpenDevice.man \
48	XQueryDeviceState.man \
49	XSelectExtensionEvent.man \
50	XSendExtensionEvent.man \
51	XSetDeviceButtonMapping.man \
52	XSetDeviceFocus.man \
53	XSetDeviceMode.man \
54	XSetDeviceValuators.man \
55	XListDeviceProperties.man \
56	XGetDeviceProperty.man
57
58BUILT_SOURCES = shadows.DONE
59
60EXTRA_DIST = $(libman_PRE)
61
62CLEANFILES = $(libman_DATA) $(BUILT_SOURCES)
63
64libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@) \
65	      $(all_shadows:=.@LIB_MAN_SUFFIX@)
66
67SED = sed
68
69# Strings to replace in man pages
70XORGRELSTRING = @PACKAGE_STRING@
71  XORGMANNAME = X Version 11
72
73SUFFIXES = .$(LIB_MAN_SUFFIX) .man
74
75.man.$(LIB_MAN_SUFFIX):
76	sed 's/__xorgversion__/"$(XORGRELSTRING)" "$(XORGMANNAME)"/;  s/__LIB_MAN_SUFFIX__/$(LIB_MAN_SUFFIX)/' < $< > $@
77
78# Generate man page shadow files (Replaces InstallManPageAliases from Imake)
79
80all_shadows =                                \
81    $(XGetDeviceControl_shadows)             \
82    $(XGetFeedbackControl_shadows)           \
83    $(XGetDeviceKeyMapping_shadows)          \
84    $(XGetDeviceModifierMapping_shadows)     \
85    $(XChangeDeviceDontPropagateList_shadows) \
86    $(XGetDeviceMotionEvents_shadows)        \
87    $(XGrabDeviceButton_shadows)             \
88    $(XGrabDeviceKey_shadows)                \
89    $(XGrabDevice_shadows)                   \
90    $(XListInputDevices_shadows)             \
91    $(XOpenDevice_shadows)                   \
92    $(XSetDeviceButtonMapping_shadows)       \
93    $(XSetDeviceFocus_shadows)               \
94    $(XSelectExtensionEvent_shadows)         \
95    $(XGetDeviceProperty_shadows)
96
97
98XGetDeviceControl_shadows =                 \
99    XChangeDeviceControl
100
101XGetFeedbackControl_shadows =               \
102    XChangeFeedbackControl
103
104XGetDeviceKeyMapping_shadows =              \
105    XChangeDeviceKeyMapping
106
107XGetDeviceModifierMapping_shadows =         \
108    XSetDeviceModifierMapping
109
110XChangeDeviceDontPropagateList_shadows =    \
111    XGetDeviceDontPropagateList
112
113XGetDeviceMotionEvents_shadows =            \
114    XDeviceTimeCoord
115
116XGrabDeviceButton_shadows =                 \
117    XUngrabDeviceButton
118
119XGrabDeviceKey_shadows =                    \
120    XUngrabDeviceKey
121
122XGrabDevice_shadows =                       \
123    XUngrabDevice
124
125XListInputDevices_shadows =                 \
126    XFreeDeviceList
127
128XOpenDevice_shadows =                       \
129    XCloseDevice
130
131XSetDeviceButtonMapping_shadows =           \
132    XGetDeviceButtonMapping
133
134XSetDeviceFocus_shadows =                   \
135    XGetDeviceFocus
136
137XSelectExtensionEvent_shadows =             \
138    XGetSelectedExtensionEvents
139
140XGetDeviceProperty_shadows =                \
141    XDeleteDeviceProperty \
142    XChangeDeviceProperty
143
144shadows.DONE:
145	-rm -f $(all_shadows:=.@LIB_MAN_SUFFIX@)
146	(for i in $(XGetDeviceControl_shadows:=.@LIB_MAN_SUFFIX@) ; do \
147	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XGetDeviceControl.$(LIB_MAN_SUFFIX) > $$i; \
148	 done)
149	(for i in $(XGetFeedbackControl_shadows:=.@LIB_MAN_SUFFIX@) ; do \
150	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XGetFeedbackControl.$(LIB_MAN_SUFFIX) > $$i; \
151	 done)
152	(for i in $(XGetDeviceKeyMapping_shadows:=.@LIB_MAN_SUFFIX@) ; do \
153	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XGetDeviceKeyMapping.$(LIB_MAN_SUFFIX) > $$i; \
154	 done)
155	(for i in $(XGetDeviceModifierMapping_shadows:=.@LIB_MAN_SUFFIX@) ; do \
156	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XGetDeviceModifierMapping.$(LIB_MAN_SUFFIX) > $$i; \
157	 done)
158	(for i in $(XChangeDeviceDontPropagateList_shadows:=.@LIB_MAN_SUFFIX@) ; do \
159	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XChangeDeviceDontPropagateList.$(LIB_MAN_SUFFIX) > $$i; \
160	 done)
161	(for i in $(XGetDeviceMotionEvents_shadows:=.@LIB_MAN_SUFFIX@) ; do \
162	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XGetDeviceMotionEvents.$(LIB_MAN_SUFFIX) > $$i; \
163	 done)
164	(for i in $(XGrabDeviceButton_shadows:=.@LIB_MAN_SUFFIX@) ; do \
165	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XGrabDeviceButton.$(LIB_MAN_SUFFIX) > $$i; \
166	 done)
167	(for i in $(XGrabDeviceKey_shadows:=.@LIB_MAN_SUFFIX@) ; do \
168	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XGrabDeviceKey.$(LIB_MAN_SUFFIX) > $$i; \
169	 done)
170	(for i in $(XGrabDevice_shadows:=.@LIB_MAN_SUFFIX@) ; do \
171	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XGrabDevice.$(LIB_MAN_SUFFIX) > $$i; \
172	 done)
173	(for i in $(XListInputDevices_shadows:=.@LIB_MAN_SUFFIX@) ; do \
174	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XListInputDevices.$(LIB_MAN_SUFFIX) > $$i; \
175	 done)
176	(for i in $(XOpenDevice_shadows:=.@LIB_MAN_SUFFIX@) ; do \
177	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XOpenDevice.$(LIB_MAN_SUFFIX) > $$i; \
178	 done)
179	(for i in $(XSetDeviceButtonMapping_shadows:=.@LIB_MAN_SUFFIX@) ; do \
180	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XSetDeviceButtonMapping.$(LIB_MAN_SUFFIX) > $$i; \
181	 done)
182	(for i in $(XSetDeviceFocus_shadows:=.@LIB_MAN_SUFFIX@) ; do \
183	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XSetDeviceFocus.$(LIB_MAN_SUFFIX) > $$i; \
184	 done)
185	(for i in $(XSelectExtensionEvent_shadows:=.@LIB_MAN_SUFFIX@) ; do \
186	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XSelectExtensionEvent.$(LIB_MAN_SUFFIX) > $$i; \
187	 done)
188	(for i in $(XGetDeviceProperty_shadows:=.@LIB_MAN_SUFFIX@) ; do \
189	 echo .so man$(LIB_MAN_DIR_SUFFIX)/XGetDeviceProperty.$(LIB_MAN_SUFFIX) > $$i; \
190	 done)
191