annotate msdos/mainmake.v2 @ 37492:b9cea35cf91f

(save_excursion_restore): Don't use XBUFFER on a non-buffer.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 26 Apr 2001 12:37:03 +0000
parents 40a7360c9f8d
children 6c5d7bb4a940
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15014
5894f7cb55e9 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 15009
diff changeset
1 # Top-level Makefile for Emacs under MS-DOS/DJGPP v2.0 or higher. -*-makefile-*-
36236
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
2
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
3 # Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
4
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
5 # This file is part of GNU Emacs.
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
6
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
7 # GNU Emacs is free software; you can redistribute it and/or modify
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
8 # it under the terms of the GNU General Public License as published by
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
9 # the Free Software Foundation; either version 2, or (at your option)
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
10 # any later version.
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
11
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
12 # GNU Emacs is distributed in the hope that it will be useful,
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
15 # GNU General Public License for more details.
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
16
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
17 # You should have received a copy of the GNU General Public License
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
18 # along with GNU Emacs; see the file COPYING. If not, write to
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
19 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
20 # Boston, MA 02111-1307, USA.
40a7360c9f8d Add copyright notice.
Eli Zaretskii <eliz@gnu.org>
parents: 31054
diff changeset
21
14995
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22 # make all to compile and build Emacs.
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
23 # make install to install it.
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24 # make TAGS to update tags tables.
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25 #
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26 # make clean or make mostlyclean
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 # Delete all files from the current directory that are normally
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 # created by building the program. Don't delete the files that
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 # record the configuration. Also preserve files that could be made
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 # by building, but normally aren't because the distribution comes
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 # with them.
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 #
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33 # Delete `.dvi' files here if they are not part of the distribution.
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 #
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35 # make distclean
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36 # Delete all files from the current directory that are created by
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37 # configuring or building the program. If you have unpacked the
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38 # source and built the program without creating any other files,
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
39 # `make distclean' should leave only the files that were in the
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40 # distribution.
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41 #
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
42 # make realclean
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
43 # Delete everything from the current directory that can be
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
44 # reconstructed with this Makefile. This typically includes
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
45 # everything deleted by distclean, plus more: C source files
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
46 # produced by Bison, tags tables, info files, and so on.
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
47 #
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
48 # make extraclean
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49 # Still more severe - delete backup and autosave files, too.
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50
23496
1518b5946f9f Forcibly set SHELL and MAKESHELL to force Make to use
Eli Zaretskii <eliz@gnu.org>
parents: 21934
diff changeset
51 # This gork is required for those who use a Unix-style shell, and
1518b5946f9f Forcibly set SHELL and MAKESHELL to force Make to use
Eli Zaretskii <eliz@gnu.org>
parents: 21934
diff changeset
52 # have SHELL in the environment pointing to it. Here we force
1518b5946f9f Forcibly set SHELL and MAKESHELL to force Make to use
Eli Zaretskii <eliz@gnu.org>
parents: 21934
diff changeset
53 # Make to use COMMAND.COM instead. This Makefile won't work otherwise.
24908
075da7e5be80 (SHELL, MAKESHELL): Don't use /dos/command, it can
Eli Zaretskii <eliz@gnu.org>
parents: 24071
diff changeset
54 # (The /xyzzy directory is used to minimize the chance that someone
075da7e5be80 (SHELL, MAKESHELL): Don't use /dos/command, it can
Eli Zaretskii <eliz@gnu.org>
parents: 24071
diff changeset
55 # actually has such a directory with an incompatible command.com. We
075da7e5be80 (SHELL, MAKESHELL): Don't use /dos/command, it can
Eli Zaretskii <eliz@gnu.org>
parents: 24071
diff changeset
56 # used to have /dos there, but some Windows installations have an old
075da7e5be80 (SHELL, MAKESHELL): Don't use /dos/command, it can
Eli Zaretskii <eliz@gnu.org>
parents: 24071
diff changeset
57 # version of DOS stashed in that directory, and command.com from there
075da7e5be80 (SHELL, MAKESHELL): Don't use /dos/command, it can
Eli Zaretskii <eliz@gnu.org>
parents: 24071
diff changeset
58 # won't run on Windows, complaining about "Incorrect DOS version".
075da7e5be80 (SHELL, MAKESHELL): Don't use /dos/command, it can
Eli Zaretskii <eliz@gnu.org>
parents: 24071
diff changeset
59 # Make will look up PATH for the shell executable, so the directory name
075da7e5be80 (SHELL, MAKESHELL): Don't use /dos/command, it can
Eli Zaretskii <eliz@gnu.org>
parents: 24071
diff changeset
60 # is not important.)
075da7e5be80 (SHELL, MAKESHELL): Don't use /dos/command, it can
Eli Zaretskii <eliz@gnu.org>
parents: 24071
diff changeset
61 SHELL=/xyzzy/command
075da7e5be80 (SHELL, MAKESHELL): Don't use /dos/command, it can
Eli Zaretskii <eliz@gnu.org>
parents: 24071
diff changeset
62 MAKESHELL=/xyzzy/command
23496
1518b5946f9f Forcibly set SHELL and MAKESHELL to force Make to use
Eli Zaretskii <eliz@gnu.org>
parents: 21934
diff changeset
63
14995
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64 # Generate a full pathname of the top-level installation directory
21483
c6d7001a262c Determine emacs-version from lisp/version.el. Pass it to
Eli Zaretskii <eliz@gnu.org>
parents: 20282
diff changeset
65 top_srcdir := $(subst \,/,$(shell cd))
c6d7001a262c Determine emacs-version from lisp/version.el. Pass it to
Eli Zaretskii <eliz@gnu.org>
parents: 20282
diff changeset
66
c6d7001a262c Determine emacs-version from lisp/version.el. Pass it to
Eli Zaretskii <eliz@gnu.org>
parents: 20282
diff changeset
67 # Find out which version of Emacs this is.
c6d7001a262c Determine emacs-version from lisp/version.el. Pass it to
Eli Zaretskii <eliz@gnu.org>
parents: 20282
diff changeset
68 version := ${shell sed -n -e '/(defconst emacs-version/s/^[^"]*\("[^"]*"\).*/\1/p' lisp/version.el}
14995
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
69
20282
6de74098af01 (man): New target to build the manual.
Eli Zaretskii <eliz@gnu.org>
parents: 18768
diff changeset
70 all: lib-src src man
14995
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
72 lib-src: FRC
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
73 cd lib-src
21483
c6d7001a262c Determine emacs-version from lisp/version.el. Pass it to
Eli Zaretskii <eliz@gnu.org>
parents: 20282
diff changeset
74 $(MAKE) top_srcdir=${top_srcdir} version=${version}
14995
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
75 cd ..
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
76
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
77 src: FRC
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
78 cd src
21483
c6d7001a262c Determine emacs-version from lisp/version.el. Pass it to
Eli Zaretskii <eliz@gnu.org>
parents: 20282
diff changeset
79 $(MAKE) top_srcdir=${top_srcdir}
30535
442861d7c78a (src): Make the rule faster by using a single djecho
Eli Zaretskii <eliz@gnu.org>
parents: 28768
diff changeset
80 djecho -s '/-geometry/s,^.*,set environment HOME $(top_srcdir),' \
442861d7c78a (src): Make the rule faster by using a single djecho
Eli Zaretskii <eliz@gnu.org>
parents: 28768
diff changeset
81 '/environment *TERM/s/^.*/set environment TERM internal/' \
442861d7c78a (src): Make the rule faster by using a single djecho
Eli Zaretskii <eliz@gnu.org>
parents: 28768
diff changeset
82 '/x_error_quitter/s/^.*/set environment NAME root/' >gdb.sed
442861d7c78a (src): Make the rule faster by using a single djecho
Eli Zaretskii <eliz@gnu.org>
parents: 28768
diff changeset
83 sed -f gdb.sed _gdbinit >gdb.tmp
30599
296c06699a96 (src): Put gdb.tmp after -a, since -a requires an argument.
Eli Zaretskii <eliz@gnu.org>
parents: 30535
diff changeset
84 djecho -a gdb.tmp -s 'set environment USER root' \
296c06699a96 (src): Put gdb.tmp after -a, since -a requires an argument.
Eli Zaretskii <eliz@gnu.org>
parents: 30535
diff changeset
85 'set environment EMACSPATH $(top_srcdir)/bin' \
296c06699a96 (src): Put gdb.tmp after -a, since -a requires an argument.
Eli Zaretskii <eliz@gnu.org>
parents: 30535
diff changeset
86 'set environment SHELL $(subst \,/,$(COMSPEC))' \
296c06699a96 (src): Put gdb.tmp after -a, since -a requires an argument.
Eli Zaretskii <eliz@gnu.org>
parents: 30535
diff changeset
87 'set environment PATH $(subst \,/,$(PATH))'
14995
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
88 update gdb.tmp gdb.ini
15024
46fab7ac485b (src): Create a file with sed commands instead of using
Richard M. Stallman <rms@gnu.org>
parents: 15014
diff changeset
89 rm -f gdb.tmp gdb.sed
14995
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 cd ..
24019
4946582b4411 (src): Build files in leim if leim/Makefile exists.
Eli Zaretskii <eliz@gnu.org>
parents: 23662
diff changeset
91 if exist leim\Makefile redir $(MAKE) -C leim top_srcdir=${top_srcdir}
14995
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
92
20282
6de74098af01 (man): New target to build the manual.
Eli Zaretskii <eliz@gnu.org>
parents: 18768
diff changeset
93 man: FRC
6de74098af01 (man): New target to build the manual.
Eli Zaretskii <eliz@gnu.org>
parents: 18768
diff changeset
94 cd man
21483
c6d7001a262c Determine emacs-version from lisp/version.el. Pass it to
Eli Zaretskii <eliz@gnu.org>
parents: 20282
diff changeset
95 $(MAKE) top_srcdir=${top_srcdir}
20282
6de74098af01 (man): New target to build the manual.
Eli Zaretskii <eliz@gnu.org>
parents: 18768
diff changeset
96 cd ..
6de74098af01 (man): New target to build the manual.
Eli Zaretskii <eliz@gnu.org>
parents: 18768
diff changeset
97
14995
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98 install: all
20282
6de74098af01 (man): New target to build the manual.
Eli Zaretskii <eliz@gnu.org>
parents: 18768
diff changeset
99 if not exist bin\nul md bin
14995
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
100 cd lib-src
30535
442861d7c78a (src): Make the rule faster by using a single djecho
Eli Zaretskii <eliz@gnu.org>
parents: 28768
diff changeset
101 command.com /c >/dev/null for %p in (hexl etags ctags b2m ebrowse) do\
442861d7c78a (src): Make the rule faster by using a single djecho
Eli Zaretskii <eliz@gnu.org>
parents: 28768
diff changeset
102 if exist %p.exe mv -f %p.exe ../bin
24071
8db408246555 (install): Use update instead of sed to install fns.el.
Eli Zaretskii <eliz@gnu.org>
parents: 24047
diff changeset
103 if exist fns.el update fns.el ../bin/fns.el
14995
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
104 cd ..
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
105 cd src
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
106 stubify emacs
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
107 stubedit emacs.exe minstack=512k
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
108 mv -f emacs.exe ../bin/
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109 cd ..
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
110
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
111 FRC:
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
112
31054
0eab133958e6 (TAGS): Don't use [a-zA-Z]*, as it causes wildcard
Eli Zaretskii <eliz@gnu.org>
parents: 30599
diff changeset
113 # We cannot use [a-zA-Z]* like the mainline distribution does, because
0eab133958e6 (TAGS): Don't use [a-zA-Z]*, as it causes wildcard
Eli Zaretskii <eliz@gnu.org>
parents: 30599
diff changeset
114 # that causes all file names to be returned in upper-case on DOS...
15781
5cd40832a444 (TAGS): Make sure bin/etags.exe is current. Make
Richard M. Stallman <rms@gnu.org>
parents: 15024
diff changeset
115 TAGS tags: lib-src FRC
5cd40832a444 (TAGS): Make sure bin/etags.exe is current. Make
Richard M. Stallman <rms@gnu.org>
parents: 15024
diff changeset
116 cd lib-src
5cd40832a444 (TAGS): Make sure bin/etags.exe is current. Make
Richard M. Stallman <rms@gnu.org>
parents: 15024
diff changeset
117 if exist etags.exe mv -f etags.exe ../bin
5cd40832a444 (TAGS): Make sure bin/etags.exe is current. Make
Richard M. Stallman <rms@gnu.org>
parents: 15024
diff changeset
118 cd ..
14995
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
119 cd lisp
31054
0eab133958e6 (TAGS): Don't use [a-zA-Z]*, as it causes wildcard
Eli Zaretskii <eliz@gnu.org>
parents: 30599
diff changeset
120 ../bin/etags .../*.el
14995
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121 cd ..
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
122 cd src
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
123 ../bin/etags --include=../lisp/TAGS \
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
124 '--regex=/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' *.c *.h s/msdos.h m/intel386.h
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
125 cd ..
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
126 ./bin/etags --include=src/TAGS
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
127
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
128 check:
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
129 @echo "We don't have any tests for GNU Emacs yet."
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131 clean:
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132 cd lib-src
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133 $(MAKE) clean
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
134 cd ..
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
135 cd src
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
136 $(MAKE) clean
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
137 cd ..
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
138 cd oldxmenu
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
139 -$(MAKE) clean
f355434dee03 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140 cd ..
24019
4946582b4411 (src): Build files in leim if leim/Makefile exists.
Eli Zaretskii <eliz@gnu.org>
parents: 23662
diff changeset
141 cd leim
4946582b4411 (src): Build files in leim if leim/Makefile exists.
Eli Zaretskii <eliz@gnu.org>
parents: 23662
diff changeset
142 if exist Makefile redir $(MAKE) clean
4946582b4411 (src): Build files in leim if leim/Makefile exists.
Eli Zaretskii <eliz@gnu.org>
parents: 23662
diff changeset
143 cd ..