Makefile.am revision 5dfecf96
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
22XEDITDIR = ${libdir}/X11/xedit
23xedit_lispdir = ${XEDITDIR}/lisp
24
25bin_PROGRAMS = xedit
26noinst_LIBRARIES = liblisp.a libre.a libmp.a
27
28#
29#    libmp.a
30#
31
32libmp_a_CFLAGS =
33libmp_a_SOURCES = \
34	lisp/mp/mp.c	\
35	lisp/mp/mp.h	\
36	lisp/mp/mpi.c	\
37	lisp/mp/mpr.c
38
39#
40#    liblisp.a
41#
42
43liblisp_a_CFLAGS = -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"$(xedit_lispdir)\" $(XEDIT_CFLAGS)
44liblisp_a_LIBADD = libmp.a
45liblisp_a_SOURCES = \
46	lisp/bytecode.c \
47	lisp/bytecode.h \
48	lisp/core.c \
49	lisp/core.h \
50	lisp/debugger.c \
51	lisp/debugger.h \
52	lisp/format.c \
53	lisp/format.h \
54	lisp/hash.c \
55	lisp/hash.h \
56	lisp/helper.c \
57	lisp/helper.h \
58	lisp/internal.h \
59	lisp/io.c \
60	lisp/io.h \
61	lisp/lisp.c \
62	lisp/lisp.h \
63	lisp/lsp.c \
64	lisp/math.c \
65	lisp/math.h \
66	lisp/package.c \
67	lisp/package.h \
68	lisp/pathname.c \
69	lisp/pathname.h \
70	lisp/private.h \
71	lisp/read.c \
72	lisp/read.h \
73	lisp/regex.c \
74	lisp/regex.h \
75	lisp/require.c \
76	lisp/require.h \
77	lisp/stream.c \
78	lisp/stream.h \
79	lisp/string.c \
80	lisp/string.h \
81	lisp/struct.c \
82	lisp/struct.h \
83	lisp/time.c \
84	lisp/time.h \
85	lisp/write.c \
86	lisp/write.h \
87	lisp/xedit.c \
88	lisp/xedit.h
89
90#
91#     libre.a
92#
93
94libre_a_CFLAGS = 
95libre_a_SOURCES = \
96	lisp/re/re.c \
97	lisp/re/rec.c \
98	lisp/re/re.h \
99	lisp/re/reo.c \
100	lisp/re/rep.h \
101	lisp/re/tests.c
102
103#
104#     xedit
105#   
106
107xedit_CFLAGS = $(XEDIT_CFLAGS) -I$(top_srcdir)/lisp/re -D_BSD_SOURCE -DXEDIT
108xedit_LDADD = libre.a liblisp.a libmp.a $(XEDIT_LIBS) -lm
109
110xedit_SOURCES =	\
111        commands.c \
112        hook.c \
113        ispell.c \
114        lisp.c \
115        options.c \
116        realpath.c \
117        strcasecmp.c \
118        util.c \
119        xedit.c \
120	xedit.h
121
122if XAW_USE_XPRINT
123xedit_CFLAGS += -DINCLUDE_XPRINT_SUPPORT
124
125xedit_SOURCES += \
126        print.c \
127        printdialog.c \
128        printdialog.h \
129        printdialogprivates.h \
130        print.h
131endif
132
133# App default files  (*.ad)
134
135APPDEFAULTFILES = \
136        Xedit-color \
137	Xedit
138
139if XAW_USE_XPRINT
140Xedit.ad: 
141	cp $(top_srcdir)/Xedit-xprint.ad Xedit.ad
142else
143Xedit.ad:
144	cp $(top_srcdir)/Xedit-noxprint.ad Xedit.ad
145endif
146
147SUFFIXES = .ad 
148
149.ad:
150	cp $< $@
151
152appdefaultdir = @appdefaultdir@
153appdefault_DATA = $(APPDEFAULTFILES)
154
155CLEANFILES = $(APPDEFAULTFILES) Xedit.ad
156
157# Note that xedit_lispdir is defined above
158dist_xedit_lisp_DATA = ${srcdir}/lisp/modules/lisp.lsp \
159	${srcdir}/lisp/modules/xedit.lsp \
160	${srcdir}/lisp/modules/syntax.lsp \
161	${srcdir}/lisp/modules/indent.lsp
162
163progmodesdir = $(xedit_lispdir)/progmodes
164dist_progmodes_DATA = ${srcdir}/lisp/modules/progmodes/c.lsp \
165	${srcdir}/lisp/modules/progmodes/html.lsp \
166	${srcdir}/lisp/modules/progmodes/imake.lsp \
167	${srcdir}/lisp/modules/progmodes/lisp.lsp \
168	${srcdir}/lisp/modules/progmodes/make.lsp \
169	${srcdir}/lisp/modules/progmodes/man.lsp \
170	${srcdir}/lisp/modules/progmodes/patch.lsp \
171	${srcdir}/lisp/modules/progmodes/rpm.lsp \
172	${srcdir}/lisp/modules/progmodes/sgml.lsp \
173	${srcdir}/lisp/modules/progmodes/sh.lsp \
174	${srcdir}/lisp/modules/progmodes/xconf.lsp \
175	${srcdir}/lisp/modules/progmodes/xlog.lsp \
176	${srcdir}/lisp/modules/progmodes/xrdb.lsp
177
178appman_PRE = xedit.man
179
180EXTRA_DIST = \
181	Xedit-color.ad \
182	Xedit-xprint.ad \
183	Xedit-noxprint.ad \
184	Xedit-sample \
185	lisp/README \
186	lisp/TODO \
187	lisp/compile.c \
188	lisp/env.c \
189	lisp/mathimp.c \
190	lisp/modules/psql.c \
191	lisp/modules/x11.c \
192	lisp/modules/xaw.c \
193	lisp/modules/xt.c \
194	lisp/re/README \
195	lisp/re/tests.txt \
196	lisp/test/hello.lsp \
197	lisp/test/list.lsp \
198	lisp/test/math.lsp \
199	lisp/test/psql-1.lsp \
200	lisp/test/psql-2.lsp \
201	lisp/test/psql-3.lsp \
202	lisp/test/regex.lsp \
203	lisp/test/stream.lsp \
204	lisp/test/widgets.lsp
205
206appmandir = $(APP_MAN_DIR)
207
208appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
209
210EXTRA_DIST += $(appman_PRE)
211CLEANFILES += $(appman_DATA)
212
213SED = sed
214
215# Strings to replace in man pages
216XORGRELSTRING = @PACKAGE_STRING@
217  XORGMANNAME = X Version 11
218
219MAN_SUBSTS = \
220	-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
221	-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
222	-e 's|__xservername__|Xorg|g' \
223	-e 's|__xconfigfile__|xorg.conf|g' \
224	-e 's|__projectroot__|$(prefix)|g' \
225	-e 's|__apploaddir__|$(appdefaultdir)|' \
226	-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
227	-e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
228	-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
229	-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
230	-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
231
232SUFFIXES += .$(APP_MAN_SUFFIX) .man
233
234.man.$(APP_MAN_SUFFIX):
235	sed $(MAN_SUBSTS) < $< > $@
236