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. | |
80106caa EZ |
35 | SHELL=/dos/command |
36 | MAKESHELL=/dos/command | |
32372ef8 | 37 | |
2d0300ef | 38 | # Generate a full pathname of the top-level installation directory |
de219b90 EZ |
39 | top_srcdir := $(subst \,/,$(shell cd)) |
40 | ||
41 | # Find out which version of Emacs this is. | |
42 | version := ${shell sed -n -e '/(defconst emacs-version/s/^[^"]*\("[^"]*"\).*/\1/p' lisp/version.el} | |
2d0300ef | 43 | |
9830885f | 44 | all: lib-src src man |
2d0300ef RS |
45 | |
46 | lib-src: FRC | |
47 | cd lib-src | |
de219b90 | 48 | $(MAKE) top_srcdir=${top_srcdir} version=${version} |
2d0300ef RS |
49 | cd .. |
50 | ||
51 | src: FRC | |
52 | cd src | |
de219b90 | 53 | $(MAKE) top_srcdir=${top_srcdir} |
63d4cd24 | 54 | redir -o gdb.sed echo '/-geometry/s,^.*,set environment HOME $(top_srcdir),' |
d04127d3 RS |
55 | redir -oa gdb.sed echo '/environment *TERM/s/^.*/set environment TERM internal/' |
56 | redir -oa gdb.sed echo '/x_error_quitter/s/^.*/set environment NAME root/' | |
57 | redir -o gdb.tmp sed -f gdb.sed _gdbinit | |
2d0300ef | 58 | redir -oa gdb.tmp echo 'set environment USER root' |
63d4cd24 | 59 | redir -oa gdb.tmp echo 'set environment EMACSPATH $(top_srcdir)/bin' |
2d0300ef RS |
60 | redir -oa gdb.tmp echo 'set environment SHELL $(subst \,/,$(COMSPEC))' |
61 | redir -oa gdb.tmp echo 'set environment PATH $(subst \,/,$(PATH))' | |
62 | update gdb.tmp gdb.ini | |
d04127d3 | 63 | rm -f gdb.tmp gdb.sed |
2d0300ef | 64 | cd .. |
0ccc59eb | 65 | if exist leim\Makefile redir $(MAKE) -C leim top_srcdir=${top_srcdir} |
2d0300ef | 66 | |
9830885f EZ |
67 | man: FRC |
68 | cd man | |
de219b90 | 69 | $(MAKE) top_srcdir=${top_srcdir} |
9830885f EZ |
70 | cd .. |
71 | ||
2d0300ef | 72 | install: all |
9830885f | 73 | if not exist bin\nul md bin |
2d0300ef | 74 | cd lib-src |
d04127d3 RS |
75 | if exist hexl.exe mv -f hexl.exe ../bin |
76 | if exist etags.exe mv -f etags.exe ../bin | |
77 | if exist ctags.exe mv -f ctags.exe ../bin | |
78 | if exist b2m.exe mv -f b2m.exe ../bin | |
b712940a | 79 | if exist fns.el update fns.el ../bin/fns.el |
2d0300ef RS |
80 | cd .. |
81 | cd src | |
82 | stubify emacs | |
83 | stubedit emacs.exe minstack=512k | |
84 | mv -f emacs.exe ../bin/ | |
85 | cd .. | |
86 | ||
87 | FRC: | |
88 | ||
53f7e7ad RS |
89 | TAGS tags: lib-src FRC |
90 | cd lib-src | |
91 | if exist etags.exe mv -f etags.exe ../bin | |
92 | cd .. | |
2d0300ef | 93 | cd lisp |
b35c3bf6 | 94 | ../bin/etags [a-zA-Z]*.el [a-zA-Z]*/[a-zA-Z]*.el |
2d0300ef RS |
95 | cd .. |
96 | cd src | |
97 | ../bin/etags --include=../lisp/TAGS \ | |
98 | '--regex=/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' *.c *.h s/msdos.h m/intel386.h | |
99 | cd .. | |
100 | ./bin/etags --include=src/TAGS | |
101 | ||
102 | check: | |
103 | @echo "We don't have any tests for GNU Emacs yet." | |
104 | ||
105 | clean: | |
106 | cd lib-src | |
107 | $(MAKE) clean | |
108 | cd .. | |
109 | cd src | |
110 | $(MAKE) clean | |
111 | cd .. | |
112 | cd oldxmenu | |
113 | -$(MAKE) clean | |
114 | cd .. | |
0ccc59eb EZ |
115 | cd leim |
116 | if exist Makefile redir $(MAKE) clean | |
117 | cd .. |