3 ## Copyright (C) 2007 Steve Youngs.
5 ## This file is part of SXEmacs.
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.
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.
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/>.
20 ## Process this file with automake to produce Makefile.in
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
30 top_builddir = @top_builddir@
31 top_srcdir = @top_srcdir@
32 abs_top_builddir = @abs_top_builddir@
33 abs_top_srcdir = @abs_top_srcdir@
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
45 lispffidir = $(lispdir)/ffi
46 lispmuledir = $(lispdir)/mule
47 lisptermdir = $(lispdir)/term
49 statlispdir = ${datadir}/${inststaticdir}
50 sxepkgdir = $(statlispdir)/sxemacs-packages
51 xepkgdir = $(statlispdir)/xemacs-packages
52 mulepkgdir = $(statlispdir)/mule-packages
53 sitepkgdir = $(statlispdir)/site-packages
55 ETAGS = $(top_builddir)/lib-src/etags
56 TAGS_DEPENDENCIES = $(ETAGS)
64 subdirs = ffi mule term
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)
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
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
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
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
134 auto-autoloads.el custom-load.el finder-inf.el \
138 ffi/auto-autoloads.el ffi/custom-load.el \
139 ffi/custom-defines.el
142 mule/auto-autoloads.el mule/custom-load.el \
143 mule/custom-defines.el
147 builtels += $(ffibuiltels)
150 builtels += $(mulebuiltels)
154 compile_elfiles = $(compile_bldchainels) $(corelispels) $(termlispels)
156 compile_elfiles += $(ffilispels)
159 compile_elfiles += $(mulelispels)
161 elfiles = $(nocompile_elfiles) $(compile_elfiles)
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
167 BUILT_FILES = auto.stamp update-elc.stamp autoc.stamp
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) \
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) \
186 SOURCE_TREE_ROOT=$(abs_top_srcdir) \
187 BUILD_TREE_ROOT=$(abs_top_builddir)
188 BATCH = $(BITCHENV) $(BITCH)
189 PUREBATCH = $(BATCH) -nd
200 stamps = bldchn.stamp core.stamp term.stamp
209 TAGS: $(compile_elfiles) $(TAGS_DEPENDENCIES)
210 for i in $(compile_elfiles); do unique="$$unique ${srcdir}/$$i"; done; \
213 bldchn.stamp: $(SXEMACS) $(compile_bldchainels) auto.stamp
214 $(PUREBATCH) -l compile-core.el $(compile_bldchainels)
217 core.stamp: $(SXEMACS) $(corelispels) auto.stamp
218 $(PUREBATCH) -l compile-core.el $(corelispels)
221 ffi.stamp: $(SXEMACS) $(ffilispels) auto.stamp
222 $(PUREBATCH) -l compile-core.el $(ffilispels)
225 mule.stamp: $(SXEMACS) $(mulelispels) auto.stamp
226 $(PUREBATCH) -l compile-core.el $(mulelispels)
229 term.stamp: $(SXEMACS) $(termlispels) auto.stamp
230 $(PUREBATCH) -l compile-core.el $(termlispels)
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)
244 $(builtels): auto.stamp
245 $(builtels:.el=.elc): autoc.stamp
246 $(elfiles:.el=.elc): update-elc.stamp
248 update-elc.stamp: $(SXEMACS) $(compile_elfiles) auto.stamp $(stamps)
251 auto.stamp: $(SXEMACS) $(compile_elfiles)
252 for i in $(lisphier); do mkdir -p $$i; done
253 $(PUREBATCH) -l build-autoloads.el
257 #.el.elc: $(SXEMACS) $(SXEMACS_DMP) auto.stamp update-elc.stamp
258 # $(BATCH) -l bytecomp -f batch-byte-compile-one-file-here $<
260 #stage1: auto-autoloads.el
263 #stage2: stage1 ##$(builtels)