comparison config.bat @ 9570:9eae919f9a23

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