Purge SXEmacs of tooltalk cruft -- src, lisp
[sxemacs] / lisp / Makefile.am
1 ## SXEmacs Makefile.am
2
3 ## Copyright (C) 2007 Steve Youngs.
4
5 ## This file is part of SXEmacs.
6
7 ## SXEmacs is free software: you can redistribute it and/or modify it
8 ## under the terms of the GNU General Public License as published by the
9 ## Free Software Foundation, either version 3 of the License, or (at your
10 ## option) any later version.
11
12 ## SXEmacs is distributed in the hope that it will be
13 ## useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 ## General Public License for more details.
16
17 ## You should have received a copy of the GNU General Public License
18 ## along with this program.  If not, see <http://www.gnu.org/licenses/>. 
19
20 ## Process this file with automake to produce Makefile.in
21
22 # Help the Developers and yourself. Just use the C locale and settings
23 # for the compilation. They can still be overriden by make LANG=<whatever>
24 # but that is general a not very good idea
25 LANG=C
26 LC_ALL=C
27
28 builddir = @builddir@
29 srcdir = @srcdir@
30 top_builddir = @top_builddir@
31 top_srcdir = @top_srcdir@
32 abs_top_builddir = @abs_top_builddir@
33 abs_top_srcdir = @abs_top_srcdir@
34
35 sxesrcdir = $(top_srcdir)/src
36 bldsrcdir = $(top_builddir)/src
37 sxelispdir = $(abs_top_srcdir)/lisp
38 bldlispdir = $(abs_top_builddir)/lisp
39 bldffidir = $(bldlispdir)/ffi
40 bldmuledir = $(bldlispdir)/mule
41 bldtermdir = $(bldlispdir)/term
42
43 lispffidir = $(lispdir)/ffi
44 lispmuledir = $(lispdir)/mule
45 lisptermdir = $(lispdir)/term
46
47 statlispdir = ${datadir}/${inststaticdir}
48 sxepkgdir = $(statlispdir)/sxemacs-packages
49 xepkgdir = $(statlispdir)/xemacs-packages
50 mulepkgdir = $(statlispdir)/mule-packages
51 sitepkgdir = $(statlispdir)/site-packages
52
53 ETAGS = $(top_builddir)/lib-src/etags
54 TAGS_DEPENDENCIES = $(ETAGS)
55 ETAGS_ARGS =
56
57 sxepkg_DATA = 
58 xepkg_DATA = 
59 mulepkg_DATA = 
60 sitepkg_DATA = 
61
62 subdirs = ffi mule term
63
64 EXTRA_DIST = ffi/Makefile.in mule/Makefile.in
65 nocompile_bldchainels =                                                 \
66         build-autoloads.el compile-core.el loadup-el.el loadup.el       \
67         site-load.el update-elc.el update-elc-2.el very-early-lisp.el
68 compile_bldchainels =                                                   \
69         autoload.el dump-paths.el dumped-lisp.el find-paths.el          \
70         finder.el make-docfile.el setup-paths.el startup.el
71 bldchainels = $(nocompile_bldchainels) $(compile_bldchainels)
72 corelispels =                                                           \
73         abbrev.el about.el alist.el apropos.el auto-save.el             \
74         auto-show.el backquote.el blessmail.el buff-menu.el buffer.el   \
75         build-rpt.el byte-optimize.el bytecomp-runtime.el bytecomp.el   \
76         callers-of-rpt.el cl-compat.el cl-extra.el                      \
77         cl-macs.el cl-seq.el cl.el cmdloop.el code-cmds.el              \
78         code-files.el code-process.el coding.el compat.el config.el     \
79         console.el cus-dep.el cus-edit.el cus-face.el cus-file.el       \
80         cus-load.el cus-start.el custom.el derived.el device.el         \
81         dialog-gtk.el dialog-items.el dialog.el disass.el               \
82         disp-table.el dragdrop.el easy-mmode.el easymenu.el             \
83         emod-utils.el etags.el events.el extents.el faces.el ffi.el     \
84         files-nomule.el files.el fill.el float-sup.el font-lock.el      \
85         font-menu.el font.el fontl-hooks.el format.el frame.el gdk.el   \
86         generic-widgets.el glade.el glyphs.el gnome-widgets.el gnome.el \
87         gnuserv.el gpm.el gtk-compose.el gtk-extra.el gtk-faces.el      \
88         gtk-ffi.el gtk-file-dialog.el gtk-font-menu.el gtk-glyphs.el    \
89         gtk-init.el gtk-iso8859-1.el gtk-marshal.el gtk-mouse.el        \
90         gtk-package.el gtk-password-dialog.el gtk-select.el             \
91         gtk-widget-accessors.el gtk-widgets.el gtk.el gui.el            \
92         gutter-items.el gutter.el help-macro.el help-nomule.el help.el  \
93         hyper-apropos.el indent.el info.el isearch-mode.el iso8859-1.el \
94         issue-tracker.el itimer-autosave.el itimer.el keydefs.el        \
95         keymap.el ldap.el lib-complete.el lisp-initd.el lisp-mnt.el     \
96         lisp-mode.el lisp.el list-mode.el loaddefs.el loadhist.el       \
97         map-ynp.el menubar-items.el menubar.el minibuf.el misc.el       \
98         mode-motion.el modeline.el mouse.el movemail.el multicast.el    \
99         mwheel.el number.el objects.el obsolete.el package-admin.el     \
100         package-get.el package-info.el package-ui.el packages.el        \
101         page.el paragraphs.el paths.el picture.el printer.el            \
102         process.el rect.el regexp-opt.el register.el replace.el         \
103         resize-minibuffer.el scrollbar.el select.el shadow.el simple.el \
104         sound.el specifier.el subr.el symbol-syntax.el symbols.el       \
105         syntax.el text-mode.el text-props.el toolbar-items.el           \
106         toolbar.el tty-init.el undo-stack.el userlock.el version.el     \
107         view-less.el wid-browse.el wid-edit.el widget.el widgets-gtk.el \
108         window-xemacs.el window.el x-color.el x-compose.el x-faces.el   \
109         x-font-menu.el x-init.el x-iso8859-1.el x-misc.el x-mouse.el    \
110         x-scrollbar.el x-select.el x-win-sun.el x-win-xfree86.el
111
112 ffilispels =                                                            \
113         ffi/ffi-curl.el ffi/ffi-gcrypt.el ffi/ffi-libc.el               \
114         ffi/ffi-taglib.el ffi/ffi-wand.el ffi/ffi-magic.el              \
115         ffi/ffi-dbus.el ffi/ffi-sqlite.el
116 mulelispels =                                                           \
117         mule/arabic.el mule/canna-leim.el mule/chinese.el               \
118         mule/cyrillic.el mule/english.el mule/ethiopic.el               \
119         mule/european.el mule/greek.el mule/hebrew.el mule/japanese.el  \
120         mule/kinsoku.el mule/korean.el mule/latin.el mule/misc-lang.el  \
121         mule/mule-category.el mule/ccl.el mule/mule-charset.el          \
122         mule/mule-cmds.el mule/mule-coding.el mule/mule-help.el         \
123         mule/mule-init.el mule/mule-misc.el mule/mule-tty-init.el       \
124         mule/mule-x-init.el mule/thai-xtis-chars.el mule/thai-xtis.el   \
125         mule/viet-chars.el mule/vietnamese.el
126
127 termlispels =                                                           \
128         term/AT386.el term/apollo.el term/bg-mouse.el term/bobcat.el    \
129         term/internal.el term/keyswap.el term/linux.el term/lk201.el    \
130         term/news.el term/scoansi.el term/sun-mouse.el term/sun.el      \
131         term/sup-mouse.el term/tvi970.el term/vt-control.el             \
132         term/vt100-led.el term/vt100.el term/vt102.el term/vt125.el     \
133         term/vt200.el term/vt201.el term/vt220.el term/vt240.el         \
134         term/vt300.el term/vt320.el term/vt400.el term/vt420.el         \
135         term/wyse50.el term/xterm.el
136
137 builtels =                                                              \
138         auto-autoloads.el custom-load.el finder-inf.el                  \
139         custom-defines.el 
140
141 ffibuiltels =                                                           \
142         ffi/auto-autoloads.el ffi/custom-load.el                        \
143         ffi/custom-defines.el
144
145 mulebuiltels =                                                          \
146         mule/auto-autoloads.el mule/custom-load.el                      \
147         mule/custom-defines.el
148
149
150 if HAVE_FFI
151 builtels += $(ffibuiltels)
152 endif
153 if WITH_MULE
154 builtels += $(mulebuiltels)
155 endif
156
157 nocompile_elfiles = 
158 compile_elfiles = $(compile_bldchainels) $(corelispels) $(termlispels)
159 if HAVE_FFI
160 compile_elfiles += $(ffilispels)
161 endif
162 if WITH_MULE
163 compile_elfiles +=  $(mulelispels)
164 endif
165 elfiles = $(nocompile_elfiles) $(compile_elfiles)
166
167 nobase_dist_lisp_DATA = $(elfiles)
168 nobase_lisp_DATA = $(builtels) $(elfiles:.el=.elc) $(builtels:.el=.elc)
169 noinst_DATA = auto.stamp update-elc.stamp autoc.stamp
170
171 BUILT_FILES = auto.stamp update-elc.stamp autoc.stamp
172
173 CLEANFILES = core* stage1 stage2 $(builtels) $(builtels:.el=.elc)       \
174         $(lisphier:=/*.el[c~]) *.stamp ffi/$(builtels)                  \
175         ffi/$(builtels:.el=.elc)                                        \
176         mule/$(builtels) mule/$(builtels:.el=.elc)                      \
177         $(BUILT_FILES)
178
179 ## custom rules
180 SXEMACS = $(bldsrcdir)/sxemacs
181 SXEMACS_DMP = $(SXEMACS).dmp
182 AALFILE = $(bldlispdir)/auto-autoloads.el
183 BITCH = $(SXEMACS) -batch
184 SXE_DYLD_PATH = $(bldsrcdir):$(bldsrcdir)/$(LT_OBJDIR):$(bldlwlibdir):$(bldlwlibdir)/$(LT_OBJDIR):$(DESTDIR)$(libdir)
185 BITCHENV = DYLD_LIBRARY_PATH=$(SXE_DYLD_PATH):$$DYLD_LIBRARY_PATH:$(DYLD_LIBRARY_PATH) \
186         LD_LIBRARY_PATH=$(SXE_DYLD_PATH):$$LD_LIBRARY_PATH:$(LD_LIBRARY_PATH) \
187         EMACSPACKAGEPATH= \
188         SOURCE_TREE_ROOT=$(abs_top_srcdir) \
189         BUILD_TREE_ROOT=$(abs_top_builddir)
190 BATCH = $(BITCHENV) $(BITCH)
191 PUREBATCH = $(BATCH) -nd
192 RM = rm -f
193
194 lisphier = . term
195 if HAVE_FFI
196 lisphier += ffi
197 endif
198 if WITH_MULE
199 lisphier += mule
200 endif
201
202 stamps = bldchn.stamp core.stamp term.stamp
203 if HAVE_FFI
204 stamps += ffi.stamp
205 endif
206 if WITH_MULE
207 stamps += mule.stamp
208 endif
209
210 tags: TAGS
211 TAGS: $(compile_elfiles) $(TAGS_DEPENDENCIES)
212         for i in $(compile_elfiles); do unique="$$unique ${srcdir}/$$i"; done; \
213                 $(ETAGS) $$unique
214
215 bldchn.stamp: $(SXEMACS) $(compile_bldchainels) auto.stamp
216         $(PUREBATCH) -l compile-core.el $(compile_bldchainels)
217         @touch $@
218
219 core.stamp: $(SXEMACS) $(corelispels) auto.stamp
220         $(PUREBATCH) -l compile-core.el $(corelispels)
221         @touch $@
222
223 ffi.stamp: $(SXEMACS) $(ffilispels) auto.stamp
224         $(PUREBATCH) -l compile-core.el $(ffilispels)
225         @touch $@
226
227 mule.stamp: $(SXEMACS) $(mulelispels) auto.stamp
228         $(PUREBATCH) -l compile-core.el $(mulelispels)
229         @touch $@
230
231 term.stamp: $(SXEMACS) $(termlispels) auto.stamp
232         $(PUREBATCH) -l compile-core.el $(termlispels)
233         @touch $@
234
235 autoc.stamp: $(SXEMACS) auto.stamp update-elc.stamp
236 @make_ifeq@ (yes,$(shell test -e $(bldsrcdir)/sxemacs.dmp && echo "yes"))
237         @echo "Building finder database ..."
238         $(BATCH) -vanilla -no-autoloads \
239                 -l finder -f finder-compile-keywords
240         @echo "Building finder database ...(done)"
241         $(BITCH) -no-autoloads -l config \
242                 -l bytecomp -f batch-byte-compile $(builtels)
243         @touch $@
244 @make_endif@
245
246 $(builtels): auto.stamp
247 $(builtels:.el=.elc): autoc.stamp
248 $(elfiles:.el=.elc): update-elc.stamp
249
250 update-elc.stamp: $(SXEMACS) $(compile_elfiles) auto.stamp $(stamps)
251         @touch $@
252
253 auto.stamp: $(SXEMACS) $(compile_elfiles)
254         for i in $(lisphier); do mkdir -p $$i; done
255         $(PUREBATCH) -l build-autoloads.el
256         @touch $@
257
258 #SUFFIXES = .el .elc
259 #.el.elc: $(SXEMACS) $(SXEMACS_DMP) auto.stamp update-elc.stamp
260 #       $(BATCH) -l bytecomp -f batch-byte-compile-one-file-here $<
261
262 #stage1: auto-autoloads.el
263 #       @touch $@
264 #
265 #stage2: stage1 ##$(builtels)
266 #       @touch $@
267 #
268 #all: stage1 stage2