Whitespace cleanup in 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 sxelwlibdir = $(top_srcdir)/src/ui/lwlib
43 bldlwlibdir = $(top_builddir)/src/ui/lwlib
44
45 lispffidir = $(lispdir)/ffi
46 lispmuledir = $(lispdir)/mule
47 lisptermdir = $(lispdir)/term
48
49 statlispdir = ${datadir}/${inststaticdir}
50 sxepkgdir = $(statlispdir)/sxemacs-packages
51 xepkgdir = $(statlispdir)/xemacs-packages
52 mulepkgdir = $(statlispdir)/mule-packages
53 sitepkgdir = $(statlispdir)/site-packages
54
55 ETAGS = $(top_builddir)/lib-src/etags
56 TAGS_DEPENDENCIES = $(ETAGS)
57 ETAGS_ARGS =
58
59 sxepkg_DATA =
60 xepkg_DATA =
61 mulepkg_DATA =
62 sitepkg_DATA =
63
64 subdirs = ffi mule term
65
66 EXTRA_DIST = ffi/Makefile.in mule/Makefile.in
67 nocompile_bldchainels =                                                 \
68         build-autoloads.el compile-core.el loadup-el.el loadup.el       \
69         site-load.el update-elc.el update-elc-2.el very-early-lisp.el
70 compile_bldchainels =                                                   \
71         autoload.el dump-paths.el dumped-lisp.el find-paths.el          \
72         finder.el make-docfile.el setup-paths.el startup.el
73 bldchainels = $(nocompile_bldchainels) $(compile_bldchainels)
74 corelispels =                                                           \
75         abbrev.el about.el alist.el apropos.el auto-save.el             \
76         auto-show.el backquote.el blessmail.el buff-menu.el buffer.el   \
77         build-rpt.el byte-optimize.el bytecomp-runtime.el bytecomp.el   \
78         callers-of-rpt.el cl-compat.el cl-extra.el cl-macs.el cl-seq.el \
79         cl.el cmdloop.el code-cmds.el code-files.el code-process.el     \
80         coding.el compat.el config.el console.el cus-dep.el             \
81         cus-edit.el cus-face.el cus-file.el cus-load.el cus-start.el    \
82         custom.el derived.el device.el dialog-items.el dialog.el        \
83         disass.el disp-table.el dragdrop.el easy-mmode.el easymenu.el   \
84         emod-utils.el etags.el events.el extents.el faces.el ffi.el     \
85         files-nomule.el files.el fill.el float-sup.el font-lock.el      \
86         font-menu.el font.el fontl-hooks.el format.el frame.el          \
87         glyphs.el gnuserv.el gpm.el gui.el gutter-items.el gutter.el    \
88         help-macro.el help-nomule.el help.el hyper-apropos.el indent.el \
89         info.el isearch-mode.el iso8859-1.el issue-tracker.el           \
90         itimer-autosave.el itimer.el keydefs.el keymap.el ldap.el       \
91         lib-complete.el lisp-initd.el lisp-mnt.el lisp-mode.el lisp.el  \
92         list-mode.el loaddefs.el loadhist.el map-ynp.el                 \
93         menubar-items.el menubar.el minibuf.el misc.el mode-motion.el   \
94         modeline.el mouse.el movemail.el multicast.el mwheel.el         \
95         number.el objects.el obsolete.el package-admin.el               \
96         package-get.el package-info.el package-ui.el packages.el        \
97         page.el paragraphs.el paths.el picture.el printer.el            \
98         process.el rect.el regexp-opt.el register.el replace.el         \
99         resize-minibuffer.el scrollbar.el select.el shadow.el simple.el \
100         sound.el specifier.el subr.el symbol-syntax.el symbols.el       \
101         syntax.el text-mode.el text-props.el toolbar-items.el           \
102         toolbar.el tty-init.el undo-stack.el userlock.el version.el     \
103         view-less.el wid-browse.el wid-edit.el widget.el                \
104         window-xemacs.el window.el x-color.el x-compose.el x-faces.el   \
105         x-font-menu.el x-init.el x-iso8859-1.el x-misc.el x-mouse.el    \
106         x-scrollbar.el x-select.el x-win-sun.el x-win-xfree86.el
107
108 ffilispels =                                                            \
109         ffi/ffi-curl.el ffi/ffi-gcrypt.el ffi/ffi-libc.el               \
110         ffi/ffi-taglib.el ffi/ffi-wand.el ffi/ffi-magic.el              \
111         ffi/ffi-dbus.el ffi/ffi-sqlite.el
112 mulelispels =                                                           \
113         mule/arabic.el mule/canna-leim.el mule/chinese.el               \
114         mule/cyrillic.el mule/english.el mule/ethiopic.el               \
115         mule/european.el mule/greek.el mule/hebrew.el mule/japanese.el  \
116         mule/kinsoku.el mule/korean.el mule/latin.el mule/misc-lang.el  \
117         mule/mule-category.el mule/ccl.el mule/mule-charset.el  \
118         mule/mule-cmds.el mule/mule-coding.el mule/mule-help.el         \
119         mule/mule-init.el mule/mule-misc.el mule/mule-tty-init.el       \
120         mule/mule-x-init.el mule/thai-xtis-chars.el mule/thai-xtis.el   \
121         mule/viet-chars.el mule/vietnamese.el
122
123 termlispels =                                                           \
124         term/AT386.el term/apollo.el term/bg-mouse.el term/bobcat.el    \
125         term/internal.el term/keyswap.el term/linux.el term/lk201.el    \
126         term/news.el term/scoansi.el term/sun-mouse.el term/sun.el      \
127         term/sup-mouse.el term/tvi970.el term/vt-control.el             \
128         term/vt100-led.el term/vt100.el term/vt102.el term/vt125.el     \
129         term/vt200.el term/vt201.el term/vt220.el term/vt240.el         \
130         term/vt300.el term/vt320.el term/vt400.el term/vt420.el         \
131         term/wyse50.el term/xterm.el
132
133 builtels =                                                              \
134         auto-autoloads.el custom-load.el finder-inf.el                  \
135         custom-defines.el
136
137 ffibuiltels =                                                           \
138         ffi/auto-autoloads.el ffi/custom-load.el                        \
139         ffi/custom-defines.el
140
141 mulebuiltels =                                                          \
142         mule/auto-autoloads.el mule/custom-load.el                      \
143         mule/custom-defines.el
144
145
146 if HAVE_FFI
147 builtels += $(ffibuiltels)
148 endif
149 if WITH_MULE
150 builtels += $(mulebuiltels)
151 endif
152
153 nocompile_elfiles =
154 compile_elfiles = $(compile_bldchainels) $(corelispels) $(termlispels)
155 if HAVE_FFI
156 compile_elfiles += $(ffilispels)
157 endif
158 if WITH_MULE
159 compile_elfiles +=  $(mulelispels)
160 endif
161 elfiles = $(nocompile_elfiles) $(compile_elfiles)
162
163 nobase_dist_lisp_DATA = $(elfiles)
164 nobase_lisp_DATA = $(builtels) $(elfiles:.el=.elc) $(builtels:.el=.elc)
165 noinst_DATA = auto.stamp update-elc.stamp autoc.stamp
166
167 BUILT_FILES = auto.stamp update-elc.stamp autoc.stamp
168
169 CLEANFILES = core* stage1 stage2 $(builtels) $(builtels:.el=.elc)       \
170         $(lisphier:=/*.el[c~]) *.stamp ffi/$(builtels)                  \
171         ffi/$(builtels:.el=.elc)                                        \
172         mule/$(builtels) mule/$(builtels:.el=.elc)                      \
173         $(BUILT_FILES)
174
175 ## custom rules
176 SXEMACS = $(bldsrcdir)/sxemacs
177 SXEMACS_DMP = $(SXEMACS).dmp
178 AALFILE = $(bldlispdir)/auto-autoloads.el
179 BITCH = $(SXEMACS) -batch
180 SXE_DYLD_PATH = $(bldsrcdir):$(bldsrcdir)/$(LT_OBJDIR):$(bldlwlibdir):$(bldlwlibdir)/$(LT_OBJDIR):$(DESTDIR)$(libdir)
181 BATCHENV = DYLD_LIBRARY_PATH=$(SXE_DYLD_PATH):$$DYLD_LIBRARY_PATH:$(DYLD_LIBRARY_PATH) \
182         LD_LIBRARY_PATH=$(SXE_DYLD_PATH):$$LD_LIBRARY_PATH:$(LD_LIBRARY_PATH) \
183         SHLIB_PATH=$(SXE_DYLD_PATH):$$SHLIB_PATH:$(SHLIB_PATH)
184 BITCHENV = $(BATCHENV) \
185         EMACSPACKAGEPATH= \
186         SOURCE_TREE_ROOT=$(abs_top_srcdir) \
187         BUILD_TREE_ROOT=$(abs_top_builddir)
188 BATCH = $(BITCHENV) $(BITCH)
189 PUREBATCH = $(BATCH) -nd
190 RM = rm -f
191
192 lisphier = . term
193 if HAVE_FFI
194 lisphier += ffi
195 endif
196 if WITH_MULE
197 lisphier += mule
198 endif
199
200 stamps = bldchn.stamp core.stamp term.stamp
201 if HAVE_FFI
202 stamps += ffi.stamp
203 endif
204 if WITH_MULE
205 stamps += mule.stamp
206 endif
207
208 tags: TAGS
209 TAGS: $(compile_elfiles) $(TAGS_DEPENDENCIES)
210         for i in $(compile_elfiles); do unique="$$unique ${srcdir}/$$i"; done; \
211                 $(ETAGS) $$unique
212
213 bldchn.stamp: $(SXEMACS) $(compile_bldchainels) auto.stamp
214         $(PUREBATCH) -l compile-core.el $(compile_bldchainels)
215         @touch $@
216
217 core.stamp: $(SXEMACS) $(corelispels) auto.stamp
218         $(PUREBATCH) -l compile-core.el $(corelispels)
219         @touch $@
220
221 ffi.stamp: $(SXEMACS) $(ffilispels) auto.stamp
222         $(PUREBATCH) -l compile-core.el $(ffilispels)
223         @touch $@
224
225 mule.stamp: $(SXEMACS) $(mulelispels) auto.stamp
226         $(PUREBATCH) -l compile-core.el $(mulelispels)
227         @touch $@
228
229 term.stamp: $(SXEMACS) $(termlispels) auto.stamp
230         $(PUREBATCH) -l compile-core.el $(termlispels)
231         @touch $@
232
233 autoc.stamp: $(SXEMACS) auto.stamp update-elc.stamp
234 @make_ifeq@ (yes,$(shell test -e $(bldsrcdir)/sxemacs.dmp && echo "yes"))
235         @echo "Building finder database ..."
236         $(BATCH) -vanilla -no-autoloads \
237                 -l finder -f finder-compile-keywords
238         @echo "Building finder database ...(done)"
239         $(BATCHENV) $(BITCH) -no-autoloads -l config \
240                 -l bytecomp -f batch-byte-compile $(builtels)
241         @touch $@
242 @make_endif@
243
244 $(builtels): auto.stamp
245 $(builtels:.el=.elc): autoc.stamp
246 $(elfiles:.el=.elc): update-elc.stamp
247
248 update-elc.stamp: $(SXEMACS) $(compile_elfiles) auto.stamp $(stamps)
249         @touch $@
250
251 auto.stamp: $(SXEMACS) $(compile_elfiles)
252         for i in $(lisphier); do mkdir -p $$i; done
253         $(PUREBATCH) -l build-autoloads.el
254         @touch $@
255
256 #SUFFIXES = .el .elc
257 #.el.elc: $(SXEMACS) $(SXEMACS_DMP) auto.stamp update-elc.stamp
258 #       $(BATCH) -l bytecomp -f batch-byte-compile-one-file-here $<
259
260 #stage1: auto-autoloads.el
261 #       @touch $@
262 #
263 #stage2: stage1 ##$(builtels)
264 #       @touch $@
265 #
266 #all: stage1 stage2