aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2001-08-31 10:31:22 +0000
committerEli Zaretskii2001-08-31 10:31:22 +0000
commitf466241d472a4db93178989b377228a82e86f0fb (patch)
tree2b089bdfd9a067afdd84cf8289fb9143998f2f82
parent6a58666f429d21dc4e068b1db5ccf1e124493a1e (diff)
downloademacs-f466241d472a4db93178989b377228a82e86f0fb.tar.gz
emacs-f466241d472a4db93178989b377228a82e86f0fb.zip
Convert EOLs to DOS format.
-rwxr-xr-xadmin/nt/makedist.bat244
-rw-r--r--nt/ChangeLog9
-rwxr-xr-xnt/configure.bat596
3 files changed, 429 insertions, 420 deletions
diff --git a/admin/nt/makedist.bat b/admin/nt/makedist.bat
index e756d16467e..f069a572f47 100755
--- a/admin/nt/makedist.bat
+++ b/admin/nt/makedist.bat
@@ -1,122 +1,122 @@
1@echo off 1@echo off
2 2
3set TAR=wtar 3set TAR=wtar
4 4
5rem Make a copy of current Emacs source 5rem Make a copy of current Emacs source
6if (%3) == () goto usage 6if (%3) == () goto usage
7if not (%4) == () goto %4 7if not (%4) == () goto %4
8if not (%4) == (src) goto :lisp 8if not (%4) == (src) goto :lisp
9 9
10:src 10:src
11 11
12echo Create full source distribution, excluding leim 12echo Create full source distribution, excluding leim
13%TAR% --exclude leim --exclude _marker --exclude DOC --exclude DOC-X --exclude TAGS --exclude bin --exclude obj --exclude obj-spd --exclude oo --exclude oo-spd --exclude *~ --exclude *.rej -cvf - emacs-%1 | gzip -9 > %2-src.tar.gz 13%TAR% --exclude leim --exclude _marker --exclude DOC --exclude DOC-X --exclude TAGS --exclude bin --exclude obj --exclude obj-spd --exclude oo --exclude oo-spd --exclude *~ --exclude *.rej -cvf - emacs-%1 | gzip -9 > %2-src.tar.gz
14if not (%4) == () goto end 14if not (%4) == () goto end
15 15
16:lisp 16:lisp
17echo Create limited elisp source distribution 17echo Create limited elisp source distribution
18%TAR% --exclude *.rej --exclude *.elc --exclude *~ -cvf - emacs-%1/lisp | gzip -9 > %2-lisp.tar.gz 18%TAR% --exclude *.rej --exclude *.elc --exclude *~ -cvf - emacs-%1/lisp | gzip -9 > %2-lisp.tar.gz
19if not (%4) == () goto end 19if not (%4) == () goto end
20 20
21:bin 21:bin
22 22
23set eld=emacs-%1/lisp 23set eld=emacs-%1/lisp
24 24
25rem Keep this list in sync with the DONTCOMPILE list in lisp/Makefile.in 25rem Keep this list in sync with the DONTCOMPILE list in lisp/Makefile.in
26 26
27set elfiles=%eld%/cus-load.el %eld%/cus-start.el %eld%/emacs-lisp/cl-specs.el %eld%/eshell/esh-maint.el %eld%/eshell/esh-groups.el %eld%/finder-inf.el %eld%/forms-d2.el %eld%/forms-pass.el %eld%/generic-x.el %eld%/international/latin-1.el %eld%/international/latin-2.el %eld%/international/latin-3.el %eld%/international/latin-4.el %eld%/international/latin-5.el %eld%/international/latin-8.el %eld%/international/latin-9.el %eld%/international/mule-conf.el %eld%/loaddefs.el %eld%/loadup.el %eld%/mail/blessmail.el %eld%/patcomp.el %eld%/paths.el %eld%/play/bruce.el %eld%/subdirs.el %eld%/term/internal.el %eld%/term/AT386.el %eld%/term/apollo.el %eld%/term/bobcat.el %eld%/term/iris-ansi.el %eld%/term/keyswap.el %eld%/term/linux.el %eld%/term/lk201.el %eld%/term/news.el %eld%/term/vt102.el %eld%/term/vt125.el %eld%/term/vt200.el %eld%/term/vt201.el %eld%/term/vt220.el %eld%/term/vt240.el %eld%/term/vt300.el %eld%/term/vt320.el %eld%/term/vt400.el %eld%/term/vt420.el %eld%/term/wyse50.el %eld%/term/xterm.el %eld%/version.el 27set elfiles=%eld%/cus-load.el %eld%/cus-start.el %eld%/emacs-lisp/cl-specs.el %eld%/eshell/esh-maint.el %eld%/eshell/esh-groups.el %eld%/finder-inf.el %eld%/forms-d2.el %eld%/forms-pass.el %eld%/generic-x.el %eld%/international/latin-1.el %eld%/international/latin-2.el %eld%/international/latin-3.el %eld%/international/latin-4.el %eld%/international/latin-5.el %eld%/international/latin-8.el %eld%/international/latin-9.el %eld%/international/mule-conf.el %eld%/loaddefs.el %eld%/loadup.el %eld%/mail/blessmail.el %eld%/patcomp.el %eld%/paths.el %eld%/play/bruce.el %eld%/subdirs.el %eld%/term/internal.el %eld%/term/AT386.el %eld%/term/apollo.el %eld%/term/bobcat.el %eld%/term/iris-ansi.el %eld%/term/keyswap.el %eld%/term/linux.el %eld%/term/lk201.el %eld%/term/news.el %eld%/term/vt102.el %eld%/term/vt125.el %eld%/term/vt200.el %eld%/term/vt201.el %eld%/term/vt220.el %eld%/term/vt240.el %eld%/term/vt300.el %eld%/term/vt320.el %eld%/term/vt400.el %eld%/term/vt420.el %eld%/term/wyse50.el %eld%/term/xterm.el %eld%/version.el
28 28
29rem set term_elfiles=%eld%/term/AT386.el %eld%/term/apollo.el %eld%/term/bg-mouse.el %eld%/term/bobcat.el %eld%/term/internal.el %eld%/term/iris-ansi.el %eld%/term/keyswap.el %eld%/term/linux.el %eld%/term/lk201.el %eld%/term/news.el %eld%/term/pc-win.el %eld%/term/sun-mouse.el %eld%/term/sun.el %eld%/term/sup-mouse.el %eld%/term/tvi970.el %eld%/term/vt100.el %eld%/term/vt102.el %eld%/term/vt125.el %eld%/term/vt200.el %eld%/term/vt201.el %eld%/term/vt220.el %eld%/term/vt240.el %eld%/term/vt300.el %eld%/term/vt320.el %eld%/term/vt400.el %eld%/term/vt420.el %eld%/term/w32-win.el %eld%/term/wyse50.el %eld%/term/x-win.el %eld%/term/xterm.el 29rem set term_elfiles=%eld%/term/AT386.el %eld%/term/apollo.el %eld%/term/bg-mouse.el %eld%/term/bobcat.el %eld%/term/internal.el %eld%/term/iris-ansi.el %eld%/term/keyswap.el %eld%/term/linux.el %eld%/term/lk201.el %eld%/term/news.el %eld%/term/pc-win.el %eld%/term/sun-mouse.el %eld%/term/sun.el %eld%/term/sup-mouse.el %eld%/term/tvi970.el %eld%/term/vt100.el %eld%/term/vt102.el %eld%/term/vt125.el %eld%/term/vt200.el %eld%/term/vt201.el %eld%/term/vt220.el %eld%/term/vt240.el %eld%/term/vt300.el %eld%/term/vt320.el %eld%/term/vt400.el %eld%/term/vt420.el %eld%/term/w32-win.el %eld%/term/wyse50.el %eld%/term/x-win.el %eld%/term/xterm.el
30 30
31rem set elcfiles=%eld%/*.elc %eld%/emacs-lisp/*.elc %eld%/emulation/*.elc %eld%/gnus/*.elc %eld%/international/*.elc %eld%/language/*.elc %eld%/mail/*.elc %eld%/play/*.elc %eld%/progmodes/*.elc %eld%/term/*.elc %eld%/textmodes/*.elc 31rem set elcfiles=%eld%/*.elc %eld%/emacs-lisp/*.elc %eld%/emulation/*.elc %eld%/gnus/*.elc %eld%/international/*.elc %eld%/language/*.elc %eld%/mail/*.elc %eld%/play/*.elc %eld%/progmodes/*.elc %eld%/term/*.elc %eld%/textmodes/*.elc
32 32
33set fns_el= 33set fns_el=
34for %%f in (emacs-%1/bin/fns*) do set fns_el=%fns_el% emacs-%1/bin/%%f 34for %%f in (emacs-%1/bin/fns*) do set fns_el=%fns_el% emacs-%1/bin/%%f
35 35
36echo Create bin distribution 36echo Create bin distribution
37copy %3\README.W32 emacs-%1\README.W32 37copy %3\README.W32 emacs-%1\README.W32
38 38
39rem %TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb 39rem %TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb
40rem --exclude *.opt --exclude *.el --exclude *~ -cvf - emacs-%1/BUGS 40rem --exclude *.opt --exclude *.el --exclude *~ -cvf - emacs-%1/BUGS
41rem emacs-%1/GETTING.GNU.SOFTWARE emacs-%1/README emacs-%1/README.W32 41rem emacs-%1/GETTING.GNU.SOFTWARE emacs-%1/README emacs-%1/README.W32
42rem emacs-%1/bin %fns_el% emacs-%1/etc emacs-%1/info emacs-%1/lisp %elfiles% 42rem emacs-%1/bin %fns_el% emacs-%1/etc emacs-%1/info emacs-%1/lisp %elfiles%
43rem %term_elfiles% emacs-%1/lock emacs-%1/site-lisp -cvf - | gzip -9 > %2-bin-i386.tar.gz 43rem %term_elfiles% emacs-%1/lock emacs-%1/site-lisp -cvf - | gzip -9 > %2-bin-i386.tar.gz
44 44
45del #files# 45del #files#
46for %%f in (emacs-%1/BUGS emacs-%1/GETTING.GNU.SOFTWARE emacs-%1/README emacs-%1/README.W32) do echo %%f>>#files# 46for %%f in (emacs-%1/BUGS emacs-%1/GETTING.GNU.SOFTWARE emacs-%1/README emacs-%1/README.W32) do echo %%f>>#files#
47for %%f in (emacs-%1/bin/fns*) do echo emacs-%1/bin/%%f>>#files# 47for %%f in (emacs-%1/bin/fns*) do echo emacs-%1/bin/%%f>>#files#
48for %%f in (emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp %elfiles%) do echo %%f>>#files# 48for %%f in (emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp %elfiles%) do echo %%f>>#files#
49for %%f in (%eld%/term/*.el) do echo %eld%/term/%%f>>#files# 49for %%f in (%eld%/term/*.el) do echo %eld%/term/%%f>>#files#
50for %%f in (emacs-%1/lock emacs-%1/site-lisp emacs-%1/site-lisp/subdirs.el) do echo %%f>>#files# 50for %%f in (emacs-%1/lock emacs-%1/site-lisp emacs-%1/site-lisp/subdirs.el) do echo %%f>>#files#
51%TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude *.el --exclude *~ -T #files# -cvf - | gzip -9 > %2-bin-i386.tar.gz 51%TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude *.el --exclude *~ -T #files# -cvf - | gzip -9 > %2-bin-i386.tar.gz
52del emacs-%1\README.W32 52del emacs-%1\README.W32
53del #files# 53del #files#
54if not (%4) == () goto end 54if not (%4) == () goto end
55 55
56:fullbin 56:fullbin
57 57
58echo Create full bin distribution 58echo Create full bin distribution
59copy %3\README.W32 emacs-%1\README.W32 59copy %3\README.W32 emacs-%1\README.W32
60 60
61%TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude *~ -cvf - emacs-%1/BUGS emacs-%1/GETTING.GNU.SOFTWARE emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/lock emacs-%1/site-lisp | gzip -9 > %2-fullbin-i386.tar.gz 61%TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude *~ -cvf - emacs-%1/BUGS emacs-%1/GETTING.GNU.SOFTWARE emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/lock emacs-%1/site-lisp | gzip -9 > %2-fullbin-i386.tar.gz
62del emacs-%1\README.W32 62del emacs-%1\README.W32
63if not (%4) == () goto end 63if not (%4) == () goto end
64 64
65:leim 65:leim
66 66
67echo Create archive with precompiled leim files 67echo Create archive with precompiled leim files
68%TAR% -cvf - emacs-%1/leim/leim-list.el emacs-%1/leim/quail emacs-%1/leim/ja-dic | gzip -9 > %2-leim.tar.gz 68%TAR% -cvf - emacs-%1/leim/leim-list.el emacs-%1/leim/quail emacs-%1/leim/ja-dic | gzip -9 > %2-leim.tar.gz
69if not (%4) == () goto end 69if not (%4) == () goto end
70 70
71:undumped 71:undumped
72 72
73echo Create archive with extra files needed for redumping emacs 73echo Create archive with extra files needed for redumping emacs
74copy %3\README-UNDUMP.W32 emacs-%1\README-UNDUMP.W32 74copy %3\README-UNDUMP.W32 emacs-%1\README-UNDUMP.W32
75copy %3\dump.bat emacs-%1\bin 75copy %3\dump.bat emacs-%1\bin
76if exist emacs-%1\src\obj-spd\i386\temacs.exe copy emacs-%1\src\obj-spd\i386\temacs.exe emacs-%1\bin 76if exist emacs-%1\src\obj-spd\i386\temacs.exe copy emacs-%1\src\obj-spd\i386\temacs.exe emacs-%1\bin
77if exist emacs-%1\src\oo-spd\i386\temacs.exe copy emacs-%1\src\oo-spd\i386\temacs.exe emacs-%1\bin 77if exist emacs-%1\src\oo-spd\i386\temacs.exe copy emacs-%1\src\oo-spd\i386\temacs.exe emacs-%1\bin
78%TAR% -cvf - emacs-%1/README-UNDUMP.W32 emacs-%1/bin/dump.bat emacs-%1/bin/temacs.exe | gzip -9 > %2-undumped-i386.tar.gz 78%TAR% -cvf - emacs-%1/README-UNDUMP.W32 emacs-%1/bin/dump.bat emacs-%1/bin/temacs.exe | gzip -9 > %2-undumped-i386.tar.gz
79del emacs-%1\bin\temacs.exe 79del emacs-%1\bin\temacs.exe
80del emacs-%1\bin\dump.bat 80del emacs-%1\bin\dump.bat
81del emacs-%1\README-UNDUMP.W32 81del emacs-%1\README-UNDUMP.W32
82if not (%4) == () goto end 82if not (%4) == () goto end
83 83
84:barebin 84:barebin
85 85
86echo Create archive with just the basic binaries and generated files 86echo Create archive with just the basic binaries and generated files
87echo (the user needs to unpack the full source distribution for 87echo (the user needs to unpack the full source distribution for
88echo everything else) 88echo everything else)
89copy %3\README.W32 emacs-%1\README.W32 89copy %3\README.W32 emacs-%1\README.W32
90%TAR% -cvf - emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC emacs-%1/etc/DOC-X | gzip -9 > %2-barebin-i386.tar.gz 90%TAR% -cvf - emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC emacs-%1/etc/DOC-X | gzip -9 > %2-barebin-i386.tar.gz
91del emacs-%1\README.W32 91del emacs-%1\README.W32
92if not (%4) == () goto end 92if not (%4) == () goto end
93 93
94goto end 94goto end
95 95
96rem Only do this if explicitly requested 96rem Only do this if explicitly requested
97:zipfiles 97:zipfiles
98 98
99echo Create zip files for bin and lisp archives 99echo Create zip files for bin and lisp archives
100mkdir distrib 100mkdir distrib
101cd distrib 101cd distrib
102gunzip -c ..\%2-bin-i386.tar.gz | %TAR% xf - 102gunzip -c ..\%2-bin-i386.tar.gz | %TAR% xf -
103zip -rp9 em%5_bin %2 103zip -rp9 em%5_bin %2
104rm -rf %2 104rm -rf %2
105zipsplit -n 1400000 -b .. em%5_bin.zip 105zipsplit -n 1400000 -b .. em%5_bin.zip
106del em%5_bin.zip 106del em%5_bin.zip
107gunzip -c ..\%2-lisp.tar.gz | %TAR% xf - 107gunzip -c ..\%2-lisp.tar.gz | %TAR% xf -
108zip -rp9 em%5_lis %2 108zip -rp9 em%5_lis %2
109rm -rf %2 109rm -rf %2
110zipsplit -n 1400000 -b .. em%5_lis.zip 110zipsplit -n 1400000 -b .. em%5_lis.zip
111del em%5_lis.zip 111del em%5_lis.zip
112cd .. 112cd ..
113 113
114goto end 114goto end
115 115
116:usage 116:usage
117echo Generate source and binary distributions of emacs. 117echo Generate source and binary distributions of emacs.
118echo Usage: %0 emacs-version dist-basename distfiles [lisp,bin,undumped,barebin] 118echo Usage: %0 emacs-version dist-basename distfiles [lisp,bin,undumped,barebin]
119echo (e.g., %0 19.34 emacs-19.34.5 d:\andrewi\distfiles) 119echo (e.g., %0 19.34 emacs-19.34.5 d:\andrewi\distfiles)
120echo Or: %0 emacs-version dist-basename distfiles "zipfiles" short-version 120echo Or: %0 emacs-version dist-basename distfiles "zipfiles" short-version
121echo (e.g., %0 20.6 emacs-20.6 d:\andrewi\distfiles zipfiles 206) 121echo (e.g., %0 20.6 emacs-20.6 d:\andrewi\distfiles zipfiles 206)
122:end 122:end
diff --git a/nt/ChangeLog b/nt/ChangeLog
index fb722213d80..d3500a1f1d8 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,12 @@
12001-08-31 Eli Zaretskii <eliz@is.elta.co.il>
2
3 * subdirs.el: New file.
4
5 * configure.bat: Copy subdirs.el to the site-lisp directory.
6
7 * makefile.w32-in (install): Copy subdirs.el to the installation
8 directory.
9
12001-06-20 Jason Rumney <jasonr@gnu.org> 102001-06-20 Jason Rumney <jasonr@gnu.org>
2 11
3 * runemacs.c (WinMain): Add quotes around command in case of spaces. 12 * runemacs.c (WinMain): Add quotes around command in case of spaces.
diff --git a/nt/configure.bat b/nt/configure.bat
index 308e3e314e2..4ee9b46a2b3 100755
--- a/nt/configure.bat
+++ b/nt/configure.bat
@@ -1,298 +1,298 @@
1@echo off 1@echo off
2rem ---------------------------------------------------------------------- 2rem ----------------------------------------------------------------------
3rem Configuration script for MS Windows 95/98 and NT/2000 3rem Configuration script for MS Windows 95/98 and NT/2000
4rem Copyright (C) 1999-2001 Free Software Foundation, Inc. 4rem Copyright (C) 1999-2001 Free Software Foundation, Inc.
5 5
6rem This file is part of GNU Emacs. 6rem This file is part of GNU Emacs.
7 7
8rem GNU Emacs is free software; you can redistribute it and/or modify 8rem GNU Emacs is free software; you can redistribute it and/or modify
9rem it under the terms of the GNU General Public License as published by 9rem it under the terms of the GNU General Public License as published by
10rem the Free Software Foundation; either version 2, or (at your option) 10rem the Free Software Foundation; either version 2, or (at your option)
11rem any later version. 11rem any later version.
12 12
13rem GNU Emacs is distributed in the hope that it will be useful, 13rem GNU Emacs is distributed in the hope that it will be useful,
14rem but WITHOUT ANY WARRANTY; without even the implied warranty of 14rem but WITHOUT ANY WARRANTY; without even the implied warranty of
15rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16rem GNU General Public License for more details. 16rem GNU General Public License for more details.
17 17
18rem You should have received a copy of the GNU General Public License 18rem You should have received a copy of the GNU General Public License
19rem along with GNU Emacs; see the file COPYING. If not, write to the 19rem along with GNU Emacs; see the file COPYING. If not, write to the
20rem Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20rem Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21rem Boston, MA 02111-1307, USA. 21rem Boston, MA 02111-1307, USA.
22rem ---------------------------------------------------------------------- 22rem ----------------------------------------------------------------------
23rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS: 23rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:
24rem 24rem
25rem + MS Windows 95/98 or NT/2000 25rem + MS Windows 95/98 or NT/2000
26rem + either MSVC 2.x or later, or gcc-2.95 or later (with gmake 3.75 26rem + either MSVC 2.x or later, or gcc-2.95 or later (with gmake 3.75
27rem or later) and the Mingw32 and W32 API headers and libraries 27rem or later) and the Mingw32 and W32 API headers and libraries
28rem 28rem
29rem For reference, here is a list of which builds of gmake are known to 29rem For reference, here is a list of which builds of gmake are known to
30rem work or not, and whether they work in the presence and/or absence of 30rem work or not, and whether they work in the presence and/or absence of
31rem sh.exe. 31rem sh.exe.
32rem 32rem
33rem sh exists no sh 33rem sh exists no sh
34rem cygwin b20.1 make (3.75): okay[1] fails[2] 34rem cygwin b20.1 make (3.75): okay[1] fails[2]
35rem MSVC compiled gmake 3.77: okay okay 35rem MSVC compiled gmake 3.77: okay okay
36rem MSVC compiled gmake 3.78.1: okay okay 36rem MSVC compiled gmake 3.78.1: okay okay
37rem MSVC compiled gmake 3.79.1: okay okay 37rem MSVC compiled gmake 3.79.1: okay okay
38rem mingw32/gcc-2.92.2 make (3.77): okay okay 38rem mingw32/gcc-2.92.2 make (3.77): okay okay
39rem cygwin compiled gmake 3.77: okay[1] fails[2] 39rem cygwin compiled gmake 3.77: okay[1] fails[2]
40rem cygwin compiled gmake 3.78.1: okay fails[2] 40rem cygwin compiled gmake 3.78.1: okay fails[2]
41rem cygwin compiled gmake 3.79.1: couldn't build make[3] 41rem cygwin compiled gmake 3.79.1: couldn't build make[3]
42rem 42rem
43rem [1] doesn't cope with makefiles with DOS line endings, so must mount 43rem [1] doesn't cope with makefiles with DOS line endings, so must mount
44rem emacs source with text!=binary. 44rem emacs source with text!=binary.
45rem [2] fails when needs to invoke shell commands; okay invoking gcc etc. 45rem [2] fails when needs to invoke shell commands; okay invoking gcc etc.
46rem [3] requires LC_MESSAGES support to build; maybe 2.95.x update to 46rem [3] requires LC_MESSAGES support to build; maybe 2.95.x update to
47rem cygwin provides this? 47rem cygwin provides this?
48rem 48rem
49 49
50rem ---------------------------------------------------------------------- 50rem ----------------------------------------------------------------------
51rem See if the environment is large enough. We need 43 (?) bytes. 51rem See if the environment is large enough. We need 43 (?) bytes.
52set $foo$=123456789_123456789_123456789_123456789_123 52set $foo$=123456789_123456789_123456789_123456789_123
53if not "%$foo$%" == "123456789_123456789_123456789_123456789_123" goto SmallEnv 53if not "%$foo$%" == "123456789_123456789_123456789_123456789_123" goto SmallEnv
54set $foo$= 54set $foo$=
55 55
56rem ---------------------------------------------------------------------- 56rem ----------------------------------------------------------------------
57rem Make sure we are running in the nt subdir 57rem Make sure we are running in the nt subdir
58if exist configure.bat goto start 58if exist configure.bat goto start
59echo You must run configure from the nt subdirectory. 59echo You must run configure from the nt subdirectory.
60goto end 60goto end
61 61
62:start 62:start
63rem ---------------------------------------------------------------------- 63rem ----------------------------------------------------------------------
64rem Default settings. 64rem Default settings.
65set prefix= 65set prefix=
66set nodebug=N 66set nodebug=N
67set noopt=N 67set noopt=N
68set nocygwin=N 68set nocygwin=N
69set COMPILER= 69set COMPILER=
70set usercflags= 70set usercflags=
71set userldflags= 71set userldflags=
72set sep1= 72set sep1=
73set sep2= 73set sep2=
74 74
75rem ---------------------------------------------------------------------- 75rem ----------------------------------------------------------------------
76rem Handle arguments. 76rem Handle arguments.
77:again 77:again
78if "%1" == "-h" goto usage 78if "%1" == "-h" goto usage
79if "%1" == "--help" goto usage 79if "%1" == "--help" goto usage
80if "%1" == "--prefix" goto setprefix 80if "%1" == "--prefix" goto setprefix
81if "%1" == "--with-gcc" goto withgcc 81if "%1" == "--with-gcc" goto withgcc
82if "%1" == "--with-msvc" goto withmsvc 82if "%1" == "--with-msvc" goto withmsvc
83if "%1" == "--no-debug" goto nodebug 83if "%1" == "--no-debug" goto nodebug
84if "%1" == "--no-opt" goto noopt 84if "%1" == "--no-opt" goto noopt
85if "%1" == "--no-cygwin" goto nocygwin 85if "%1" == "--no-cygwin" goto nocygwin
86if "%1" == "--cflags" goto usercflags 86if "%1" == "--cflags" goto usercflags
87if "%1" == "--ldflags" goto userldflags 87if "%1" == "--ldflags" goto userldflags
88if "%1" == "" goto checkutils 88if "%1" == "" goto checkutils
89:usage 89:usage
90echo Usage: configure [options] 90echo Usage: configure [options]
91echo Options: 91echo Options:
92echo. --prefix PREFIX install Emacs in directory PREFIX 92echo. --prefix PREFIX install Emacs in directory PREFIX
93echo. --with-gcc use GCC to compile Emacs 93echo. --with-gcc use GCC to compile Emacs
94echo. --with-msvc use MSVC to compile Emacs 94echo. --with-msvc use MSVC to compile Emacs
95echo. --no-debug exclude debug info from executables 95echo. --no-debug exclude debug info from executables
96echo. --no-opt disable optimization 96echo. --no-opt disable optimization
97echo. --no-cygwin use -mno-cygwin option with GCC 97echo. --no-cygwin use -mno-cygwin option with GCC
98echo. --cflags FLAG pass FLAG to compiler 98echo. --cflags FLAG pass FLAG to compiler
99echo. --ldflags FLAG pass FLAG to compiler when linking 99echo. --ldflags FLAG pass FLAG to compiler when linking
100goto end 100goto end
101rem ---------------------------------------------------------------------- 101rem ----------------------------------------------------------------------
102:setprefix 102:setprefix
103shift 103shift
104set prefix=%1 104set prefix=%1
105shift 105shift
106goto again 106goto again
107rem ---------------------------------------------------------------------- 107rem ----------------------------------------------------------------------
108:withgcc 108:withgcc
109set COMPILER=gcc 109set COMPILER=gcc
110shift 110shift
111goto again 111goto again
112rem ---------------------------------------------------------------------- 112rem ----------------------------------------------------------------------
113:withmsvc 113:withmsvc
114set COMPILER=cl 114set COMPILER=cl
115shift 115shift
116goto again 116goto again
117rem ---------------------------------------------------------------------- 117rem ----------------------------------------------------------------------
118:nodebug 118:nodebug
119set nodebug=Y 119set nodebug=Y
120shift 120shift
121goto again 121goto again
122rem ---------------------------------------------------------------------- 122rem ----------------------------------------------------------------------
123:noopt 123:noopt
124set noopt=Y 124set noopt=Y
125shift 125shift
126goto again 126goto again
127rem ---------------------------------------------------------------------- 127rem ----------------------------------------------------------------------
128:nocygwin 128:nocygwin
129set nocygwin=Y 129set nocygwin=Y
130shift 130shift
131goto again 131goto again
132rem ---------------------------------------------------------------------- 132rem ----------------------------------------------------------------------
133:usercflags 133:usercflags
134shift 134shift
135set usercflags=%usercflags%%sep1%%1 135set usercflags=%usercflags%%sep1%%1
136set sep1= %nothing% 136set sep1= %nothing%
137shift 137shift
138goto again 138goto again
139rem ---------------------------------------------------------------------- 139rem ----------------------------------------------------------------------
140:userldflags 140:userldflags
141shift 141shift
142set userldflags=%userldflags%%sep2%%1 142set userldflags=%userldflags%%sep2%%1
143set sep2= %nothing% 143set sep2= %nothing%
144shift 144shift
145goto again 145goto again
146 146
147rem ---------------------------------------------------------------------- 147rem ----------------------------------------------------------------------
148rem Check that necessary utilities (cp and rm) are present. 148rem Check that necessary utilities (cp and rm) are present.
149:checkutils 149:checkutils
150echo Checking for 'cp'... 150echo Checking for 'cp'...
151cp configure.bat junk.bat 151cp configure.bat junk.bat
152if not exist junk.bat goto needcp 152if not exist junk.bat goto needcp
153echo Checking for 'rm'... 153echo Checking for 'rm'...
154rm junk.bat 154rm junk.bat
155if exist junk.bat goto needrm 155if exist junk.bat goto needrm
156goto checkcompiler 156goto checkcompiler
157:needcp 157:needcp
158echo You need 'cp' (the Unix file copy program) to build Emacs. 158echo You need 'cp' (the Unix file copy program) to build Emacs.
159goto end 159goto end
160:needrm 160:needrm
161del junk.bat 161del junk.bat
162echo You need 'rm' (the Unix file delete program) to build Emacs. 162echo You need 'rm' (the Unix file delete program) to build Emacs.
163goto end 163goto end
164 164
165rem ---------------------------------------------------------------------- 165rem ----------------------------------------------------------------------
166rem Auto-detect compiler if not specified, and validate GCC if chosen. 166rem Auto-detect compiler if not specified, and validate GCC if chosen.
167:checkcompiler 167:checkcompiler
168if (%COMPILER%)==(cl) goto genmakefiles 168if (%COMPILER%)==(cl) goto genmakefiles
169if (%COMPILER%)==(gcc) goto checkgcc 169if (%COMPILER%)==(gcc) goto checkgcc
170 170
171echo Checking whether 'cl' is available... 171echo Checking whether 'cl' is available...
172echo main(){} >junk.c 172echo main(){} >junk.c
173cl -nologo -c junk.c 173cl -nologo -c junk.c
174if exist junk.obj goto clOK 174if exist junk.obj goto clOK
175 175
176echo Checking whether 'gcc' is available... 176echo Checking whether 'gcc' is available...
177gcc -c junk.c 177gcc -c junk.c
178if not exist junk.o goto nocompiler 178if not exist junk.o goto nocompiler
179del junk.o 179del junk.o
180 180
181:checkgcc 181:checkgcc
182Rem WARNING -- COMMAND.COM on some systems only looks at the first 182Rem WARNING -- COMMAND.COM on some systems only looks at the first
183Rem 8 characters of a label. So do NOT be tempted to change 183Rem 8 characters of a label. So do NOT be tempted to change
184Rem chkapi* into something fancier like checkw32api 184Rem chkapi* into something fancier like checkw32api
185Rem You HAVE been warned! 185Rem You HAVE been warned!
186if (%nocygwin%) == (Y) goto chkapi 186if (%nocygwin%) == (Y) goto chkapi
187echo Checking whether gcc requires '-mno-cygwin'... 187echo Checking whether gcc requires '-mno-cygwin'...
188echo #include "cygwin/version.h" >junk.c 188echo #include "cygwin/version.h" >junk.c
189echo main(){} >>junk.c 189echo main(){} >>junk.c
190gcc -c junk.c 190gcc -c junk.c
191if not exist junk.o goto chkapi 191if not exist junk.o goto chkapi
192gcc -mno-cygwin -c junk.c 192gcc -mno-cygwin -c junk.c
193if exist junk.o set nocygwin=Y 193if exist junk.o set nocygwin=Y
194rm -f junk.c junk.o 194rm -f junk.c junk.o
195 195
196:chkapi 196:chkapi
197rem ---------------------------------------------------------------------- 197rem ----------------------------------------------------------------------
198rem Older versions of the Windows API headers either don't have any of 198rem Older versions of the Windows API headers either don't have any of
199rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1 199rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1
200rem are like this), or have a typo in the definition of 200rem are like this), or have a typo in the definition of
201rem IMAGE_FIRST_SECTION (the headers with gcc/mingw32 2.95 have this 201rem IMAGE_FIRST_SECTION (the headers with gcc/mingw32 2.95 have this
202rem problem). The gcc/mingw32 2.95.2 headers are okay, as are distros 202rem problem). The gcc/mingw32 2.95.2 headers are okay, as are distros
203rem of w32api-xxx.zip from Anders Norlander since 1999-11-18 at least. 203rem of w32api-xxx.zip from Anders Norlander since 1999-11-18 at least.
204rem 204rem
205echo Checking whether W32 API headers are too old... 205echo Checking whether W32 API headers are too old...
206echo #include "windows.h" >junk.c 206echo #include "windows.h" >junk.c
207echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c 207echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c
208echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c 208echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c
209if (%nocygwin%) == (Y) goto chkapi1 209if (%nocygwin%) == (Y) goto chkapi1
210set cf=%usercflags% 210set cf=%usercflags%
211goto chkapi2 211goto chkapi2
212:chkapi1 212:chkapi1
213set cf=%usercflags% -mno-cygwin 213set cf=%usercflags% -mno-cygwin
214:chkapi2 214:chkapi2
215echo on 215echo on
216gcc %cf% -c junk.c 216gcc %cf% -c junk.c
217echo off 217echo off
218set cf= 218set cf=
219if exist junk.o goto gccOk 219if exist junk.o goto gccOk
220 220
221:nocompiler 221:nocompiler
222echo. 222echo.
223echo Configure failed. 223echo Configure failed.
224echo To configure Emacs for Windows, you need to have either 224echo To configure Emacs for Windows, you need to have either
225echo gcc-2.95 or later with Mingw32 and the W32 API headers, 225echo gcc-2.95 or later with Mingw32 and the W32 API headers,
226echo or MSVC 2.x or later. 226echo or MSVC 2.x or later.
227del junk.c 227del junk.c
228goto end 228goto end
229 229
230:gccOk 230:gccOk
231set COMPILER=gcc 231set COMPILER=gcc
232rm -f junk.c junk.o 232rm -f junk.c junk.o
233echo Using 'gcc' 233echo Using 'gcc'
234goto genmakefiles 234goto genmakefiles
235 235
236:clOk 236:clOk
237set COMPILER=cl 237set COMPILER=cl
238rm -f junk.c junk.obj 238rm -f junk.c junk.obj
239echo Using 'MSVC' 239echo Using 'MSVC'
240goto genmakefiles 240goto genmakefiles
241 241
242rem ---------------------------------------------------------------------- 242rem ----------------------------------------------------------------------
243:genmakefiles 243:genmakefiles
244echo Generating makefiles 244echo Generating makefiles
245if %COMPILER% == gcc set MAKECMD=gmake 245if %COMPILER% == gcc set MAKECMD=gmake
246if %COMPILER% == cl set MAKECMD=nmake 246if %COMPILER% == cl set MAKECMD=nmake
247 247
248rem Pass on chosen settings to makefiles. 248rem Pass on chosen settings to makefiles.
249rem NB. Be very careful to not have a space before redirection symbols 249rem NB. Be very careful to not have a space before redirection symbols
250rem except when there is a preceding digit, when a space is required. 250rem except when there is a preceding digit, when a space is required.
251rem 251rem
252echo # Start of settings from configure.bat >config.settings 252echo # Start of settings from configure.bat >config.settings
253echo COMPILER=%COMPILER%>>config.settings 253echo COMPILER=%COMPILER%>>config.settings
254if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings 254if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings
255if (%noopt%) == (Y) echo NOOPT=1 >>config.settings 255if (%noopt%) == (Y) echo NOOPT=1 >>config.settings
256if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings 256if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings
257if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings 257if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings
258if not "(%usercflags%)" == "()" echo USER_CFLAGS=%usercflags%>>config.settings 258if not "(%usercflags%)" == "()" echo USER_CFLAGS=%usercflags%>>config.settings
259if not "(%userldflags%)" == "()" echo USER_LDFLAGS=%userldflags%>>config.settings 259if not "(%userldflags%)" == "()" echo USER_LDFLAGS=%userldflags%>>config.settings
260echo # End of settings from configure.bat>>config.settings 260echo # End of settings from configure.bat>>config.settings
261echo. >>config.settings 261echo. >>config.settings
262 262
263copy config.nt ..\src\config.h 263copy config.nt ..\src\config.h
264if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>..\src\config.h 264if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>..\src\config.h
265if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>..\src\config.h 265if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>..\src\config.h
266copy paths.h ..\src\epaths.h 266copy paths.h ..\src\epaths.h
267 267
268copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile 268copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile
269copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile 269copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile
270copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile 270copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile
271if not exist ..\lisp\Makefile.unix rename ..\lisp\Makefile.in Makefile.unix 271if not exist ..\lisp\Makefile.unix rename ..\lisp\Makefile.in Makefile.unix
272if exist ..\lisp\makefile rm -f ../lisp/[Mm]akefile 272if exist ..\lisp\makefile rm -f ../lisp/[Mm]akefile
273copy /b config.settings+%MAKECMD%.defs+..\lisp\makefile.w32-in ..\lisp\makefile 273copy /b config.settings+%MAKECMD%.defs+..\lisp\makefile.w32-in ..\lisp\makefile
274rem Use the default (no-op) Makefile.in if the nt version is not present. 274rem Use the default (no-op) Makefile.in if the nt version is not present.
275if exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\makefile.w32-in ..\leim\makefile 275if exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\makefile.w32-in ..\leim\makefile
276if not exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\Makefile.in ..\leim\makefile 276if not exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\Makefile.in ..\leim\makefile
277del config.settings 277del config.settings
278 278
279if not exist ..\site-lisp\subdirs.el copy subdirs.el ..\site-lisp\subdirs.el 279if not exist ..\site-lisp\subdirs.el copy subdirs.el ..\site-lisp\subdirs.el
280 280
281echo. 281echo.
282echo Emacs successfully configured. 282echo Emacs successfully configured.
283echo Run `%MAKECMD%' to build, then run `%MAKECMD% install' to install. 283echo Run `%MAKECMD%' to build, then run `%MAKECMD% install' to install.
284goto end 284goto end
285 285
286:SmallEnv 286:SmallEnv
287echo Your environment size is too small. Please enlarge it and rerun configure. 287echo Your environment size is too small. Please enlarge it and rerun configure.
288echo For example, type "command.com /e:2048" to have 2048 bytes available. 288echo For example, type "command.com /e:2048" to have 2048 bytes available.
289set $foo$= 289set $foo$=
290:end 290:end
291set prefix= 291set prefix=
292set nodebug= 292set nodebug=
293set noopt= 293set noopt=
294set nocygwin= 294set nocygwin=
295set COMPILER= 295set COMPILER=
296set MAKECMD= 296set MAKECMD=
297set usercflags= 297set usercflags=
298set userldflags= 298set userldflags=