(x_set_window_size): Don't use `None' with widgets; use
[emacs.git] / msdos / mainmake.v2
blobfc91310ef08bc004aac2b518aaaffcb7c6252e67
1 # Top-level Makefile for Emacs under MS-DOS/DJGPP v2.0 or higher. -*-makefile-*-
3 # Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
5 # This file is part of GNU Emacs.
7 # GNU Emacs is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
12 # GNU Emacs is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Emacs; see the file COPYING.  If not, write to
19 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 # Boston, MA 02111-1307, USA.
22 # make all      to compile and build Emacs.
23 # make install  to install it.
24 # make TAGS     to update tags tables.
26 # make clean  or  make mostlyclean
27 #      Delete all files from the current directory that are normally
28 #      created by building the program.  Don't delete the files that
29 #      record the configuration.  Also preserve files that could be made
30 #      by building, but normally aren't because the distribution comes
31 #      with them.
33 #      Delete `.dvi' files here if they are not part of the distribution.
34
35 # make distclean
36 #      Delete all files from the current directory that are created by
37 #      configuring or building the program.  If you have unpacked the
38 #      source and built the program without creating any other files,
39 #      `make distclean' should leave only the files that were in the
40 #      distribution.
41
42 # make realclean
43 #      Delete everything from the current directory that can be
44 #      reconstructed with this Makefile.  This typically includes
45 #      everything deleted by distclean, plus more: C source files
46 #      produced by Bison, tags tables, info files, and so on.
48 # make extraclean
49 #      Still more severe - delete backup and autosave files, too.
51 # This gork is required for those who use a Unix-style shell, and
52 # have SHELL in the environment pointing to it.  Here we force
53 # Make to use COMMAND.COM instead.  This Makefile won't work otherwise.
54 # (The /xyzzy directory is used to minimize the chance that someone
55 # actually has such a directory with an incompatible command.com.  We
56 # used to have /dos there, but some Windows installations have an old
57 # version of DOS stashed in that directory, and command.com from there
58 # won't run on Windows, complaining about "Incorrect DOS version".
59 # Make will look up PATH for the shell executable, so the directory name
60 # is not important.)
61 SHELL=/xyzzy/command
62 MAKESHELL=/xyzzy/command
64 # Generate a full pathname of the top-level installation directory
65 top_srcdir := $(subst \,/,$(shell cd))
67 # Find out which version of Emacs this is.
68 version := ${shell sed -n -e '/(defconst emacs-version/s/^[^"]*\("[^"]*"\).*/\1/p' lisp/version.el}
70 all:    lib-src src man
72 lib-src: FRC
73         cd lib-src
74         $(MAKE) top_srcdir=${top_srcdir} version=${version}
75         cd ..
77 src: FRC
78         cd src
79         $(MAKE) top_srcdir=${top_srcdir}
80         djecho -s '/-geometry/s,^.*,set environment HOME $(top_srcdir),' \
81                   '/environment *TERM/s/^.*/set environment TERM internal/' \
82                   '/x_error_quitter/s/^.*/set environment NAME root/' >gdb.sed
83         sed -f gdb.sed _gdbinit >gdb.tmp
84         djecho -a gdb.tmp -s 'set environment USER root' \
85                              'set environment EMACSPATH $(top_srcdir)/bin' \
86                              'set environment SHELL $(subst \,/,$(COMSPEC))' \
87                              'set environment PATH $(subst \,/,$(PATH))'
88         update gdb.tmp gdb.ini
89         rm -f gdb.tmp gdb.sed
90         cd ..
91         if exist leim\Makefile redir $(MAKE) -C leim top_srcdir=${top_srcdir}
93 man:    FRC
94         cd man
95         $(MAKE) top_srcdir=${top_srcdir}
96         cd ..
98 install: all
99         if not exist bin\nul md bin
100         cd lib-src
101         command.com /c >/dev/null for %p in (hexl etags ctags b2m ebrowse) do\
102            if exist %p.exe mv -f %p.exe ../bin
103         if exist fns.el update fns.el ../bin/fns.el
104         cd ..
105         cd src
106         stubify emacs
107         stubedit emacs.exe minstack=512k
108         mv -f emacs.exe ../bin/
109         cd ..
111 FRC:
113 # We cannot use [a-zA-Z]* like the mainline distribution does, because
114 # that causes all file names to be returned in upper-case on DOS...
115 TAGS tags:      lib-src FRC
116         cd lib-src
117         if exist etags.exe mv -f etags.exe ../bin
118         cd ..
119         cd lisp
120         ../bin/etags .../*.el
121         cd ..
122         cd src
123         ../bin/etags --include=../lisp/TAGS \
124         '--regex=/[     ]*DEFVAR_[A-Z_  (]+"\([^"]+\)"/' *.c *.h s/msdos.h m/intel386.h
125         cd ..
126         ./bin/etags --include=src/TAGS
128 check:
129         @echo "We don't have any tests for GNU Emacs yet."
131 clean:
132         cd lib-src
133         $(MAKE) clean
134         cd ..
135         cd src
136         $(MAKE) clean
137         cd ..
138         cd oldxmenu
139         -$(MAKE) clean
140         cd ..
141         cd leim
142         if exist Makefile redir $(MAKE) clean
143         cd ..