1# 
2#  Copyright 2005  Red Hat, Inc.
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, and that the name of Red Hat not be used in
9#  advertising or publicity pertaining to distribution of the software without
10#  specific, written prior permission.  Red Hat makes no
11#  representations about the suitability of this software for any purpose.  It
12#  is provided "as is" without express or implied warranty.
13# 
14#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20#  PERFORMANCE OF THIS SOFTWARE.
21
22
23bin_PROGRAMS = \
24	xtrapchar \
25	xtrapproto \
26	xtrapin \
27	xtrapout \
28	xtrapstats \
29	xtrapreset \
30	xtrapinfo
31
32AM_CFLAGS = $(CWARNFLAGS) $(XTRAP_APP_CFLAGS)
33
34# 
35# xtrapchar
36#
37xtrapchar_LDADD = $(XTRAP_APP_LIBS)
38
39xtrapchar_SOURCES = \
40        xtrapchar.c \
41	chparse.c \
42	chparse.h \
43	XEKeybCtrl.c \
44	XEKeybCtrl.h 
45
46#
47# xtrapin
48# 
49xtrapin_CFLAGS = -D_DEFAULT_SOURCE $(AM_CFLAGS)
50xtrapin_LDADD = $(XTRAP_APP_LIBS)
51
52xtrapin_SOURCES = \
53	xtrapin.c \
54	XEKeybCtrl.c \
55	XEKeybCtrl.h 
56
57#
58# xtrapout
59#
60xtrapout_CFLAGS = -D_DEFAULT_SOURCE $(AM_CFLAGS)
61xtrapout_LDADD = $(XTRAP_APP_LIBS)
62
63xtrapout_SOURCES = \
64	xtrapout.c \
65	XEKeybCtrl.c \
66	XEKeybCtrl.h 
67
68#
69# xtrapproto
70#
71xtrapproto_LDADD = $(XTRAP_APP_LIBS)
72
73xtrapproto_SOURCES = \
74	xtrapproto.c
75
76#
77# xtrapreset
78#
79xtrapreset_LDADD = $(XTRAP_APP_LIBS)
80
81xtrapreset_SOURCES = \
82	xtrapreset.c
83
84#
85# xtrapstats
86#
87xtrapstats_LDADD = $(XTRAP_APP_LIBS)
88
89xtrapstats_SOURCES = \
90	xtrapstats.c
91
92#
93# xtrapinfo
94#
95xtrapinfo_LDADD = $(XTRAP_APP_LIBS)
96
97xtrapinfo_SOURCES = \
98	xtrapinfo.c \
99        XEKeybCtrl.c \
100	XEKeybCtrl.h 
101
102appman_PRE = \
103        xtrap.man
104
105
106APP_MAN_DIR_SUFFIX = $(APP_MAN_DIR:@mandir@/man%=%)
107
108appmandir = $(APP_MAN_DIR)
109
110appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) \
111	      $(man_shadows:=.@APP_MAN_SUFFIX@)
112
113EXTRA_DIST = $(appman_PRE)
114CLEANFILES = $(appman_DATA) $(BUILT_SOURCES)
115
116SED = sed
117
118# Strings to replace in man pages
119XORGRELSTRING = @PACKAGE_STRING@
120  XORGMANNAME = X Version 11
121
122MAN_SUBSTS = \
123	-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
124	-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
125	-e 's|__xservername__|Xorg|g' \
126	-e 's|__xconfigfile__|xorg.conf|g' \
127	-e 's|__projectroot__|$(prefix)|g' \
128	-e 's|__apploaddir__|$(appdefaultdir)|' \
129	-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
130	-e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
131	-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
132	-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
133	-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
134
135SUFFIXES = .$(APP_MAN_SUFFIX) .man
136
137.man.$(APP_MAN_SUFFIX):
138	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
139
140man_shadows =    \
141    xtrapreset   \
142    xtrapinfo    \
143    xtrapstats   \
144    xtrapout     \
145    xtrapin      \
146    xtrapchar    \
147    xtrapproto
148
149shadowmen = $(man_shadows:=.@APP_MAN_SUFFIX@)
150
151$(shadowmen):
152	 $(AM_V_GEN)echo .so man$(APP_MAN_DIR_SUFFIX)/xtrap.$(APP_MAN_SUFFIX) > $@
153
154EXTRA_DIST += ChangeLog
155MAINTAINERCLEANFILES = ChangeLog
156
157.PHONY: ChangeLog
158
159ChangeLog:
160	$(CHANGELOG_CMD)
161
162dist-hook: ChangeLog
163