X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/c59929c351ad73fea266a2fd02024abf6855c298..f6a6af95751ea221543af282bb525c4429f41b3e:/djgpp/config.bat diff --git a/djgpp/config.bat b/djgpp/config.bat index df9e508c..ee9c4c7f 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. @@ -169,7 +190,18 @@ 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,6 +209,9 @@ 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... @@ -234,28 +269,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 +419,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