aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Innes2000-09-14 21:22:43 +0000
committerAndrew Innes2000-09-14 21:22:43 +0000
commit161a7b3739cab0544841ec17c67050ae70534767 (patch)
tree7a5b7a5b90957fd1275eff00c66de06229ede2fe
parent524817296a089d7065271258cc1ecf1c2e0fd11a (diff)
downloademacs-161a7b3739cab0544841ec17c67050ae70534767.tar.gz
emacs-161a7b3739cab0544841ec17c67050ae70534767.zip
Add bootstrap support. Also copy lisp source
when installing.
-rw-r--r--lisp/makefile.w32-in257
1 files changed, 238 insertions, 19 deletions
diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in
index 97d48a62b30..db9c23f6331 100644
--- a/lisp/makefile.w32-in
+++ b/lisp/makefile.w32-in
@@ -24,13 +24,232 @@ ALL =
24 24
25all: $(ALL) 25all: $(ALL)
26 26
27topdontcompile = cus-load.el forms-d2.el forms-pass.el patcomp.el \ 27SQUOTE='
28 subdirs.el version.el 28# '
29maildontcompile = mail/blessmail.el mail/sc.el 29
30playdontcompile = play/bruce.el 30#lisp=$(MAKEDIR:\=/)
31interdontcompile = international/latin-1.el international/latin-2.el \ 31lisp=.
32 international/latin-3.el international/latin-4.el \ 32
33 international/latin-5.el international/mule-conf.el 33# You can specify a different executable on the make command line,
34# e.g. "make EMACS=../src/emacs ...".
35
36EMACS = "../bin/emacs.exe"
37
38# Command line flags for Emacs. This must include --multibyte,
39# otherwise some files will not compile.
40
41EMACSOPT = -batch --no-init-file --no-site-file --multibyte
42
43lisptagsfiles1 = $(lisp)/*.el
44lisptagsfiles2 = $(lisp)/*/*.el
45ETAGS = "../lib-src/$(BLD)/etags"
46
47# Files which should not be compiled.
48# - emacs-lisp/cl-specs.el: only contains `def-edebug-spec's so there's
49# no point compiling it, although it doesn't hurt.
50
51DONTCOMPILE = \
52 $(lisp)/bindings.el \
53 $(lisp)/cus-load.el \
54 $(lisp)/cus-start.el \
55 $(lisp)/emacs-lisp/cl-specs.el \
56 $(lisp)/eshell/esh-maint.el \
57 $(lisp)/eshell/esh-groups.el \
58 $(lisp)/finder-inf.el \
59 $(lisp)/forms-d2.el \
60 $(lisp)/forms-pass.el \
61 $(lisp)/generic-x.el \
62 $(lisp)/international/latin-1.el \
63 $(lisp)/international/latin-2.el \
64 $(lisp)/international/latin-3.el \
65 $(lisp)/international/latin-4.el \
66 $(lisp)/international/latin-5.el \
67 $(lisp)/international/latin-8.el \
68 $(lisp)/international/latin-9.el \
69 $(lisp)/international/mule-conf.el \
70 $(lisp)/loaddefs.el \
71 $(lisp)/loadup.el \
72 $(lisp)/mail/blessmail.el \
73 $(lisp)/mail/sc.el \
74 $(lisp)/patcomp.el \
75 $(lisp)/paths.el \
76 $(lisp)/play/bruce.el \
77 $(lisp)/subdirs.el \
78 $(lisp)/term/internal.el \
79 $(lisp)/version.el
80
81# Files to compile before others during a bootstrap. This is done
82# to speed up the bootstrap process.
83
84COMPILE_FIRST = \
85 $(lisp)/emacs-lisp/byte-opt.el \
86 $(lisp)/emacs-lisp/bytecomp.el \
87 $(lisp)/subr.el
88
89# The actual Emacs command run in the targets below.
90
91emacs = $(EMACS) $(EMACSOPT)
92
93# Common command to find subdirectories
94
95setwins=subdirs=`find $$wd -type d -print`; \
96 for file in $$subdirs; do \
97 case $$file in */Old | */RCS | */CVS | */CVS/* | */=* ) ;; \
98 *) wins="$$wins $$file" ;; \
99 esac; \
100 done
101
102# Have to define the list of subdirs manually when not using sh.
103WINS=\
104 calendar \
105 emacs-lisp \
106 emulation \
107 eshell \
108 gnus \
109 international \
110 language \
111 mail \
112 net \
113 play \
114 progmodes \
115 term \
116 textmodes
117
118doit:
119
120cus-load.el:
121 touch $@
122custom-deps: cus-load.el doit
123 @echo Directories: $(WINS)
124 $(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hooks nil)$(ARGQUOTE) -f custom-make-dependencies $(lisp) $(WINS)
125
126finder-inf.el:
127 echo (provide $(SQUOTE)finder-inf)>> $@
128
129finder-data: finder-inf.el doit
130 @echo Directories: $(WINS)
131 $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS)
132
133loaddefs.el:
134 echo ;;; loaddefs.el --- automatically extracted autoloads> $@
135 echo ;;; Code:>> $@
136 echo >> $@
137 echo ;;; Local Variables:>> $@
138 echo ;;; version-control: never>> $@
139 echo ;;; no-byte-compile: t>> $@
140 echo ;;; no-update-autoloads: t>> $@
141 echo ;;; End:>> $@
142 echo ;;; loaddefs.el ends here>> $@
143
144autoloads: loaddefs.el doit
145 @echo Directories: $(WINS)
146 set EMACSLOADPATH=$(lisp)
147 $(SETLOADPATH) $(emacs) -l autoload --eval $(ARGQUOTE)(setq find-file-hooks nil generated-autoload-file $(DQUOTE)$(lisp)/loaddefs.el$(DQUOTE))$(ARGQUOTE) -f batch-update-autoloads $(lisp) $(WINS)
148
149subdirs.el:
150 $(MAKE) $(MFLAGS) update-subdirs
151
152# Need separate version for sh and native cmd.exe
153update-subdirs: update-subdirs-$(SHELLTYPE)
154
155update-subdirs-CMD: doit
156 @set QWINS=
157 @for %d in ($(WINS)) do if not (%d)==(term) set QWINS=%QWINS% "%d"
158 echo ;; In load-path, after this directory should come> subdirs.el
159 echo ;; certain of its subdirectories. Here we specify them.>> subdirs.el
160 echo (normal-top-level-add-to-load-path $(SQUOTE)(%QWINS%))>> subdirs.el
161
162update-subdirs-SH: doit
163 wd=$(lisp); $(setwins); \
164 for file in $$wins; do \
165 $(srcdir)/update-subdirs $$file; \
166 done;
167
168updates: update-subdirs autoloads finder-data custom-deps
169
170TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
171 $(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2)
172
173TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
174 $(ETAGS) -o TAGS-LISP $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
175
176.el.elc:
177 set EMACSLOADPATH=$(lisp)
178 -$(SETLOADPATH) $(emacs) -f batch-byte-compile $<
179
180$(DONTCOMPILE:.el=.elc):
181 -$(DEL) $@
182
183# Compile all Lisp files, except those from DONTCOMPILE. This
184# compiles files unconditionally. All .elc files are made writable
185# before compilation in case we checked out read-only (CVS option -r).
186# Files MUST be compiled one by one. If we compile several files in a
187# row we can't make sure that the compilation environment is clean.
188# We also set the load-path of the Emacs used for compilation to the
189# current directory and its subdirectories, to make sure require's and
190# load's in the files being compiled find the right files.
191
192# Need separate version for sh and native cmd.exe
193compile-files: subdirs.el compile-files-$(SHELLTYPE) doit
194
195compile-files-CMD:
196 set EMACSLOADPATH=$(lisp)
197 -for %f in ($(lisp) $(WINS)) do for %g in (%f\*.elc) do @attrib -r %g
198 for %f in ($(COMPILE_FIRST)) do $(emacs) -f batch-byte-compile %f
199 for %f in ($(lisp) $(WINS)) do for %g in (%f/*.el) do $(emacs) -f batch-byte-compile %f/%g
200
201compile-files-SH:
202# for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
203 for el in $(COMPILE_FIRST); do \
204 echo Compiling $$el; \
205 EMACSLOADPATH=$(lisp) $(emacs) -f batch-byte-compile $$el; \
206 done
207 for dir in $(lisp) $(WINS); do \
208 for el in $$dir/*.el; do \
209 echo Compiling $$el; \
210 EMACSLOADPATH=$(lisp) $(emacs) -f batch-byte-compile $$el; \
211 done; \
212 done
213
214# Backup compiled Lisp files in elc.tar.gz. If that file already
215# exists, make a backup of it.
216
217backup-compiled-files:
218 -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
219 -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
220
221# Compile Lisp files, but save old compiled files first.
222
223compile: backup-compiled-files compile-files
224
225# Recompile all Lisp files which are newer than their .elc files.
226# Note that this doesn't create .elc files. It only recompiles if an
227# .elc is present.
228
229recompile: doit
230 set EMACSLOADPATH=$(lisp)
231 $(SETLOADPATH) $(emacs) -f batch-byte-recompile-directory .
232
233# Prepare a bootstrap in the lisp subdirectory. Build loaddefs.el,
234# because it's not sure it's up-to-date, and if it's not, that might
235# lead to errors during the bootstrap because something fails to
236# autoload as expected. Remove compiled Lisp files so that
237# bootstrap-emacs will be built from sources only.
238
239# Need separate version for sh and native cmd.exe
240bootstrap-clean: bootstrap-clean-$(SHELLTYPE)
241
242bootstrap-clean-CMD:
243 if exist $(EMACS) $(MAKE) $(MFLAGS) autoloads
244 -for %f in ($(lisp) $(WINS)) do for %g in (%f\*.elc) do @$(DEL) %g
245
246bootstrap-clean-SH:
247 if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi
248 -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
249
250# Generate/update files for the bootstrap process.
251
252bootstrap: autoloads compile-files custom-deps
34 253
35# 254#
36# Assuming INSTALL_DIR is defined, copy the elisp files to it 255# Assuming INSTALL_DIR is defined, copy the elisp files to it
@@ -44,20 +263,20 @@ install:
44#ifdef COPY_LISP_SOURCE 263#ifdef COPY_LISP_SOURCE
45 $(IFNOTSAMEDIR) $(CP_DIR) . "$(INSTALL_DIR)/lisp" $(ENDIF) 264 $(IFNOTSAMEDIR) $(CP_DIR) . "$(INSTALL_DIR)/lisp" $(ENDIF)
46#else 265#else
47 $(IFNOTSAMEDIR) $(CP_DIR) *.elc "$(INSTALL_DIR)/lisp" $(ENDIF) 266# $(IFNOTSAMEDIR) $(CP_DIR) *.elc "$(INSTALL_DIR)/lisp" $(ENDIF)
48 $(IFNOTSAMEDIR) $(CP) cus-load.el "$(INSTALL_DIR)/lisp" $(ENDIF) 267# $(IFNOTSAMEDIR) $(CP) cus-load.el "$(INSTALL_DIR)/lisp" $(ENDIF)
49 $(IFNOTSAMEDIR) $(CP) forms*.el "$(INSTALL_DIR)/lisp" $(ENDIF) 268# $(IFNOTSAMEDIR) $(CP) forms*.el "$(INSTALL_DIR)/lisp" $(ENDIF)
50 $(IFNOTSAMEDIR) $(CP) patcomp.el "$(INSTALL_DIR)/lisp" $(ENDIF) 269# $(IFNOTSAMEDIR) $(CP) patcomp.el "$(INSTALL_DIR)/lisp" $(ENDIF)
51 $(IFNOTSAMEDIR) $(CP) subdirs.el "$(INSTALL_DIR)/lisp" $(ENDIF) 270# $(IFNOTSAMEDIR) $(CP) subdirs.el "$(INSTALL_DIR)/lisp" $(ENDIF)
52 $(IFNOTSAMEDIR) $(CP) version.el "$(INSTALL_DIR)/lisp" $(ENDIF) 271# $(IFNOTSAMEDIR) $(CP) version.el "$(INSTALL_DIR)/lisp" $(ENDIF)
53 $(IFNOTSAMEDIR) $(CP) mail/blessmail.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF) 272# $(IFNOTSAMEDIR) $(CP) mail/blessmail.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
54 $(IFNOTSAMEDIR) $(CP) mail/sc.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF) 273# $(IFNOTSAMEDIR) $(CP) mail/sc.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
55 $(IFNOTSAMEDIR) $(CP) play/bruce.el "$(INSTALL_DIR)/lisp/play" $(ENDIF) 274# $(IFNOTSAMEDIR) $(CP) play/bruce.el "$(INSTALL_DIR)/lisp/play" $(ENDIF)
56 $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF) 275# $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
57 $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF) 276# $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
277#endif
58 - $(DEL) ../same-dir.tst 278 - $(DEL) ../same-dir.tst
59 - $(DEL) "$(INSTALL_DIR)/same-dir.tst" 279 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
60#endif
61 280
62# 281#
63# Maintenance 282# Maintenance