2 Rem Configure Bison for DJGPP.
4 Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
5 Rem format, or else stock DOS/Windows shells will refuse to run it.
7 Rem Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10 Rem This program is free software: you can redistribute it and/or modify
11 Rem it under the terms of the GNU General Public License as published by
12 Rem the Free Software Foundation, either version 3 of the License, or
13 Rem (at your option) any later version.
15 Rem This program is distributed in the hope that it will be useful,
16 Rem but WITHOUT ANY WARRANTY; without even the implied warranty of
17 Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 Rem GNU General Public License for more details.
20 Rem You should have received a copy of the GNU General Public License
21 Rem along with this program. If not, see <http://www.gnu.org/licenses/>.
23 echo Configuring Bison
for DJGPP v2.x...
25 Rem The SmallEnv tests protect against fixed and too small size
26 Rem of the environment in stock DOS shell.
28 Rem Find out if NLS is wanted or not,
29 Rem if dependency-tracking is wanted or not,
30 Rem if caching is wanted or not
31 Rem and where the sources are.
32 Rem We always default to NLS support,
33 Rem no dependency tracking
34 Rem and to in place configuration.
37 if not "%NLS%" == "enabled" goto SmallEnv
39 if not "%CACHING%" == "enabled" goto SmallEnv
40 set DEPENDENCY_TRACKING
=disabled
41 if not "%DEPENDENCY_TRACKING%" == "disabled" goto SmallEnv
42 set LIBICONV_PREFIX
=disabled
43 if not "%LIBICONV_PREFIX%" == "disabled" goto SmallEnv
44 set LIBINTL_PREFIX
=disabled
45 if not "%LIBINTL_PREFIX%" == "disabled" goto SmallEnv
47 if not "%HTML%" == "enabled" goto SmallEnv
49 if not "%XSRC%" == "." goto SmallEnv
51 Rem Loop over all arguments.
52 Rem Special arguments are: NLS, XSRC, CACHE, STATIC_LIBS, LIBICONV_PREFIX, LIBINTL_PREFIX and DEPS.
53 Rem All other arguments are stored into ARGS.
55 if "%1" == "nls" goto NextArgument
56 if "%1" == "NLS" goto NextArgument
57 if "%1" == "no-nls" goto NoNLS
58 if "%1" == "no-NLS" goto NoNLS
59 if "%1" == "NO-NLS" goto NoNLS
62 if "%1" == "no-nls" set NLS
=disabled
63 if "%1" == "no-NLS" set NLS
=disabled
64 if "%1" == "NO-NLS" set NLS
=disabled
65 if not "%NLS%" == "disabled" goto SmallEnv
68 if "%1" == "cache" goto NextArgument
69 if "%1" == "CACHE" goto NextArgument
70 if "%1" == "no-cache" goto NoCaching
71 if "%1" == "no-CACHE" goto NoCaching
72 if "%1" == "NO-CACHE" goto NoCaching
75 if "%1" == "no-cache" set CACHING
=disabled
76 if "%1" == "no-CACHE" set CACHING
=disabled
77 if "%1" == "NO-CACHE" set CACHING
=disabled
78 if not "%CACHING%" == "disabled" goto SmallEnv
81 if "%1" == "no-dep" goto NextArgument
82 if "%1" == "no-DEP" goto NextArgument
83 if "%1" == "NO-DEP" goto NextArgument
84 if "%1" == "dep" goto DependecyTraking
85 if "%1" == "DEP" goto DependecyTraking
86 goto LibiconvPrefixOption
88 if "%1" == "dep" set DEPENDENCY_TRACKING
=enabled
89 if "%1" == "DEP" set DEPENDENCY_TRACKING
=enabled
90 if not "%DEPENDENCY_TRACKING%" == "enabled" goto SmallEnv
93 if "%1" == "no-libiconvprefix" goto NextArgument
94 if "%1" == "no-LIBICONVPREFIX" goto NextArgument
95 if "%1" == "NO-LIBICONVPREFIX" goto NextArgument
96 if "%1" == "libiconvprefix" goto WithLibiconvPrefix
97 if "%1" == "LIBICONVPREFIX" goto WithLibiconvPrefix
98 goto LibintlPrefixOption
100 if "%1" == "libiconvprefix" set LIBICONV_PREFIX
=enabled
101 if "%1" == "LIBICONVPREFIX" set LIBICONV_PREFIX
=enabled
102 if not "%LIBICONV_PREFIX%" == "enabled" goto SmallEnv
105 if "%1" == "no-libiconvprefix" goto NextArgument
106 if "%1" == "no-LIBICONVPREFIX" goto NextArgument
107 if "%1" == "NO-LIBICONVPREFIX" goto NextArgument
108 if "%1" == "libintlprefix" goto _WithLibintlPrefix
109 if "%1" == "LIBINTLPREFIX" goto _WithLibintlPrefix
112 if "%1" == "libintlprefix" set LIBINTL_PREFIX
=enabled
113 if "%1" == "LIBINTLPREFIX" set LIBINTL_PREFIX
=enabled
114 if not "%LIBINTL_PREFIX%" == "enabled" goto SmallEnv
116 if "%1" == "withhtml" goto NextArgument
117 if "%1" == "withHTML" goto NextArgument
118 if "%1" == "WITHHTML" goto NextArgument
119 if "%1" == "withouthtml" goto _WithoutHTML
120 if "%1" == "withoutHTML" goto _WithoutHTML
121 if "%1" == "WITHOUTHTML" goto _WithoutHTML
124 if "%1" == "withouthtml" set HTML
=disabled
125 if "%1" == "withoutHTML" set HTML
=disabled
126 if "%1" == "WITHOUTHTML" set HTML
=disabled
127 if not "%HTML%" == "disabled" goto SmallEnv
130 echo %1 | grep
-q
"/"
131 if errorlevel 1 goto CollectArgument
133 if not "%XSRC%" == "%1" goto SmallEnv
137 if not "%_ARGS%" == "%ARGS% %1" if not "%_ARGS%" == "%ARGS%%1" goto SmallEnv
138 echo %_ARGS% | grep
-q
"[^ ]"
139 if not errorlevel 0 set ARGS
=%_ARGS%
143 if not "%1" == "" goto ArgLoop
145 Rem Create an arguments file for the configure script.
146 echo --srcdir
=%XSRC% > args
147 if "%CACHING%" == "enabled" echo --cache-file
=%XSRC%/djgpp
/config.
cache >> args
148 if "%DEPENDENCY_TRACKING%" == "enabled" echo --enable
-dependency
-tracking
>> args
149 if "%DEPENDENCY_TRACKING%" == "disabled" echo --disable
-dependency
-tracking
>> args
150 if "%LIBICONV_PREFIX%" == "enabled" echo --with
-libiconv
-prefix
>> args
151 if "%LIBICONV_PREFIX%" == "disabled" echo --without
-libiconv
-prefix
>> args
152 if "%LIBINTL_PREFIX%" == "enabled" echo --with
-libintl
-prefix
>> args
153 if "%LIBINTL_PREFIX%" == "disabled" echo --without
-libintl
-prefix
>> args
154 if "%HTML%" == "enabled" echo --enable
-html
>> args
155 if "%HTML%" == "disabled" echo --disable
-html
>> args
156 if not "%ARGS%" == "" echo %ARGS% >> args
159 set DEPENDENCY_TRACKING
=
164 if "%XSRC%" == "." goto InPlace
167 redir
-e
/dev
/null update
%XSRC%/configure.org .
/configure
169 if errorlevel 1 update
%XSRC%/configure .
/configure
172 Rem Update configuration files
173 echo Updating configuration scripts...
174 test
-f .
/configure.org
175 if errorlevel 1 update configure configure.org
176 sed
-f
%XSRC%/djgpp
/config.sed configure.org
> configure
177 if errorlevel 1 goto SedError
179 Rem Make sure they have a config.site file
180 set CONFIG_SITE
=%XSRC%/djgpp
/config.site
181 if not "%CONFIG_SITE%" == "%XSRC%/djgpp/config.site" goto SmallEnv
183 Rem inttypes_.h and inttypes.h map to the same 8.3 alias.
184 test
-f
%XSRC%/lib
/inttypes_.h
185 if not errorlevel 1 mv
-f
%XSRC%/lib
/inttypes_.h
%XSRC%/lib
/_inttypes.h
187 Rem Make sure crucial file names are not munged by unpacking
188 test
-f
%XSRC%/po
/Makefile.in.in
189 if not errorlevel 1 mv
-f
%XSRC%/po
/Makefile.in.in
%XSRC%/po
/Makefile.in
-in
190 test
-f
%XSRC%/po
/Makefile.in
-in
191 if errorlevel 1 mv
-f
%XSRC%/po
/Makefile.in
%XSRC%/po
/Makefile.in
-in
192 test
-f
%XSRC%/po
/Makefile.in
-in
193 if errorlevel 1 mv
-f
%XSRC%/po
/Makefile.inin
%XSRC%/po
/Makefile.in
-in
194 test
-f
%XSRC%/po
/Makefile.in
-in
195 if errorlevel 1 mv
-f
%XSRC%/po
/Makefile.in_in
%XSRC%/po
/Makefile.in
-in
196 test
-f
%XSRC%/po
/Makefile.in
-in
197 if errorlevel 1 mv
-f
%XSRC%/po
/Makefile_in.in
%XSRC%/po
/Makefile.in
-in
198 test
-f
%XSRC%/runtime
-po
/Makefile.in.in
199 if not errorlevel 1 mv
-f
%XSRC%/runtime
-po
/Makefile.in.in
%XSRC%/runtime
-po
/Makefile.in
-in
200 test
-f
%XSRC%/runtime
-po
/Makefile.in
-in
201 if errorlevel 1 mv
-f
%XSRC%/runtime
-po
/Makefile.in
%XSRC%/runtime
-po
/Makefile.in
-in
202 test
-f
%XSRC%/runtime
-po
/Makefile.in
-in
203 if errorlevel 1 mv
-f
%XSRC%/runtime
-po
/Makefile.inin
%XSRC%/runtime
-po
/Makefile.in
-in
204 test
-f
%XSRC%/runtime
-po
/Makefile.in
-in
205 if errorlevel 1 mv
-f
%XSRC%/runtime
-po
/Makefile.in_in
%XSRC%/runtime
-po
/Makefile.in
-in
206 test
-f
%XSRC%/runtime
-po
/Makefile.in
-in
207 if errorlevel 1 mv
-f
%XSRC%/runtime
-po
/Makefile_in.in
%XSRC%/runtime
-po
/Makefile.in
-in
208 test
-f
%XSRC%/data
/c
++.m4
209 if not errorlevel 1 mv
-f
%XSRC%/data
/c
++.m4
%XSRC%/data
/cxx.m4
210 test
-f
%XSRC%/data
/cxx.m4
211 if errorlevel 1 mv
-f
%XSRC%/data
/cpp.m4
%XSRC%/data
/cxx.m4
212 test
-f
%XSRC%/data
/c
++-skel.m4
213 if not errorlevel 1 mv
-f
%XSRC%/data
/c
++-skel.m4
%XSRC%/data
/cxx
-skel.m4
214 test
-f
%XSRC%/data
/cxx
-skel.m4
215 if errorlevel 1 mv
-f
%XSRC%/data
/cpp
-skel.m4
%XSRC%/data
/cxx
-skel.m4
216 test
-f
%XSRC%/build
-aux
/javacomp.sh.in
217 if not errorlevel 1 mv
-f
%XSRC%/build
-aux
/javacomp.sh.in
%XSRC%/build
-aux
/javacomp.sh
-in
218 test
-f
%XSRC%/build
-aux
/javacomp.sh
-in
219 if errorlevel 1 mv
-f
%XSRC%/build
-aux
/javacomp.sh
%XSRC%/build
-aux
/javacomp.sh
-in
220 test
-f
%XSRC%/build
-aux
/javacomp.sh
-in
221 if errorlevel 1 mv
-f
%XSRC%/build
-aux
/javacomp.shin
%XSRC%/build
-aux
/javacomp.sh
-in
222 test
-f
%XSRC%/build
-aux
/javacomp.sh
-in
223 if errorlevel 1 mv
-f
%XSRC%/build
-aux
/javacomp.sh_in
%XSRC%/build
-aux
/javacomp.sh
-in
224 test
-f
%XSRC%/build
-aux
/javacomp.sh
-in
225 if errorlevel 1 mv
-f
%XSRC%/build
-aux
/javacomp.sh.in
%XSRC%/build
-aux
/javacomp.sh
-in
226 test
-f
%XSRC%/build
-aux
/javaexec.sh.in
227 if not errorlevel 1 mv
-f
%XSRC%/build
-aux
/javaexec.sh.in
%XSRC%/build
-aux
/javaexec.sh
-in
228 test
-f
%XSRC%/build
-aux
/javaexec.sh
-in
229 if errorlevel 1 mv
-f
%XSRC%/build
-aux
/javaexec.sh
%XSRC%/build
-aux
/javaexec.sh
-in
230 test
-f
%XSRC%/build
-aux
/javaexec.sh
-in
231 if errorlevel 1 mv
-f
%XSRC%/build
-aux
/javaexec.shin
%XSRC%/build
-aux
/javaexec.sh
-in
232 test
-f
%XSRC%/build
-aux
/javaexec.sh
-in
233 if errorlevel 1 mv
-f
%XSRC%/build
-aux
/javaexec.sh_in
%XSRC%/build
-aux
/javaexec.sh
-in
234 test
-f
%XSRC%/build
-aux
/javaexec.sh
-in
235 if errorlevel 1 mv
-f
%XSRC%/build
-aux
/javaexec_sh.in
%XSRC%/build
-aux
/javaexec.sh
-in
236 test
-f
%XSRC%/doc
/yacc
.1.in
237 if not errorlevel 1 mv
-f
%XSRC%/doc
/yacc
.1.in
%XSRC%/doc
/yacc
.1-in
238 test
-f
%XSRC%/doc
/yacc
.1-in
239 if errorlevel 1 mv
-f
%XSRC%/doc
/yacc
.1 %XSRC%/doc
/yacc
.1-in
240 test
-f
%XSRC%/doc
/yacc
.1-in
241 if errorlevel 1 mv
-f
%XSRC%/doc
/yacc
.1in
%XSRC%/doc
/yacc
.1-in
242 test
-f
%XSRC%/doc
/yacc
.1-in
243 if errorlevel 1 mv
-f
%XSRC%/doc
/yacc
.1_in
%XSRC%/doc
/yacc
.1-in
244 test
-f
%XSRC%/doc
/yacc
.1-in
245 if errorlevel 1 mv
-f
%XSRC%/doc
/yacc_1.in
%XSRC%/doc
/yacc
.1-in
246 test
-f
%XSRC%/etc
/bench.pl.in
247 if not errorlevel 1 mv
-f
%XSRC%/etc
/bench.pl.in
%XSRC%/etc
/bench.pl
-in
248 test
-f
%XSRC%/etc
/bench.pl
-in
249 if errorlevel 1 mv
-f
%XSRC%/etc
/bench.pl
%XSRC%/etc
/bench.pl
-in
250 test
-f
%XSRC%/etc
/bench.pl
-in
251 if errorlevel 1 mv
-f
%XSRC%/etc
/bench.plin
%XSRC%/etc
/bench.pl
-in
252 test
-f
%XSRC%/etc
/bench.pl
-in
253 if errorlevel 1 mv
-f
%XSRC%/etc
/bench.pl_in
%XSRC%/etc
/bench.pl
-in
254 test
-f
%XSRC%/etc
/bench.pl
-in
255 if errorlevel 1 mv
-f
%XSRC%/etc
/bench_pl.in
%XSRC%/etc
/bench.pl
-in
258 test
-f
%XSRC%/src
/c
-scan
-gram.c
259 if not errorlevel 1 goto scan_skel_c_Test
260 test
-f
%XSRC%/src
/scan
-gram
-c.c
261 if not errorlevel 1 mv
-f
%XSRC%/src
/scan
-gram
-c.c
%XSRC%/src
/c
-scan
-gram.c
263 test
-f
%XSRC%/src
/c
-scan
-skel.c
264 if not errorlevel 1 goto FixFiles
265 test
-f
%XSRC%/src
/scan
-skel
-c.c
266 if not errorlevel 1 mv
-f
%XSRC%/src
/scan
-skel
-c.c
%XSRC%/src
/c
-scan
-skel.c
269 Rem Fix data/lalr1.cc and data/location.cc to reflect the renaming of c++.m4
270 sed
"s/c++\.m4/cxx.m4/" %XSRC%/data
/lalr1.cc
> lalr1.cc
271 if errorlevel 1 goto lalr1_ccFileError
272 mv .
/lalr1.cc
%XSRC%/data
/lalr1.cc
273 sed
"s/c++\.m4/cxx.m4/" %XSRC%/data
/location.cc
> location.cc
274 if errorlevel 1 goto location_ccFileError
275 mv .
/location.cc
%XSRC%/data
/location.cc
276 sed
"s/c++\.m4/cxx.m4/" %XSRC%/data
/glr.cc
> glr.cc
277 if errorlevel 1 goto glr_ccFileError
278 mv .
/glr.cc
%XSRC%/data
/glr.cc
280 Rem Fix src/getargs.c to reflect the renaming of c++-skel.m4
281 sed
"s/c++-skel\.m4/cxx-skel.m4/" %XSRC%/src
/getargs.c
> getargs.c
282 if errorlevel 1 goto getargs_cFileError
283 mv .
/getargs.c
%XSRC%/src
/getargs.c
285 Rem Define DJGPP specific defs in config.hin
286 echo Editing config.hin...
287 test
-f
%XSRC%/lib
/config_h.org
288 if errorlevel 1 update
%XSRC%/lib
/config.hin
%XSRC%/lib
/config_h.org
289 sed
-f
%XSRC%/djgpp
/config_h.sed
%XSRC%/lib
/config_h.org
> config.hin
290 if errorlevel 1 goto SedError2
291 mv
-f config.hin
%XSRC%/lib
/config.hin
294 Rem Fixing ilicit testsuite file name.
295 test
-f
%XSRC%/tests
/c
++.at
296 if not errorlevel 1 mv
-f
%XSRC%/tests
/c
++.at
%XSRC%/tests
/cxx.at
298 test
-f
%XSRC%/tests
/testsuite.org
299 if errorlevel 1 update
%XSRC%/tests
/testsuite
%XSRC%/tests
/testsuite.org
300 sed
-f
%XSRC%/djgpp
/testsuite.sed
%XSRC%/tests
/testsuite.org
> testsuite.tmp
301 if errorlevel 1 goto SedError3
302 mv
-f .
/testsuite.tmp
%XSRC%/tests
/testsuite
304 Rem Fixing ilicit calc++ file names in the calc++ directory.
305 test
-d
%XSRC%/examples
/calc
++
306 if not errorlevel 1 mv
-f
%XSRC%/examples
/calc
++ %XSRC%/examples
/calcxx
307 test
-d
%XSRC%/examples
/calcxx
308 if errorlevel 1 mv
-f
%XSRC%/examples
/calcpp
%XSRC%/examples
/calcxx
309 test
-f
%XSRC%/examples
/calcxx
/calc
++-scanner.cc
310 if not errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calc
++-scanner.cc
%XSRC%/examples
/calcxx
/calcxx
-scanner.cc
311 test
-f
%XSRC%/examples
/calcxx
/calcxx
-scanner.cc
312 if errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calcpp
-scanner.cc
%XSRC%/examples
/calcxx
/calcxx
-scanner.cc
313 test
-f
%XSRC%/examples
/calcxx
/calc
++-scanner.ll
314 if not errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calc
++-scanner.ll
%XSRC%/examples
/calcxx
/calcxx
-scanner.ll
315 test
-f
%XSRC%/examples
/calcxx
/calcxx
-scanner.ll
316 if errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calcpp
-scanner.ll
%XSRC%/examples
/calcxx
/calcxx
-scanner.ll
317 test
-f
%XSRC%/examples
/calcxx
/calc
++-driver.cc
318 if not errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calc
++-driver.cc
%XSRC%/examples
/calcxx
/calcxx
-driver.cc
319 test
-f
%XSRC%/examples
/calcxx
/calcxx
-driver.cc
320 if errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calcpp
-driver.cc
%XSRC%/examples
/calcxx
/calcxx
-driver.cc
321 test
-f
%XSRC%/examples
/calcxx
/calc
++-driver.hh
322 if not errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calc
++-driver.hh
%XSRC%/examples
/calcxx
/calcxx
-driver.hh
323 test
-f
%XSRC%/examples
/calcxx
/calcxx
-driver.hh
324 if errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calcpp
-driver.hh
%XSRC%/examples
/calcxx
/calcxx
-driver.hh
325 test
-f
%XSRC%/examples
/calcxx
/calc
++-parser.cc
326 if not errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calc
++-parser.cc
%XSRC%/examples
/calcxx
/calcxx
-parser.cc
327 test
-f
%XSRC%/examples
/calcxx
/calcxx
-parser.cc
328 if errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calcpp
-parser.cc
%XSRC%/examples
/calcxx
/calcxx
-parser.cc
329 test
-f
%XSRC%/examples
/calcxx
/calc
++-parser.hh
330 if not errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calc
++-parser.hh
%XSRC%/examples
/calcxx
/calcxx
-parser.hh
331 test
-f
%XSRC%/examples
/calcxx
/calcxx
-parser.hh
332 if errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calcpp
-parser.hh
%XSRC%/examples
/calcxx
/calcxx
-parser.hh
333 test
-f
%XSRC%/examples
/calcxx
/calc
++-parser.stamp
334 if not errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calc
++-parser.stamp
%XSRC%/examples
/calcxx
/calcxx
-parser.stamp
335 test
-f
%XSRC%/examples
/calcxx
/calcxx
-parser.stamp
336 if errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calcpp
-parser.stamp
%XSRC%/examples
/calcxx
/calcxx
-parser.stamp
337 test
-f
%XSRC%/examples
/calcxx
/calc
++-parser.yy
338 if not errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calc
++-parser.yy
%XSRC%/examples
/calcxx
/calcxx
-parser.yy
339 test
-f
%XSRC%/examples
/calcxx
/calcxx
-parser.yy
340 if errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calcpp
-parser.yy
%XSRC%/examples
/calcxx
/calcxx
-parser.yy
341 test
-f
%XSRC%/examples
/calcxx
/calc
++.cc
342 if not errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calc
++.cc
%XSRC%/examples
/calcxx
/calcxx.cc
343 test
-f
%XSRC%/examples
/calcxx
/calcxx.cc
344 if errorlevel 1 mv
-f
%XSRC%/examples
/calcxx
/calcpp.cc
%XSRC%/examples
/calcxx
/calcxx.cc
346 Rem Fixing #include lines in calcxx files.
347 sed
"/#[ ]*include/s/++/xx/" %XSRC%/examples
/calcxx
/calcxx.cc
> calcxx.cc
348 if errorlevel 1 goto calcxxFileError
349 mv .
/calcxx.cc
%XSRC%/examples
/calcxx
/calcxx.cc
350 sed
"/#[ ]*include/s/++/xx/" %XSRC%/examples
/calcxx
/calcxx
-driver.cc
> calcxx
-driver.cc
351 if errorlevel 1 goto calcxxFileError
352 mv .
/calcxx
-driver.cc
%XSRC%/examples
/calcxx
/calcxx
-driver.cc
353 sed
"/#[ ]*include/s/++/xx/" %XSRC%/examples
/calcxx
/calcxx
-driver.hh
> calcxx
-driver.hh
354 if errorlevel 1 goto calcxxFileError
355 mv .
/calcxx
-driver.hh
%XSRC%/examples
/calcxx
/calcxx
-driver.hh
356 sed
"/#[ ]*include/s/++/xx/" %XSRC%/examples
/calcxx
/calcxx
-parser.cc
> calcxx
-parser.cc
357 if errorlevel 1 goto calcxxFileError
358 mv .
/calcxx
-parser.cc
%XSRC%/examples
/calcxx
/calcxx
-parser.cc
359 sed
"/#[ ]*include/s/++/xx/" %XSRC%/examples
/calcxx
/calcxx
-parser.hh
> calcxx
-parser.hh
360 if errorlevel 1 goto calcxxFileError
361 mv .
/calcxx
-parser.hh
%XSRC%/examples
/calcxx
/calcxx
-parser.hh
362 :sed "/#[ ]*include/s/++/xx/" %XSRC%/examples
/calcxx
/calcxx
-parser.yy
> calcxx
-parser.yy
363 :if errorlevel 1 goto calcxxFileError
364 :mv .
/calcxx
-parser.yy
%XSRC%/examples
/calcxx
/calcxx
-parser.yy
365 sed
"/#[ ]*include/s/++/xx/" %XSRC%/examples
/calcxx
/calcxx
-scanner.cc
> calcxx
-scanner.cc
366 if errorlevel 1 goto calcxxFileError
367 mv .
/calcxx
-scanner.cc
%XSRC%/examples
/calcxx
/calcxx
-scanner.cc
368 :sed "/#[ ]*include/s/++/xx/" %XSRC%/examples
/calcxx
/calcxx
-scanner.ll
> calcxx
-scanner.ll
369 :if errorlevel 1 goto calcxxFileError
370 :mv .
/calcxx
-scanner.ll
%XSRC%/examples
/calcxx
/calcxx
-scanner.ll
371 sed
"s/calc++/calcxx/" %XSRC%/examples
/calcxx
/test
> test
372 if errorlevel 1 goto calcxxFileError
373 mv .
/test
%XSRC%/examples
/calcxx
/test
376 Rem Fixing the scanner files to make file names 8.3 valid.
377 Rem Use only if you want to change the scan-gram.l and scan-skel.l files.
378 : sed
"/outfile=/s/\.yy/yy/" %XSRC%/src
/scan
-gram.l
> scan
-gram.l
379 : if errorlevel 1 goto ScannerFileError
380 : mv .
/scan
-gram.l
%XSRC%/src
/scan
-gram.l
381 : sed
"/outfile=/s/\.yy/yy/" %XSRC%/src
/scan
-skel.l
> scan
-skel.l
382 : if errorlevel 1 goto ScannerFileError
383 : mv .
/scan
-skel.l
%XSRC%/src
/scan
-skel.l
386 Rem This is required because DOS/Windows are case-insensitive
387 Rem to file names, and "make install" will do nothing if Make
388 Rem finds a file called `install'.
389 if exist INSTALL
ren INSTALL INSTALL.txt
391 Rem Set SHELL to a sane default or some configure tests stop working
392 Rem if the package is configured across partitions.
393 if not "%SHELL%" == "" goto HomeName
395 if not "%SHELL%" == "/bin/sh" goto SmallEnv
396 echo No
SHELL found in the environment
, using default value
399 Rem Set HOME to a sane default so configure stops complaining.
400 if not "%HOME%" == "" goto HostName
401 set HOME
=%XSRC%/djgpp
402 if not "%HOME%" == "%XSRC%/djgpp" goto SmallEnv
403 echo No HOME found in the environment
, using default value
406 Rem Set HOSTNAME so it shows in config.status
407 if not "%HOSTNAME%" == "" goto hostdone
408 if "%windir%" == "" goto msdos
410 if not "%OS%" == "MS-Windows" goto SmallEnv
414 if not "%OS%" == "MS-DOS" goto SmallEnv
416 if not "%USERNAME%" == "" goto haveuname
417 if not "%USER%" == "" goto haveuser
418 echo No USERNAME and no USER found in the environment
, using default values
419 set HOSTNAME
=Unknown PC
420 if not "%HOSTNAME%" == "Unknown PC" goto SmallEnv
423 set HOSTNAME
=%USER%'s PC
424 if not "%HOSTNAME%" == "%USER%'s PC
" goto SmallEnv
427 set HOSTNAME=%USERNAME%'s PC
428 if not "%HOSTNAME%" == "%USERNAME%'s PC" goto SmallEnv
430 set _HOSTNAME=%HOSTNAME%, %OS%
431 if not "%_HOSTNAME%" == "%HOSTNAME%, %OS%" goto SmallEnv
432 set HOSTNAME=%_HOSTNAME%
437 Rem install-sh is required by the configure script but clashes with the
438 Rem various Makefile install-foo targets, so we MUST have it before the
439 Rem script runs and rename it afterwards
440 test -f %XSRC%/install-sh
441 if not errorlevel 1 goto NoRen0
442 test -f %XSRC%/install-sh.sh
443 if not errorlevel 1 mv -f %XSRC%/install-sh.sh %XSRC%/install-sh
446 if "%NLS%" == "disabled" goto WithoutNLS
449 Rem Check for the needed libraries and binaries.
450 test -x /dev/env/DJDIR/bin/msgfmt.exe
451 if errorlevel 1 goto MissingNLSTools
452 test -x /dev/env/DJDIR/bin/xgettext.exe
453 if errorlevel 1 goto MissingNLSTools
454 test -f /dev/env/DJDIR/include/libcharset.h
455 if errorlevel 1 goto MissingNLSTools
456 test -f /dev/env/DJDIR/lib/libcharset.a
457 if errorlevel 1 goto MissingNLSTools
458 test -f /dev/env/DJDIR/include/iconv.h
459 if errorlevel 1 goto MissingNLSTools
460 test -f /dev/env/DJDIR/lib/libiconv.a
461 if errorlevel 1 goto MissingNLSTools
462 test -f /dev/env/DJDIR/include/libintl.h
463 if errorlevel 1 goto MissingNLSTools
464 test -f /dev/env/DJDIR/lib/libintl.a
465 if errorlevel 1 goto MissingNLSTools
467 Rem Recreate the files in the %XSRC%/po subdir with our ported tools.
468 redir -e /dev/null rm %XSRC%/po/*.gmo
469 redir -e /dev/null rm %XSRC%/po/bison.pot
470 redir -e /dev/null rm %XSRC%/po/cat-id-tbl.c
471 redir -e /dev/null rm %XSRC%/po/stamp-cat-id
473 Rem Update the arguments file for the configure script.
474 Rem We prefer without-included-gettext because libintl.a from gettext package
475 Rem is the only one that is garanteed to have been ported to DJGPP.
476 echo --enable-nls --without-included-gettext >> args
477 goto ConfigurePackage
480 echo Needed libs/tools for NLS not found. Configuring without NLS.
482 Rem Update the arguments file for the configure script.
483 echo --disable-nls >> args
486 echo Running the ./configure script...
488 if errorlevel 1 goto CfgError
494 echo ./data/lalr1.cc file editing failed!
498 echo ./data/glr.cc file editing failed!
502 echo ./src/getargs.c file editing failed!
505 :location_ccFileError
506 echo ./data/location.cc file editing failed!
510 echo ./examples/calcxx file editing failed!
514 echo ./scanner file editing failed!
518 echo ./configure script editing failed!
522 echo ./lib/config.hin editing failed!
526 echo ./tests/testsuite editing failed!
530 echo ./configure script exited abnormally!
534 echo Your environment size is too small. Enlarge it and run me again.
535 echo Configuration NOT done!
538 test -f %XSRC%/install-sh.sh
539 if not errorlevel 1 goto NoRen1
540 test -f %XSRC%/install-sh
541 if not errorlevel 1 mv -f %XSRC%/install-sh %XSRC%/install-sh.sh
543 if "%SHELL%" == "/bin/sh" set SHELL=
544 if "%HOME%" == "%XSRC%/djgpp" set HOME=