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