aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-01-07 13:34:12 +0000
committerRichard M. Stallman1994-01-07 13:34:12 +0000
commit3382cd59427d1d87d2d2500fd94462d102eab750 (patch)
tree044d36f55f6f09caa2f44333a1115ea27994e6f0
parentc4a7b2a414784651b1224ef669a16fabc119e0cd (diff)
downloademacs-3382cd59427d1d87d2d2500fd94462d102eab750.tar.gz
emacs-3382cd59427d1d87d2d2500fd94462d102eab750.zip
Initial revision
-rw-r--r--config.bat101
1 files changed, 101 insertions, 0 deletions
diff --git a/config.bat b/config.bat
new file mode 100644
index 00000000000..4f8767975b2
--- /dev/null
+++ b/config.bat
@@ -0,0 +1,101 @@
1@echo off
2rem ----------------------------------------------------------------------
3rem Configuration script for MSDOS
4rem This file is part of GNU Emacs.
5
6rem GNU Emacs is free software; you can redistribute it and/or modify
7rem it under the terms of the GNU General Public License as published by
8rem the Free Software Foundation; either version 2, or (at your option)
9rem any later version.
10
11rem GNU Emacs is distributed in the hope that it will be useful,
12rem but WITHOUT ANY WARRANTY; without even the implied warranty of
13rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14rem GNU General Public License for more details.
15
16rem You should have received a copy of the GNU General Public License
17rem along with GNU Emacs; see the file COPYING. If not, write to
18rem the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19rem ----------------------------------------------------------------------
20rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:
21rem
22rem + djgpp.
23rem + make utility that allows breaking of 128 chars limit of commands.
24rem ndmake (as of version 4.5) won't work due to a line length limit.
25rem + rm, mv, chmod (From GNU file utilities).
26rem + sed.
27rem + patch (Larry Wall's for instance. I think it's supplied with djgpp).
28rem ----------------------------------------------------------------------
29if not "%2" == "" goto usage
30if "%1" == "msdos" goto msdos
31:usage
32echo Usage: config msdos
33echo [Read the script before you run it; also check that you have all the
34echo necessary utilities.]
35goto end
36rem ----------------------------------------------------------------------
37:msdos
38rem Change to the Emacs root
39cd c:\emacs
40rem ----------------------------------------------------------------------
41Echo Configuring the source directory...
42cd src
43set PATHSH=paths-h.in
44if exist %PATHSH% goto src1
45set PATHSH=paths.h-in
46if exist %PATHSH% goto src1
47echo config: *** The file originally called "src/paths.h.in" cannot be found.
48cd ..
49goto end
50:src1
51set CONFIGH=config-h.in
52if exist %CONFIGH% goto src2
53set CONFIGH=config.h-in
54if exist %CONFIGH% goto src2
55echo config: *** The file originally called "src/config.h.in" cannot be found.
56cd ..
57goto end
58:src2
59set MAKEFILEIN=makefile.in-in
60if exist %MAKEFILEIN% goto src3
61set MAKEFILEIN=makefile-in.in
62if exist %MAKEFILEIN% goto src3
63echo makefile: *** The file originally called "src/makefile.in.in" cannot be found.
64cd ..
65goto end
66:src3
67
68rem Create "paths.h"
69rm -f paths.h
70sed -e "s!/lib/emacs!!" -e "s!/usr/local!c:/emacs!" -e "s!/data!/etc!" <%PATHSH% >paths.h
71
72rem Create "config.h"
73rm -f config.h
74sed -f ../msdos/sed2.inp <%CONFIGH% >config.h
75
76rem On my system dir.h gets in the way. It's a VMS file so who cares.
77if exist dir.h ren dir.h vmsdir.h
78
79rem Create "makefile" from "makefile.in.in" using a context patch.
80rm -f makefile
81cp %MAKEFILEIN% makefile
82patch -p1 -B ! -r patch.rjt makefile ../msdos/patch1
83echo All hunks above should have passed! If they didn't, you'll have to
84echo update manually. That should be easy though.
85mv makefile junk.c
86gcc -E junk.c | sed -f ../msdos/sed1.inp >makefile
87del !makefile
88del junk.c
89cd ..
90rem ----------------------------------------------------------------------
91Echo Configuring the library source directory...
92cd lib-src
93rem Create "makefile" from "makefile.in".
94copy makefile makefile.bak >nul
95sed -f ../msdos/sed3.inp <makefile.in >makefile
96cd ..
97rem ----------------------------------------------------------------------
98Echo Configuring the main directory...
99copy msdos\mainmake makefile >nul
100rem ----------------------------------------------------------------------
101:end