aboutsummaryrefslogtreecommitdiffstats
path: root/config.bat
diff options
context:
space:
mode:
authorMorten Welinder1994-10-17 07:35:36 +0000
committerMorten Welinder1994-10-17 07:35:36 +0000
commitddff705b7a85685bbeaa64c4ecfecde37573053f (patch)
tree4e61c20c43b8b4ea1341ddd841ec323957fd3090 /config.bat
parent72418504bfb7b41973c4fac83daf2edbccf5793d (diff)
downloademacs-ddff705b7a85685bbeaa64c4ecfecde37573053f.tar.gz
emacs-ddff705b7a85685bbeaa64c4ecfecde37573053f.zip
*** empty log message ***
Diffstat (limited to 'config.bat')
-rw-r--r--config.bat114
1 files changed, 89 insertions, 25 deletions
diff --git a/config.bat b/config.bat
index decbd54f871..446060c186e 100644
--- a/config.bat
+++ b/config.bat
@@ -29,30 +29,66 @@ rem line length limit.
29rem + rm, mv, chmod (From GNU file utilities). 29rem + rm, mv, chmod (From GNU file utilities).
30rem + sed. 30rem + sed.
31rem 31rem
32rem You must install in directory c:/emacs or change this script, the 32rem You should be able to get all the above utilities from all
33rem files msdos/sed*.inp, and lisp/dos-fns.el. (The latter must be 33rem Simtel repositories, e.g., oak.oakland.edu in the directories
34rem recompiled.) 34rem "/pub/msdos/djgpp" and "/pub/msdos/gnuish". As usual, please
35rem use your local mirroring site to reduce trans-Atlantic traffic.
35rem ---------------------------------------------------------------------- 36rem ----------------------------------------------------------------------
36if not "%2" == "" goto usage 37set X11=
38set nodebug=
39:again
40if "%1" == "" goto usage
41if "%1" == "--with-x" goto withx
42if "%1" == "--no-debug" goto nodebug
37if "%1" == "msdos" goto msdos 43if "%1" == "msdos" goto msdos
38if "%1" == "msdos-X11" goto msdos11
39:usage 44:usage
40echo Usage: config msdos 45echo Usage: config [--with-x] [--no-debug] msdos
41rem echo or config msdos-X11 -- don't even think about it 46echo [Read the script before you run it.]
42echo [Read the script before you run it; also check that you have all the
43echo necessary utilities.]
44goto end 47goto end
45rem ---------------------------------------------------------------------- 48rem ----------------------------------------------------------------------
46:msdos11 49:withx
47set X11=y 50set X11=Y
48goto msdoscommon 51shift
52goto again
49rem ---------------------------------------------------------------------- 53rem ----------------------------------------------------------------------
50:msdos 54:nodebug
51set X11= 55set nodebug=Y
52:msdoscommon 56shift
53rem Change to the Emacs root -- assume we are there 57goto again
54rem cd c:\emacs
55rem ---------------------------------------------------------------------- 58rem ----------------------------------------------------------------------
59:msdos
60Echo Checking whether `sed' is available...
61Sed -e "w junk.$$$" <Nul
62If Exist junk.$$$ Goto sedOk
63Echo To configure `Emacs' you need to have `sed'!
64Goto End
65:sedOk
66Echo Checking whether `rm' is available...
67rm -f junk.$$$
68If Not Exist junk.$$$ Goto rmOk
69Echo To configure `Emacs' you need to have `rm'!
70Goto End
71:rmOk
72Echo Checking whether `mv' is available...
73rm -f junk.1 junk.2
74echo foo >junk.1
75mv junk.1 junk.2
76If Exist junk.2 Goto mvOk
77Echo To configure `Emacs' you need to have `mv'!
78rm -f junk.1
79Goto End
80:mvOk
81rm -f junk.2
82Echo Checking whether `gcc' is available...
83echo main(){} >junk.c
84gcc -c junk.c
85if exist junk.o goto gccOk
86Echo To configure `Emacs' you need to have `gcc'!
87rm -f junk.c
88Goto End
89:gccOk
90rm -f junk.c junk.o
91Rem ----------------------------------------------------------------------
56Echo Configuring the source directory... 92Echo Configuring the source directory...
57cd src 93cd src
58set PATHSH=paths-h.in 94set PATHSH=paths-h.in
@@ -81,26 +117,38 @@ goto end
81:src3 117:src3
82 118
83rem Create "paths.h" 119rem Create "paths.h"
84rm -f paths.h 120sed -f ../msdos/sed4.inp <%PATHSH% >paths.tmp
85sed -f ../msdos/sed4.inp <%PATHSH% >paths.h 121update paths.tmp paths.h >nul
122rm -f paths.tmp
86 123
87rem Create "config.h" 124rem Create "config.h"
88rm -f config.h config.tmp 125rm -f config.h2 config.tmp
89cp %CONFIGH% config.tmp 126cp %CONFIGH% config.tmp
90if "%X11%" == "" goto src4 127if "%X11%" == "" goto src4
91sed -f ../msdos/sed4.inp <%CONFIGH% >config.tmp 128sed -f ../msdos/sed2x.inp <%CONFIGH% >config.tmp
92:src4 129:src4
93sed -f ../msdos/sed2.inp <config.tmp >config.h 130sed -f ../msdos/sed2.inp <config.tmp >config.h2
94rm -f config.tmp 131update config.h2 config.h >nul
132rm -f config.tmp config.h2
95 133
96rem On my system dir.h gets in the way. It's a VMS file so who cares. 134rem On my system dir.h gets in the way. It's a VMS file so who cares.
97if exist dir.h ren dir.h vmsdir.h 135if exist dir.h ren dir.h vmsdir.h
98 136
99rem Create "makefile" from "makefile.in.in" using a context patch. 137rem Create "makefile" from "makefile.in.in".
100rm -f makefile junk.c 138rm -f makefile junk.c
101sed -e "1,/cpp stuff/s@^# .*$@@" <%MAKEFILEIN% >junk.c 139sed -e "1,/cpp stuff/s@^# .*$@@" <%MAKEFILEIN% >junk.c
102gcc -E junk.c | sed -f ../msdos/sed1.inp >makefile 140gcc -E junk.c | sed -f ../msdos/sed1.inp >makefile
103rm -f junk.c 141rm -f junk.c
142if "%X11%" == "" goto src5
143mv makefile makefile.tmp
144sed -f ../msdos/sed1x.inp <makefile.tmp >makefile
145rm -f makefile.tmp
146:src5
147
148if "%nodebug%" == "" goto src6
149sed -e "/^CFLAGS *=/s/ *-g//" <makefile >makefile.tmp
150mv -f makefile.tmp makefile
151:src6
104cd .. 152cd ..
105rem ---------------------------------------------------------------------- 153rem ----------------------------------------------------------------------
106Echo Configuring the library source directory... 154Echo Configuring the library source directory...
@@ -117,14 +165,30 @@ rem Create "makefile" from "makefile.in".
117sed -e "1,/cpp stuff/s@^# .*$@@" <%MAKEFILEIN% >junk.c 165sed -e "1,/cpp stuff/s@^# .*$@@" <%MAKEFILEIN% >junk.c
118gcc -E -I. -I../src junk.c | sed -e "s/^ / /" -e "/^#/d" -e "/^[ ]*$/d" >Makefile.new 166gcc -E -I. -I../src junk.c | sed -e "s/^ / /" -e "/^#/d" -e "/^[ ]*$/d" >Makefile.new
119sed -f ../msdos/sed3.inp <makefile.new >makefile 167sed -f ../msdos/sed3.inp <makefile.new >makefile
168rm -f makefile.new junk.c
169if "%nodebug%" == "" goto libsrc2
170sed -e "/^CFLAGS *=/s/ *-g//" <makefile >makefile.tmp
171mv -f makefile.tmp makefile
172:libsrc2
173cd ..
174rem ----------------------------------------------------------------------
175if "%X11%" == "" goto oldx1
176Echo Configuring the oldxmenu directory...
177cd oldxmenu
178sed -f ../msdos/sed5x.inp <makefile.in >makefile
179if "%nodebug%" == "" goto oldx2
180sed -e "/^CFLAGS *=/s/ *-g//" <makefile >makefile.tmp
181mv -f makefile.tmp makefile
182:oldx2
120cd .. 183cd ..
184:oldx1
121rem ---------------------------------------------------------------------- 185rem ----------------------------------------------------------------------
122Echo Configuring the main directory... 186Echo Configuring the main directory...
123copy msdos\mainmake makefile >nul 187copy msdos\mainmake makefile >nul
124rem ---------------------------------------------------------------------- 188rem ----------------------------------------------------------------------
125:end 189:end
126set X11= 190set X11=
191set nodebug=
127set MAKEFILEIN= 192set MAKEFILEIN=
128set PATHSH= 193set PATHSH=
129set CONFIGH= 194set CONFIGH=
130