X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/c59929c351ad73fea266a2fd02024abf6855c298..ba7560e26bfa2f5a340545830d46e0437fcb701a:/djgpp/config.bat?ds=sidebyside diff --git a/djgpp/config.bat b/djgpp/config.bat index df9e508c..05c2ba2c 100644 --- a/djgpp/config.bat +++ b/djgpp/config.bat @@ -1,5 +1,26 @@ @echo off -echo Configuring GNU Bison for DJGPP v2.x... +Rem Configure Bison for DJGPP. + +Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line +Rem format, or else stock DOS/Windows shells will refuse to run it. + +Rem Copyright (C) 2005, 2006 Free Software Foundation, Inc. + +Rem This program is free software; you can redistribute it and/or modify +Rem it under the terms of the GNU General Public License as published by +Rem the Free Software Foundation; either version 2, or (at your option) +Rem any later version. + +Rem This program is distributed in the hope that it will be useful, +Rem but WITHOUT ANY WARRANTY; without even the implied warranty of +Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +Rem GNU General Public License for more details. + +Rem You should have received a copy of the GNU General Public License +Rem along with this program; if not, write to the Free Software Foundation, +Rem Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +echo Configuring Bison for DJGPP v2.x... Rem The SmallEnv tests protect against fixed and too small size Rem of the environment in stock DOS shell. @@ -136,6 +157,9 @@ if not "%ARGS%" == "" echo %ARGS% >> arguments set ARGS= set CACHING= set DEPENDENCY_TRACKING= +set LIBICONV_PREFIX= +set LIBINTL_PREFIX= +set HTML= if "%XSRC%" == "." goto InPlace @@ -161,15 +185,38 @@ test -f %XSRC%/po/Makefile.in.in if not errorlevel 1 mv -f %XSRC%/po/Makefile.in.in %XSRC%/po/Makefile.in-in test -f %XSRC%/po/Makefile.in-in if errorlevel 1 mv -f %XSRC%/po/Makefile.in %XSRC%/po/Makefile.in-in +test -f %XSRC%/po/Makefile.in-in +if errorlevel 1 mv -f %XSRC%/po/Makefile.inin %XSRC%/po/Makefile.in-in +test -f %XSRC%/po/Makefile.in-in +if errorlevel 1 mv -f %XSRC%/po/Makefile.in_in %XSRC%/po/Makefile.in-in +test -f %XSRC%/po/Makefile.in-in +if errorlevel 1 mv -f %XSRC%/po/Makefile_in.in %XSRC%/po/Makefile.in-in test -f %XSRC%/runtime-po/Makefile.in.in if not errorlevel 1 mv -f %XSRC%/runtime-po/Makefile.in.in %XSRC%/runtime-po/Makefile.in-in test -f %XSRC%/runtime-po/Makefile.in-in if errorlevel 1 mv -f %XSRC%/runtime-po/Makefile.in %XSRC%/runtime-po/Makefile.in-in +test -f %XSRC%/runtime-po/Makefile.in-in +if errorlevel 1 mv -f %XSRC%/runtime-po/Makefile.inin %XSRC%/runtime-po/Makefile.in-in +test -f %XSRC%/runtime-po/Makefile.in-in +if errorlevel 1 mv -f %XSRC%/runtime-po/Makefile.in_in %XSRC%/runtime-po/Makefile.in-in +test -f %XSRC%/runtime-po/Makefile.in-in +if errorlevel 1 mv -f %XSRC%/runtime-po/Makefile_in.in %XSRC%/runtime-po/Makefile.in-in test -f %XSRC%/data/c++.m4 if not errorlevel 1 mv -f %XSRC%/data/c++.m4 %XSRC%/data/cxx.m4 test -f %XSRC%/data/cxx.m4 if errorlevel 1 mv -f %XSRC%/data/cpp.m4 %XSRC%/data/cxx.m4 - +:scan_gram_c_Test +test -f %XSRC%/src/c-scan-gram.c +if not errorlevel 1 goto scan_skel_c_Test +test -f %XSRC%/src/scan-gram-c.c +if not errorlevel 1 mv -f %XSRC%/src/scan-gram-c.c %XSRC%/src/c-scan-gram.c +:scan_skel_c_Test +test -f %XSRC%/src/c-scan-skel.c +if not errorlevel 1 goto FixFiles +test -f %XSRC%/src/scan-skel-c.c +if not errorlevel 1 mv -f %XSRC%/src/scan-skel-c.c %XSRC%/src/c-scan-skel.c + +:FixFiles Rem Fix data/lalr1.cc and data/location.cc to reflect the renaming of c++.m4 sed "s/c++\.m4/cxx.m4/" %XSRC%/data/lalr1.cc > lalr1.cc if errorlevel 1 goto lalr1_ccFileError @@ -177,14 +224,17 @@ mv ./lalr1.cc %XSRC%/data/lalr1.cc sed "s/c++\.m4/cxx.m4/" %XSRC%/data/location.cc > location.cc if errorlevel 1 goto location.ccFileError mv ./location.cc %XSRC%/data/location.cc +sed "s/c++\.m4/cxx.m4/" %XSRC%/data/glr.cc > glr.cc +if errorlevel 1 goto glr.ccFileError +mv ./glr.cc %XSRC%/data/glr.cc Rem Define DJGPP specific defs in config.hin echo Editing config.hin... -test -f %XSRC%/config_h.orig -if errorlevel 1 update %XSRC%/config.hin %XSRC%/config_h.orig -sed -f %XSRC%/djgpp/config_h.sed %XSRC%/config_h.orig > config.hin +test -f %XSRC%/lib/config_h.orig +if errorlevel 1 update %XSRC%/lib/config.hin %XSRC%/lib/config_h.orig +sed -f %XSRC%/djgpp/config_h.sed %XSRC%/lib/config_h.orig > config.hin if errorlevel 1 goto SedError2 -mv -f config.hin %XSRC%/config.hin +mv -f config.hin %XSRC%/lib/config.hin Rem Fixing ilicit testsuite file name. @@ -234,28 +284,28 @@ test -f %XSRC%/examples/calcxx/calcxx.cc if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp.cc %XSRC%/examples/calcxx/calcxx.cc Rem Fixing #include lines in calcxx files. -sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx.cc > calcxx.cc +sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx.cc > calcxx.cc if errorlevel 1 goto calcxxFileError mv ./calcxx.cc %XSRC%/examples/calcxx/calcxx.cc -sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.cc > calcxx-driver.cc +sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.cc > calcxx-driver.cc if errorlevel 1 goto calcxxFileError mv ./calcxx-driver.cc %XSRC%/examples/calcxx/calcxx-driver.cc -sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.hh > calcxx-driver.hh +sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.hh > calcxx-driver.hh if errorlevel 1 goto calcxxFileError mv ./calcxx-driver.hh %XSRC%/examples/calcxx/calcxx-driver.hh -sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.cc > calcxx-parser.cc +sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.cc > calcxx-parser.cc if errorlevel 1 goto calcxxFileError mv ./calcxx-parser.cc %XSRC%/examples/calcxx/calcxx-parser.cc -sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.hh > calcxx-parser.hh +sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.hh > calcxx-parser.hh if errorlevel 1 goto calcxxFileError mv ./calcxx-parser.hh %XSRC%/examples/calcxx/calcxx-parser.hh -:sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.yy > calcxx-parser.yy +:sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.yy > calcxx-parser.yy :if errorlevel 1 goto calcxxFileError :mv ./calcxx-parser.yy %XSRC%/examples/calcxx/calcxx-parser.yy -sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.cc > calcxx-scanner.cc +sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.cc > calcxx-scanner.cc if errorlevel 1 goto calcxxFileError mv ./calcxx-scanner.cc %XSRC%/examples/calcxx/calcxx-scanner.cc -:sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.ll > calcxx-scanner.ll +:sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.ll > calcxx-scanner.ll :if errorlevel 1 goto calcxxFileError :mv ./calcxx-scanner.ll %XSRC%/examples/calcxx/calcxx-scanner.ll sed "s/calc++/calcxx/" %XSRC%/examples/calcxx/test > test @@ -384,6 +434,10 @@ goto End echo ./data/lalr1.cc file editing failed! goto End +:glr_ccFileError +echo ./data/glr.cc file editing failed! +goto End + :location_ccFileError echo ./data/location.cc file editing failed! goto End @@ -420,10 +474,7 @@ if not errorlevel 1 mv -f %XSRC%/install-sh %XSRC%/install-sh.sh :NoRen1 if "%SHELL%" == "/bin/sh" set SHELL= if "%HOME%" == "%XSRC%/djgpp" set HOME= -set ARGS= set CONFIG_SITE= set HOSTNAME= set NLS= -set CACHING= -set DEPENDENCY_TRACKING= set XSRC=