Mercurial > emacs
comparison config.bat @ 14976:63951d3f3995
Set djgpp-ver, and unset it at the end.
Add a number ofconditionals for DJGPP version 2.
Rename label libsrc2 to libsrc3.
Substitute for LDFLAGS in src/Makefile.
Substitute for ALL_CFLAGS in lib-src/Makefile.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 10 Apr 1996 05:29:39 +0000 |
parents | 327ff78701e0 |
children | 5baafbcd9dc2 |
comparison
equal
deleted
inserted
replaced
14975:7b91ceb19771 | 14976:63951d3f3995 |
---|---|
20 rem the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 20 rem the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
21 rem ---------------------------------------------------------------------- | 21 rem ---------------------------------------------------------------------- |
22 rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS: | 22 rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS: |
23 rem | 23 rem |
24 rem + msdos version 3 or better. | 24 rem + msdos version 3 or better. |
25 rem + djgpp version 1,11 maint 4 or better (but not version 2). | 25 rem + djgpp version 1.12maint1 or later (version 2.0 or later recommended). |
26 rem + make utility that allows breaking of the 128 chars limit on | 26 rem + make utility that allows breaking of the 128 chars limit on |
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. The make that comes with djgpp does work. | 28 rem line length limit. The make that comes with djgpp does work. |
29 rem + rm, mv, chmod (From GNU file utilities). | 29 rem + rm and mv (from GNU file utilities). |
30 rem + sed. | 30 rem + sed (you can use the port that comes with DJGPP). |
31 rem | 31 rem |
32 rem You should be able to get all the above utilities from | 32 rem You should be able to get all the above utilities from any SimTel |
33 rem oak.oakland.edu in the directories | 33 rem repository, e.g. ftp.coast.net, in the directories |
34 rem "/pub/msdos/djgpp" and "/pub/msdos/gnuish". There are other mirror | 34 rem "SimTel/vendors/djgpp" and "SimTel/vendors/gnu/gnuish/dos_only". As |
35 rem sites as well. | 35 rem usual, please use your local mirroring site to reduce trans-Atlantic |
36 rem traffic. | |
36 rem ---------------------------------------------------------------------- | 37 rem ---------------------------------------------------------------------- |
37 set X11= | 38 set X11= |
38 set nodebug= | 39 set nodebug= |
40 set djgpp-ver= | |
39 :again | 41 :again |
40 if "%1" == "" goto usage | 42 if "%1" == "" goto usage |
41 if "%1" == "--with-x" goto withx | 43 if "%1" == "--with-x" goto withx |
42 if "%1" == "--no-debug" goto nodebug | 44 if "%1" == "--no-debug" goto nodebug |
43 if "%1" == "msdos" goto msdos | 45 if "%1" == "msdos" goto msdos |
86 Echo To configure 'Emacs' you need to have 'gcc'! | 88 Echo To configure 'Emacs' you need to have 'gcc'! |
87 rm -f junk.c | 89 rm -f junk.c |
88 Goto End | 90 Goto End |
89 :gccOk | 91 :gccOk |
90 rm -f junk.c junk.o | 92 rm -f junk.c junk.o |
93 Echo Checking what version of DJGPP is installed... | |
94 If Not "%DJGPP%" == "" goto djgppOk | |
95 Echo To compile 'Emacs' under MS-DOS you MUST have DJGPP installed! | |
96 Goto End | |
97 :djgppOk | |
98 echo int main() >junk.c | |
99 echo #ifdef __DJGPP__ >>junk.c | |
100 echo {return (__DJGPP__)*10;} >>junk.c | |
101 echo #else >>junk.c | |
102 echo #ifdef __GO32__ >>junk.c | |
103 echo {return 10;} >>junk.c | |
104 echo #else >>junk.c | |
105 echo {return 0;} >>junk.c | |
106 echo #endif >>junk.c | |
107 echo #endif >>junk.c | |
108 gcc -o junk.exe junk.c | |
109 junk | |
110 If ErrorLevel 10 Goto go32Ok | |
111 rm -f junk.c junk junk.exe | |
112 Echo To compile 'Emacs' under MS-DOS you MUST have DJGPP installed! | |
113 Goto End | |
114 :go32Ok | |
115 set djgpp-ver=1 | |
116 If ErrorLevel 20 set djgpp-ver=2 | |
117 rm -f junk.c junk junk.exe | |
118 Echo Configuring for DJGPP Version %DJGPP-VER% ... | |
91 Rem ---------------------------------------------------------------------- | 119 Rem ---------------------------------------------------------------------- |
92 Echo Configuring the source directory... | 120 Echo Configuring the source directory... |
93 cd src | 121 cd src |
94 | 122 |
95 rem Create "paths.h" | 123 rem Create "paths.h" |
111 if exist dir.h ren dir.h vmsdir.h | 139 if exist dir.h ren dir.h vmsdir.h |
112 | 140 |
113 rem Create "makefile" from "makefile.in". | 141 rem Create "makefile" from "makefile.in". |
114 rm -f makefile junk.c | 142 rm -f makefile junk.c |
115 sed -e "1,/cpp stuff/s@^# .*$@@" <makefile.in >junk.c | 143 sed -e "1,/cpp stuff/s@^# .*$@@" <makefile.in >junk.c |
144 If "%DJGPP-VER%" == "1" Goto mfV1 | |
145 gcc -E junk.c | sed -f ../msdos/sed1v2.inp >makefile | |
146 goto mfDone | |
147 :mfV1 | |
116 gcc -E junk.c | sed -f ../msdos/sed1.inp >makefile | 148 gcc -E junk.c | sed -f ../msdos/sed1.inp >makefile |
149 :mfDone | |
117 rm -f junk.c | 150 rm -f junk.c |
118 | 151 |
119 if "%X11%" == "" goto src5 | 152 if "%X11%" == "" goto src5 |
120 mv makefile makefile.tmp | 153 mv makefile makefile.tmp |
121 sed -f ../msdos/sed1x.inp <makefile.tmp >makefile | 154 sed -f ../msdos/sed1x.inp <makefile.tmp >makefile |
122 rm -f makefile.tmp | 155 rm -f makefile.tmp |
123 :src5 | 156 :src5 |
124 | 157 |
125 if "%nodebug%" == "" goto src6 | 158 if "%nodebug%" == "" goto src6 |
126 sed -e "/^CFLAGS *=/s/ *-g//" <makefile >makefile.tmp | 159 sed -e "/^CFLAGS *=/s/ *-g//" <makefile >makefile.tmp |
127 mv -f makefile.tmp makefile | 160 sed -e "/^LDFLAGS *=/s/=/=-s/" <makefile.tmp >makefile |
161 rm -f makefile.tmp | |
128 :src6 | 162 :src6 |
129 cd .. | 163 cd .. |
130 rem ---------------------------------------------------------------------- | 164 rem ---------------------------------------------------------------------- |
131 Echo Configuring the library source directory... | 165 Echo Configuring the library source directory... |
132 cd lib-src | 166 cd lib-src |
133 rem Create "makefile" from "makefile.in". | 167 rem Create "makefile" from "makefile.in". |
134 sed -e "1,/cpp stuff/s@^# .*$@@" <makefile.in >junk.c | 168 sed -e "1,/cpp stuff/s@^# .*$@@" <makefile.in >junk.c |
135 gcc -E -I. -I../src junk.c | sed -e "s/^ / /" -e "/^#/d" -e "/^[ ]*$/d" >makefile.new | 169 gcc -E -I. -I../src junk.c | sed -e "s/^ / /" -e "/^#/d" -e "/^[ ]*$/d" >makefile.new |
170 If "%DJGPP-VER%" == "2" goto libsrc-v2 | |
136 sed -f ../msdos/sed3.inp <makefile.new >makefile | 171 sed -f ../msdos/sed3.inp <makefile.new >makefile |
172 Goto libsrc2 | |
173 :libsrc-v2 | |
174 sed -f ../msdos/sed3v2.inp <makefile.new >makefile | |
175 :libsrc2 | |
137 rm -f makefile.new junk.c | 176 rm -f makefile.new junk.c |
138 if "%nodebug%" == "" goto libsrc2 | 177 if "%nodebug%" == "" goto libsrc3 |
139 sed -e "/^CFLAGS *=/s/ *-g//" <makefile >makefile.tmp | 178 sed -e "/^CFLAGS *=/s/ *-g//" <makefile >makefile.tmp |
140 mv -f makefile.tmp makefile | 179 sed -e "/^ALL_CFLAGS *=/s/=/= -s/" <makefile.tmp >makefile |
141 :libsrc2 | 180 rm -f makefile.tmp |
181 :libsrc3 | |
142 cd .. | 182 cd .. |
143 rem ---------------------------------------------------------------------- | 183 rem ---------------------------------------------------------------------- |
144 if "%X11%" == "" goto oldx1 | 184 if "%X11%" == "" goto oldx1 |
145 Echo Configuring the oldxmenu directory... | 185 Echo Configuring the oldxmenu directory... |
146 cd oldxmenu | 186 cd oldxmenu |
151 :oldx2 | 191 :oldx2 |
152 cd .. | 192 cd .. |
153 :oldx1 | 193 :oldx1 |
154 rem ---------------------------------------------------------------------- | 194 rem ---------------------------------------------------------------------- |
155 Echo Configuring the main directory... | 195 Echo Configuring the main directory... |
156 copy msdos\mainmake makefile >nul | 196 If "%DJGPP-VER%" == "2" copy msdos\mainmake.v2 makefile >nul |
197 If "%DJGPP-VER%" == "1" copy msdos\mainmake makefile >nul | |
157 rem ---------------------------------------------------------------------- | 198 rem ---------------------------------------------------------------------- |
158 :end | 199 :end |
159 set X11= | 200 set X11= |
160 set nodebug= | 201 set nodebug= |
202 set djgpp-ver= |