Commit | Line | Data |
---|---|---|
4a7c8265 | 1 | # Top-level Makefile for Emacs under MS-DOS/DJGPP v2.0 or higher. -*-makefile-*- |
7121a5e1 | 2 | |
162deabe EZ |
3 | # Copyright (C) 1996,1997,1998,1999,2000,2001,2002 |
4 | # Free Software Foundation, Inc. | |
7121a5e1 EZ |
5 | |
6 | # This file is part of GNU Emacs. | |
7 | ||
8 | # GNU Emacs is free software; you can redistribute it and/or modify | |
9 | # it under the terms of the GNU General Public License as published by | |
10 | # the Free Software Foundation; either version 2, or (at your option) | |
11 | # any later version. | |
12 | ||
13 | # GNU Emacs is distributed in the hope that it will be useful, | |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | # GNU General Public License for more details. | |
17 | ||
18 | # You should have received a copy of the GNU General Public License | |
19 | # along with GNU Emacs; see the file COPYING. If not, write to | |
4fc5845f LK |
20 | # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
21 | # Boston, MA 02110-1301, USA. | |
7121a5e1 | 22 | |
2d0300ef | 23 | # make all to compile and build Emacs. |
406865b8 | 24 | # make install to install it (installs in-place, in `bin' subdir of top dir). |
2d0300ef RS |
25 | # make TAGS to update tags tables. |
26 | # | |
27 | # make clean or make mostlyclean | |
28 | # Delete all files from the current directory that are normally | |
29 | # created by building the program. Don't delete the files that | |
30 | # record the configuration. Also preserve files that could be made | |
31 | # by building, but normally aren't because the distribution comes | |
32 | # with them. | |
33 | # | |
34 | # Delete `.dvi' files here if they are not part of the distribution. | |
177c0ea7 | 35 | # |
2d0300ef RS |
36 | # make distclean |
37 | # Delete all files from the current directory that are created by | |
38 | # configuring or building the program. If you have unpacked the | |
39 | # source and built the program without creating any other files, | |
40 | # `make distclean' should leave only the files that were in the | |
41 | # distribution. | |
177c0ea7 | 42 | # |
406865b8 | 43 | # make maintainer-clean |
2d0300ef RS |
44 | # Delete everything from the current directory that can be |
45 | # reconstructed with this Makefile. This typically includes | |
406865b8 EZ |
46 | # everything deleted by distclean, plus more: *.elc files, |
47 | # C source files produced by Bison, tags tables, info files, | |
48 | # and so on. | |
2d0300ef RS |
49 | # |
50 | # make extraclean | |
51 | # Still more severe - delete backup and autosave files, too. | |
52 | ||
32372ef8 EZ |
53 | # This gork is required for those who use a Unix-style shell, and |
54 | # have SHELL in the environment pointing to it. Here we force | |
55 | # Make to use COMMAND.COM instead. This Makefile won't work otherwise. | |
94b04180 EZ |
56 | # (The /xyzzy directory is used to minimize the chance that someone |
57 | # actually has such a directory with an incompatible command.com. We | |
58 | # used to have /dos there, but some Windows installations have an old | |
59 | # version of DOS stashed in that directory, and command.com from there | |
60 | # won't run on Windows, complaining about "Incorrect DOS version". | |
61 | # Make will look up PATH for the shell executable, so the directory name | |
62 | # is not important.) | |
63 | SHELL=/xyzzy/command | |
64 | MAKESHELL=/xyzzy/command | |
32372ef8 | 65 | |
2d0300ef | 66 | # Generate a full pathname of the top-level installation directory |
de219b90 EZ |
67 | top_srcdir := $(subst \,/,$(shell cd)) |
68 | ||
69 | # Find out which version of Emacs this is. | |
70 | version := ${shell sed -n -e '/(defconst emacs-version/s/^[^"]*\("[^"]*"\).*/\1/p' lisp/version.el} | |
2d0300ef | 71 | |
9cf57fc9 | 72 | all: maybe_bootstrap lib-src src man lispref lispintro |
2d0300ef RS |
73 | |
74 | lib-src: FRC | |
75 | cd lib-src | |
de219b90 | 76 | $(MAKE) top_srcdir=${top_srcdir} version=${version} |
2d0300ef RS |
77 | cd .. |
78 | ||
79 | src: FRC | |
80 | cd src | |
de219b90 | 81 | $(MAKE) top_srcdir=${top_srcdir} |
a9530035 EZ |
82 | djecho -s '/-geometry/s,^.*,set environment HOME $(top_srcdir),' \ |
83 | '/environment *TERM/s/^.*/set environment TERM internal/' \ | |
84 | '/x_error_quitter/s/^.*/set environment NAME root/' >gdb.sed | |
85 | sed -f gdb.sed _gdbinit >gdb.tmp | |
efb29aff EZ |
86 | djecho -a gdb.tmp -s 'set environment USER root' \ |
87 | 'set environment EMACSPATH $(top_srcdir)/bin' \ | |
88 | 'set environment SHELL $(subst \,/,$(COMSPEC))' \ | |
89 | 'set environment PATH $(subst \,/,$(PATH))' | |
2d0300ef | 90 | update gdb.tmp gdb.ini |
d04127d3 | 91 | rm -f gdb.tmp gdb.sed |
2d0300ef | 92 | cd .. |
0ccc59eb | 93 | if exist leim\Makefile redir $(MAKE) -C leim top_srcdir=${top_srcdir} |
2d0300ef | 94 | |
aae3cbdf | 95 | man lispref lispintro: FRC |
db441627 | 96 | cd $@ |
ca39f6c1 | 97 | $(MAKE) top_srcdir=${top_srcdir} info |
9830885f EZ |
98 | cd .. |
99 | ||
2d0300ef | 100 | install: all |
9830885f | 101 | if not exist bin\nul md bin |
2d0300ef | 102 | cd lib-src |
a9530035 EZ |
103 | command.com /c >/dev/null for %p in (hexl etags ctags b2m ebrowse) do\ |
104 | if exist %p.exe mv -f %p.exe ../bin | |
b712940a | 105 | if exist fns.el update fns.el ../bin/fns.el |
2d0300ef RS |
106 | cd .. |
107 | cd src | |
108 | stubify emacs | |
109 | stubedit emacs.exe minstack=512k | |
110 | mv -f emacs.exe ../bin/ | |
111 | cd .. | |
fc406406 EZ |
112 | djecho -s "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)" \ |
113 | " (normal-top-level-add-subdirs-to-load-path))" \ | |
114 | > ./subdirs.el | |
115 | if not exist .\site-lisp\subdirs.el \ | |
116 | update ./subdirs.el ./site-lisp/subdirs.el | |
117 | rm -f ./subdirs.el | |
2d0300ef RS |
118 | |
119 | FRC: | |
120 | ||
838b9528 EZ |
121 | # We cannot use [a-zA-Z]* like the mainline distribution does, because |
122 | # that causes all file names to be returned in upper-case on DOS... | |
53f7e7ad RS |
123 | TAGS tags: lib-src FRC |
124 | cd lib-src | |
125 | if exist etags.exe mv -f etags.exe ../bin | |
126 | cd .. | |
2d0300ef | 127 | cd lisp |
838b9528 | 128 | ../bin/etags .../*.el |
2d0300ef RS |
129 | cd .. |
130 | cd src | |
131 | ../bin/etags --include=../lisp/TAGS \ | |
132 | '--regex=/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' *.c *.h s/msdos.h m/intel386.h | |
133 | cd .. | |
134 | ./bin/etags --include=src/TAGS | |
135 | ||
136 | check: | |
137 | @echo "We don't have any tests for GNU Emacs yet." | |
138 | ||
406865b8 | 139 | clean mostlyclean: |
2d0300ef | 140 | cd lib-src |
406865b8 | 141 | $(MAKE) $(MFLAGS) $@ |
2d0300ef RS |
142 | cd .. |
143 | cd src | |
406865b8 | 144 | $(MAKE) $(MFLAGS) $@ |
2d0300ef RS |
145 | cd .. |
146 | cd oldxmenu | |
406865b8 EZ |
147 | -$(MAKE) $(MFLAGS) $@ |
148 | cd .. | |
149 | cd man | |
150 | -$(MAKE) $(MFLAGS) $@ | |
151 | cd .. | |
152 | cd lispref | |
153 | -$(MAKE) $(MFLAGS) $@ | |
154 | cd .. | |
155 | cd lispintro | |
156 | -$(MAKE) $(MFLAGS) $@ | |
2d0300ef | 157 | cd .. |
0ccc59eb | 158 | cd leim |
406865b8 | 159 | if exist Makefile redir $(MAKE) $(MFLAGS) $@ |
0ccc59eb | 160 | cd .. |
406865b8 | 161 | -$(MAKE) $(MFLAGS) $@ |
f72a0a4a | 162 | |
406865b8 EZ |
163 | top_distclean=rm -f Makefile */Makefile src/_gdbinit |
164 | ||
165 | distclean maintainer-clean: FRC | |
166 | cd src | |
167 | $(MAKE) $(MFLAGS) $@ | |
168 | cd .. | |
169 | cd oldxmenu | |
170 | -$(MAKE) $(MFLAGS) $@ | |
171 | cd .. | |
172 | cd lib-src | |
173 | $(MAKE) $(MFLAGS) $@ | |
174 | cd .. | |
175 | cd man | |
176 | -$(MAKE) $(MFLAGS) $@ | |
177 | cd .. | |
178 | cd lispref | |
179 | -$(MAKE) $(MFLAGS) $@ | |
180 | cd .. | |
181 | cd lispintro | |
182 | -$(MAKE) $(MFLAGS) $@ | |
183 | cd .. | |
184 | cd leim | |
185 | if exist Makefile redir $(MAKE) $(MFLAGS) $@ | |
186 | cd .. | |
187 | cd lisp | |
188 | $(MAKE) $(MFLAGS) $@ | |
189 | cd .. | |
190 | ${top_distclean} | |
191 | ||
192 | extraclean: | |
193 | cd src | |
194 | $(MAKE) $(MFLAGS) $@ | |
195 | cd .. | |
196 | cd oldxmenu | |
197 | -$(MAKE) $(MFLAGS) $@ | |
198 | cd .. | |
199 | cd lib-src | |
200 | $(MAKE) $(MFLAGS) $@ | |
201 | cd .. | |
202 | cd man | |
203 | -$(MAKE) $(MFLAGS) $@ | |
204 | cd .. | |
205 | cd lispref | |
206 | -$(MAKE) $(MFLAGS) $@ | |
207 | cd .. | |
208 | cd lispintro | |
209 | -$(MAKE) $(MFLAGS) $@ | |
210 | cd .. | |
211 | cd leim | |
212 | if exist Makefile redir $(MAKE) $(MFLAGS) $@ | |
213 | cd .. | |
214 | cd lisp | |
215 | $(MAKE) $(MFLAGS) $@ | |
216 | cd .. | |
217 | ${top_distclean} | |
218 | -rm -f *~ #* | |
219 | ||
220 | .PHONY: bootstrap bootstrap-lisp-1 bootstrap-src bootstrap-lisp bootstrap-clean | |
221 | .PHONY: maybe_bootstrap bootfast | |
f72a0a4a EZ |
222 | |
223 | maybe_bootstrap: | |
b9c1fa2e | 224 | @if not exist lisp\abbrev.elc djecho \ |
f72a0a4a | 225 | "Some *.elc files are missing. You should do a `make bootstrap'." |
b9c1fa2e | 226 | @if not exist lisp\abbrev.elc redir -e /dev/null -oe redir fail-this-make.exe |
f72a0a4a EZ |
227 | |
228 | bootstrap: bootstrap-clean-before bootstrap-lisp-1 bootstrap-src bootstrap-lisp bootstrap-clean-after all info | |
406865b8 EZ |
229 | cd lisp; $(MAKE) $(MFLAGS) bootstrap-after; cd .. |
230 | ||
231 | bootfast: bootstrap-clean-before bootstrap-src bootstrap-lisp bootstrap-clean-after all info | |
232 | cd lisp; $(MAKE) $(MFLAGS) bootstrap-after; cd .. | |
f72a0a4a EZ |
233 | |
234 | bootstrap-lisp-1: | |
1af6e3a9 | 235 | cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean; cd .. |
f72a0a4a EZ |
236 | |
237 | bootstrap-lisp: | |
fae44638 | 238 | cd lisp; $(MAKE) $(MFLAGS) bootstrap EMACS=${top_srcdir}/src/b-emacs.exe lisp=${top_srcdir}/lisp; cd .. |
f72a0a4a EZ |
239 | |
240 | bootstrap-src: | |
1af6e3a9 | 241 | cd src; $(MAKE) $(MFLAGS) bootstrap; cd .. |
f72a0a4a EZ |
242 | |
243 | ### Used for `bootstrap' to avoid deleting existing dumped Emacs executables. | |
244 | bootstrap-clean-before: FRC | |
1af6e3a9 EZ |
245 | cd src; $(MAKE) $(MFLAGS) mostlyclean; cd .. |
246 | cd lib-src; $(MAKE) $(MFLAGS) clean; cd .. | |
406865b8 EZ |
247 | -cd man; $(MAKE) $(MFLAGS) clean; cd .. |
248 | -cd lispref; $(MAKE) $(MFLAGS) clean; cd .. | |
249 | -cd lispintro; $(MAKE) $(MFLAGS) clean; cd .. | |
250 | cd leim; if exist Makefile redir $(MAKE) $(MFLAGS) clean; cd .. | |
f72a0a4a EZ |
251 | |
252 | bootstrap-clean-after: | |
1af6e3a9 | 253 | cd src; $(MAKE) $(MFLAGS) mostlyclean; cd .. |
ab5796a9 MB |
254 | |
255 | # arch-tag: 6fee5130-4c53-46c6-93d3-d0ea852298b9 |