Commit | Line | Data |
---|---|---|
4a7c8265 | 1 | # Top-level Makefile for Emacs under MS-DOS/DJGPP v2.0 or higher. -*-makefile-*- |
2d0300ef RS |
2 | # |
3 | # make all to compile and build Emacs. | |
4 | # make install to install it. | |
5 | # make TAGS to update tags tables. | |
6 | # | |
7 | # make clean or make mostlyclean | |
8 | # Delete all files from the current directory that are normally | |
9 | # created by building the program. Don't delete the files that | |
10 | # record the configuration. Also preserve files that could be made | |
11 | # by building, but normally aren't because the distribution comes | |
12 | # with them. | |
13 | # | |
14 | # Delete `.dvi' files here if they are not part of the distribution. | |
15 | # | |
16 | # make distclean | |
17 | # Delete all files from the current directory that are created by | |
18 | # configuring or building the program. If you have unpacked the | |
19 | # source and built the program without creating any other files, | |
20 | # `make distclean' should leave only the files that were in the | |
21 | # distribution. | |
22 | # | |
23 | # make realclean | |
24 | # Delete everything from the current directory that can be | |
25 | # reconstructed with this Makefile. This typically includes | |
26 | # everything deleted by distclean, plus more: C source files | |
27 | # produced by Bison, tags tables, info files, and so on. | |
28 | # | |
29 | # make extraclean | |
30 | # Still more severe - delete backup and autosave files, too. | |
31 | ||
32372ef8 EZ |
32 | # This gork is required for those who use a Unix-style shell, and |
33 | # have SHELL in the environment pointing to it. Here we force | |
34 | # Make to use COMMAND.COM instead. This Makefile won't work otherwise. | |
94b04180 EZ |
35 | # (The /xyzzy directory is used to minimize the chance that someone |
36 | # actually has such a directory with an incompatible command.com. We | |
37 | # used to have /dos there, but some Windows installations have an old | |
38 | # version of DOS stashed in that directory, and command.com from there | |
39 | # won't run on Windows, complaining about "Incorrect DOS version". | |
40 | # Make will look up PATH for the shell executable, so the directory name | |
41 | # is not important.) | |
42 | SHELL=/xyzzy/command | |
43 | MAKESHELL=/xyzzy/command | |
32372ef8 | 44 | |
2d0300ef | 45 | # Generate a full pathname of the top-level installation directory |
de219b90 EZ |
46 | top_srcdir := $(subst \,/,$(shell cd)) |
47 | ||
48 | # Find out which version of Emacs this is. | |
49 | version := ${shell sed -n -e '/(defconst emacs-version/s/^[^"]*\("[^"]*"\).*/\1/p' lisp/version.el} | |
2d0300ef | 50 | |
9830885f | 51 | all: lib-src src man |
2d0300ef RS |
52 | |
53 | lib-src: FRC | |
54 | cd lib-src | |
de219b90 | 55 | $(MAKE) top_srcdir=${top_srcdir} version=${version} |
2d0300ef RS |
56 | cd .. |
57 | ||
58 | src: FRC | |
59 | cd src | |
de219b90 | 60 | $(MAKE) top_srcdir=${top_srcdir} |
a9530035 EZ |
61 | djecho -s '/-geometry/s,^.*,set environment HOME $(top_srcdir),' \ |
62 | '/environment *TERM/s/^.*/set environment TERM internal/' \ | |
63 | '/x_error_quitter/s/^.*/set environment NAME root/' >gdb.sed | |
64 | sed -f gdb.sed _gdbinit >gdb.tmp | |
efb29aff EZ |
65 | djecho -a gdb.tmp -s 'set environment USER root' \ |
66 | 'set environment EMACSPATH $(top_srcdir)/bin' \ | |
67 | 'set environment SHELL $(subst \,/,$(COMSPEC))' \ | |
68 | 'set environment PATH $(subst \,/,$(PATH))' | |
2d0300ef | 69 | update gdb.tmp gdb.ini |
d04127d3 | 70 | rm -f gdb.tmp gdb.sed |
2d0300ef | 71 | cd .. |
0ccc59eb | 72 | if exist leim\Makefile redir $(MAKE) -C leim top_srcdir=${top_srcdir} |
2d0300ef | 73 | |
9830885f EZ |
74 | man: FRC |
75 | cd man | |
de219b90 | 76 | $(MAKE) top_srcdir=${top_srcdir} |
9830885f EZ |
77 | cd .. |
78 | ||
2d0300ef | 79 | install: all |
9830885f | 80 | if not exist bin\nul md bin |
2d0300ef | 81 | cd lib-src |
a9530035 EZ |
82 | command.com /c >/dev/null for %p in (hexl etags ctags b2m ebrowse) do\ |
83 | if exist %p.exe mv -f %p.exe ../bin | |
b712940a | 84 | if exist fns.el update fns.el ../bin/fns.el |
2d0300ef RS |
85 | cd .. |
86 | cd src | |
87 | stubify emacs | |
88 | stubedit emacs.exe minstack=512k | |
89 | mv -f emacs.exe ../bin/ | |
90 | cd .. | |
91 | ||
92 | FRC: | |
93 | ||
838b9528 EZ |
94 | # We cannot use [a-zA-Z]* like the mainline distribution does, because |
95 | # that causes all file names to be returned in upper-case on DOS... | |
53f7e7ad RS |
96 | TAGS tags: lib-src FRC |
97 | cd lib-src | |
98 | if exist etags.exe mv -f etags.exe ../bin | |
99 | cd .. | |
2d0300ef | 100 | cd lisp |
838b9528 | 101 | ../bin/etags .../*.el |
2d0300ef RS |
102 | cd .. |
103 | cd src | |
104 | ../bin/etags --include=../lisp/TAGS \ | |
105 | '--regex=/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' *.c *.h s/msdos.h m/intel386.h | |
106 | cd .. | |
107 | ./bin/etags --include=src/TAGS | |
108 | ||
109 | check: | |
110 | @echo "We don't have any tests for GNU Emacs yet." | |
111 | ||
112 | clean: | |
113 | cd lib-src | |
114 | $(MAKE) clean | |
115 | cd .. | |
116 | cd src | |
117 | $(MAKE) clean | |
118 | cd .. | |
119 | cd oldxmenu | |
120 | -$(MAKE) clean | |
121 | cd .. | |
0ccc59eb EZ |
122 | cd leim |
123 | if exist Makefile redir $(MAKE) clean | |
124 | cd .. |