Mercurial > emacs
comparison msdos/mainmake.v2 @ 99577:322d1a27ea4a
Make bootstrap work again:
(boot): New variable.
(src): Pass $(boot) to sub-Make. Remove src/bootlisp. If src/bootlisp
exists after running Make, run Make in `lisp' as well.
(clean, mostlyclean): Remove bogus repeated clean in the top-level directory.
(info, bootstrap-clean): New targets.
(bootstrap): Depend only on bootstrap-clean. Commands modified to be
equivalent to top-level Makefile.in.
(bootfast, bootstrap-lisp-1, bootstrap-lisp, bootstrap-src)
(bootstrap-clean-before, bootstrap-clean-after): Targets deleted.
(clean, mostlyclean, distclean, maintainer-clean, extraclean): Don't recurse
into lwlib and oldXMenu.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 15 Nov 2008 15:37:10 +0000 |
parents | eefd6603dc56 |
children | f6de88174ac6 |
comparison
equal
deleted
inserted
replaced
99576:8aeb40d33318 | 99577:322d1a27ea4a |
---|---|
65 top_srcdir := $(subst \,/,$(shell cd)) | 65 top_srcdir := $(subst \,/,$(shell cd)) |
66 | 66 |
67 # Find out which version of Emacs this is. | 67 # Find out which version of Emacs this is. |
68 version := ${shell sed -n -e '/(defconst emacs-version/s/^[^"]*\("[^"]*"\).*/\1/p' lisp/version.el} | 68 version := ${shell sed -n -e '/(defconst emacs-version/s/^[^"]*\("[^"]*"\).*/\1/p' lisp/version.el} |
69 | 69 |
70 all: maybe_bootstrap lib-src src emacs lispref lispintro | 70 # Do we need to bootstrap? |
71 boot := | |
72 ifeq ($(wildcard src/b-emacs.exe),) | |
73 boot := b-emacs.exe | |
74 endif | |
75 | |
76 # Subdirectories to run Make. `lisp' is not included because the | |
77 # compiled lisp files are part of the distribution. (If we are | |
78 # bootstrapping, the src target will run Make in `lisp' as well.) | |
79 # leim is not included because it is part of the src target. | |
80 all: lib-src src emacs lispref lispintro | |
71 | 81 |
72 lib-src: FRC | 82 lib-src: FRC |
73 cd lib-src | 83 cd lib-src |
74 $(MAKE) top_srcdir=${top_srcdir} version=${version} | 84 $(MAKE) top_srcdir=${top_srcdir} version=${version} |
75 cd .. | 85 cd .. |
76 | 86 |
87 # Pass to src/Makefile.in an additional BOOTSTRAPEMACS variable which | |
88 # is either set to b-emacs.exe (in case bootstrap-emacs has not been | |
89 # constructed yet) or the empty string (otherwise). | |
90 # src/Makefile.in uses it to implement conditional dependencies, so that | |
91 # files that need bootstrap-emacs to be built do not additionally need | |
92 # to be kept fresher than b-emacs.exe. Otherwise changing a single | |
93 # file src/foo.c forces dumping a new bootstrap-emacs, then re-byte-compiling | |
94 # all preloaded elisp files, and only then dump the actual src/emacs, which | |
95 # is not wrong, but is overkill in 99.99% of the cases. | |
77 src: FRC | 96 src: FRC |
78 cd src | 97 cd src |
79 $(MAKE) top_srcdir=${top_srcdir} BOOTSTRAPEMACS="" | 98 rm -f bootlisp |
99 $(MAKE) top_srcdir=${top_srcdir} BOOTSTRAPEMACS="${boot}" | |
80 djecho -s '/-geometry/s,^.*,set environment HOME $(top_srcdir),' \ | 100 djecho -s '/-geometry/s,^.*,set environment HOME $(top_srcdir),' \ |
81 '/environment *TERM/s/^.*/set environment TERM internal/' \ | 101 '/environment *TERM/s/^.*/set environment TERM internal/' \ |
82 '/x_error_quitter/s/^.*/set environment NAME root/' >gdb.sed | 102 '/x_error_quitter/s/^.*/set environment NAME root/' >gdb.sed |
83 sed -f gdb.sed _gdbinit >gdb.tmp | 103 sed -f gdb.sed _gdbinit >gdb.tmp |
84 djecho -a gdb.tmp -s 'set environment USER root' \ | 104 djecho -a gdb.tmp -s 'set environment USER root' \ |
86 'set environment SHELL $(subst \,/,$(COMSPEC))' \ | 106 'set environment SHELL $(subst \,/,$(COMSPEC))' \ |
87 'set environment PATH $(subst \,/,$(PATH))' | 107 'set environment PATH $(subst \,/,$(PATH))' |
88 update gdb.tmp gdb.ini | 108 update gdb.tmp gdb.ini |
89 rm -f gdb.tmp gdb.sed | 109 rm -f gdb.tmp gdb.sed |
90 cd .. | 110 cd .. |
111 if exist src\bootlisp redir $(MAKE) -C lisp top_srcdir=${top_srcdir} | |
91 if exist leim\Makefile redir $(MAKE) -C leim top_srcdir=${top_srcdir} | 112 if exist leim\Makefile redir $(MAKE) -C leim top_srcdir=${top_srcdir} |
113 | |
114 info: emacs lispref lispintro | |
92 | 115 |
93 emacs lispref lispintro: FRC | 116 emacs lispref lispintro: FRC |
94 cd doc/$@ | 117 cd doc/$@ |
95 $(MAKE) top_srcdir=${top_srcdir} info | 118 $(MAKE) top_srcdir=${top_srcdir} info |
96 cd ../.. | 119 cd ../.. |
137 $(MAKE) $(MFLAGS) $@ | 160 $(MAKE) $(MFLAGS) $@ |
138 cd .. | 161 cd .. |
139 cd src | 162 cd src |
140 $(MAKE) $(MFLAGS) $@ | 163 $(MAKE) $(MFLAGS) $@ |
141 cd .. | 164 cd .. |
142 cd oldxmenu | |
143 -$(MAKE) $(MFLAGS) $@ | |
144 cd .. | |
145 cd doc | 165 cd doc |
146 cd emacs | 166 cd emacs |
147 -$(MAKE) $(MFLAGS) $@ | 167 -$(MAKE) $(MFLAGS) $@ |
148 cd .. | 168 cd .. |
149 cd misc | 169 cd misc |
157 cd .. | 177 cd .. |
158 cd .. | 178 cd .. |
159 cd leim | 179 cd leim |
160 if exist Makefile redir $(MAKE) $(MFLAGS) $@ | 180 if exist Makefile redir $(MAKE) $(MFLAGS) $@ |
161 cd .. | 181 cd .. |
162 -$(MAKE) $(MFLAGS) $@ | |
163 | 182 |
164 top_distclean=rm -f Makefile */Makefile src/_gdbinit | 183 top_distclean=rm -f Makefile */Makefile src/_gdbinit |
165 | 184 |
166 distclean maintainer-clean: FRC | 185 distclean maintainer-clean: FRC |
167 cd src | 186 cd src |
168 $(MAKE) $(MFLAGS) $@ | 187 $(MAKE) $(MFLAGS) $@ |
169 cd .. | 188 if exist bootlisp rm -f bootlisp |
170 cd oldxmenu | |
171 -$(MAKE) $(MFLAGS) $@ | |
172 cd .. | 189 cd .. |
173 cd lib-src | 190 cd lib-src |
174 $(MAKE) $(MFLAGS) $@ | 191 $(MAKE) $(MFLAGS) $@ |
175 cd .. | 192 cd .. |
176 cd doc | 193 cd doc |
196 ${top_distclean} | 213 ${top_distclean} |
197 | 214 |
198 extraclean: | 215 extraclean: |
199 cd src | 216 cd src |
200 $(MAKE) $(MFLAGS) $@ | 217 $(MAKE) $(MFLAGS) $@ |
201 cd .. | |
202 cd oldxmenu | |
203 -$(MAKE) $(MFLAGS) $@ | |
204 cd .. | 218 cd .. |
205 cd lib-src | 219 cd lib-src |
206 $(MAKE) $(MFLAGS) $@ | 220 $(MAKE) $(MFLAGS) $@ |
207 cd .. | 221 cd .. |
208 cd doc | 222 cd doc |
226 $(MAKE) $(MFLAGS) $@ | 240 $(MAKE) $(MFLAGS) $@ |
227 cd .. | 241 cd .. |
228 ${top_distclean} | 242 ${top_distclean} |
229 -rm -f *~ #* | 243 -rm -f *~ #* |
230 | 244 |
231 .PHONY: bootstrap bootstrap-lisp-1 bootstrap-src bootstrap-lisp bootstrap-clean | 245 .PHONY: bootstrap |
232 .PHONY: maybe_bootstrap bootfast | 246 |
233 | 247 bootstrap-clean: FRC |
234 maybe_bootstrap: | 248 cd src |
235 @if not exist lisp\abbrev.elc djecho \ | 249 $(MAKE) $(MFLAGS) $@ |
236 "Some *.elc files are missing. You should do a `make bootstrap'." | 250 cd .. |
237 @if not exist lisp\abbrev.elc redir -e /dev/null -oe redir fail-this-make.exe | 251 cd lib-src |
238 | 252 $(MAKE) $(MFLAGS) maintainer-clean |
239 bootstrap: bootstrap-clean-before bootstrap-lisp-1 bootstrap-src bootstrap-lisp bootstrap-clean-after all info | 253 cd .. |
240 cd lisp; $(MAKE) $(MFLAGS) bootstrap-after; cd .. | 254 cd doc |
241 | 255 cd emacs |
242 bootfast: bootstrap-clean-before bootstrap-src bootstrap-lisp bootstrap-clean-after all info | 256 -$(MAKE) $(MFLAGS) maintainer-clean |
243 cd lisp; $(MAKE) $(MFLAGS) bootstrap-after; cd .. | 257 cd ../misc |
244 | 258 -$(MAKE) $(MFLAGS) maintainer-clean |
245 bootstrap-lisp-1: | 259 cd ../lispref |
246 cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean; cd .. | 260 -$(MAKE) $(MFLAGS) maintainer-clean |
247 | 261 cd ../lispintro |
248 bootstrap-lisp: | 262 -$(MAKE) $(MFLAGS) maintainer-clean |
249 cd lisp; $(MAKE) $(MFLAGS) bootstrap EMACS=${top_srcdir}/src/b-emacs.exe lisp=${top_srcdir}/lisp; cd .. | 263 cd .. |
250 | 264 cd .. |
251 bootstrap-src: | 265 cd leim |
252 cd src; $(MAKE) $(MFLAGS) bootstrap; cd .. | 266 $(MAKE) $(MFLAGS) maintainer-clean |
253 | 267 cd .. |
254 ### Used for `bootstrap' to avoid deleting existing dumped Emacs executables. | 268 cd lisp |
255 bootstrap-clean-before: FRC | 269 $(MAKE) $(MFLAGS) bootstrap-clean |
256 cd src; $(MAKE) $(MFLAGS) mostlyclean; cd .. | 270 cd .. |
257 cd lib-src; $(MAKE) $(MFLAGS) clean; cd .. | 271 ${top_bootclean} |
258 -cd doc/emacs; $(MAKE) $(MFLAGS) clean; cd .. | 272 |
259 -cd misc; $(MAKE) $(MFLAGS) clean; cd .. | 273 bootstrap: bootstrap-clean FRC |
260 -cd lispref; $(MAKE) $(MFLAGS) clean; cd .. | 274 config msdos |
261 -cd lispintro; $(MAKE) $(MFLAGS) clean; cd ..; cd .. | 275 $(MAKE) $(MFLAGS) info all |
262 cd leim; if exist Makefile redir $(MAKE) $(MFLAGS) clean; cd .. | |
263 | |
264 bootstrap-clean-after: | |
265 cd src; $(MAKE) $(MFLAGS) mostlyclean; cd .. | |
266 | 276 |
267 # arch-tag: 6fee5130-4c53-46c6-93d3-d0ea852298b9 | 277 # arch-tag: 6fee5130-4c53-46c6-93d3-d0ea852298b9 |