]> git.saurik.com Git - bison.git/blobdiff - djgpp/config.bat
* Comment fixes.
[bison.git] / djgpp / config.bat
index df9e508c1385a9ae4017febe853c16d351d85eb5..ee9c4c7f796692e12dbea3a70c6e75db7ccabaf7 100644 (file)
@@ -1,5 +1,26 @@
 @echo off\r
-echo Configuring GNU Bison for DJGPP v2.x...\r
+Rem Configure Bison for DJGPP.\r
+\r
+Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line\r
+Rem format, or else stock DOS/Windows shells will refuse to run it.\r
+\r
+Rem Copyright (C) 2005, 2006 Free Software Foundation, Inc.\r
+\r
+Rem This program is free software; you can redistribute it and/or modify\r
+Rem it under the terms of the GNU General Public License as published by\r
+Rem the Free Software Foundation; either version 2, or (at your option)\r
+Rem any later version.\r
+\r
+Rem This program is distributed in the hope that it will be useful,\r
+Rem but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+Rem GNU General Public License for more details.\r
+\r
+Rem You should have received a copy of the GNU General Public License\r
+Rem along with this program; if not, write to the Free Software Foundation,\r
+Rem Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
+\r
+echo Configuring Bison for DJGPP v2.x...\r
 \r
 Rem The SmallEnv tests protect against fixed and too small size\r
 Rem of the environment in stock DOS shell.\r
@@ -169,7 +190,18 @@ test -f %XSRC%/data/c++.m4
 if not errorlevel 1 mv -f %XSRC%/data/c++.m4 %XSRC%/data/cxx.m4\r
 test -f %XSRC%/data/cxx.m4\r
 if errorlevel 1 mv -f %XSRC%/data/cpp.m4 %XSRC%/data/cxx.m4\r
-\r
+:scan_gram_c_Test\r
+test -f %XSRC%/src/c-scan-gram.c\r
+if not errorlevel 1 goto scan_skel_c_Test\r
+test -f %XSRC%/src/scan-gram-c.c\r
+if not errorlevel 1 mv -f %XSRC%/src/scan-gram-c.c %XSRC%/src/c-scan-gram.c\r
+:scan_skel_c_Test\r
+test -f %XSRC%/src/c-scan-skel.c\r
+if not errorlevel 1 goto FixFiles\r
+test -f %XSRC%/src/scan-skel-c.c\r
+if not errorlevel 1 mv -f %XSRC%/src/scan-skel-c.c %XSRC%/src/c-scan-skel.c\r
+\r
+:FixFiles\r
 Rem Fix data/lalr1.cc and data/location.cc to reflect the renaming of c++.m4\r
 sed "s/c++\.m4/cxx.m4/" %XSRC%/data/lalr1.cc > lalr1.cc\r
 if errorlevel 1 goto lalr1_ccFileError\r
@@ -177,6 +209,9 @@ mv ./lalr1.cc %XSRC%/data/lalr1.cc
 sed "s/c++\.m4/cxx.m4/" %XSRC%/data/location.cc > location.cc\r
 if errorlevel 1 goto location.ccFileError\r
 mv ./location.cc %XSRC%/data/location.cc\r
+sed "s/c++\.m4/cxx.m4/" %XSRC%/data/glr.cc > glr.cc\r
+if errorlevel 1 goto glr.ccFileError\r
+mv ./glr.cc %XSRC%/data/glr.cc\r
 \r
 Rem Define DJGPP specific defs in config.hin\r
 echo Editing config.hin...\r
@@ -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\r
 \r
 Rem Fixing #include lines in calcxx files.\r
-sed "/#[       ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx.cc > calcxx.cc\r
+sed "/#[        ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx.cc > calcxx.cc\r
 if errorlevel 1 goto calcxxFileError\r
 mv ./calcxx.cc %XSRC%/examples/calcxx/calcxx.cc\r
-sed "/#[       ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.cc > calcxx-driver.cc\r
+sed "/#[        ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.cc > calcxx-driver.cc\r
 if errorlevel 1 goto calcxxFileError\r
 mv ./calcxx-driver.cc %XSRC%/examples/calcxx/calcxx-driver.cc\r
-sed "/#[       ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.hh > calcxx-driver.hh\r
+sed "/#[        ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.hh > calcxx-driver.hh\r
 if errorlevel 1 goto calcxxFileError\r
 mv ./calcxx-driver.hh %XSRC%/examples/calcxx/calcxx-driver.hh\r
-sed "/#[       ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.cc > calcxx-parser.cc\r
+sed "/#[        ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.cc > calcxx-parser.cc\r
 if errorlevel 1 goto calcxxFileError\r
 mv ./calcxx-parser.cc %XSRC%/examples/calcxx/calcxx-parser.cc\r
-sed "/#[       ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.hh > calcxx-parser.hh\r
+sed "/#[        ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.hh > calcxx-parser.hh\r
 if errorlevel 1 goto calcxxFileError\r
 mv ./calcxx-parser.hh %XSRC%/examples/calcxx/calcxx-parser.hh\r
-:sed "/#[      ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.yy > calcxx-parser.yy\r
+:sed "/#[       ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.yy > calcxx-parser.yy\r
 :if errorlevel 1 goto calcxxFileError\r
 :mv ./calcxx-parser.yy %XSRC%/examples/calcxx/calcxx-parser.yy\r
-sed "/#[       ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.cc > calcxx-scanner.cc\r
+sed "/#[        ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.cc > calcxx-scanner.cc\r
 if errorlevel 1 goto calcxxFileError\r
 mv ./calcxx-scanner.cc %XSRC%/examples/calcxx/calcxx-scanner.cc\r
-:sed "/#[      ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.ll > calcxx-scanner.ll\r
+:sed "/#[       ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.ll > calcxx-scanner.ll\r
 :if errorlevel 1 goto calcxxFileError\r
 :mv ./calcxx-scanner.ll %XSRC%/examples/calcxx/calcxx-scanner.ll\r
 sed "s/calc++/calcxx/" %XSRC%/examples/calcxx/test > test\r
@@ -384,6 +419,10 @@ goto End
 echo ./data/lalr1.cc file editing failed!\r
 goto End\r
 \r
+:glr_ccFileError\r
+echo ./data/glr.cc file editing failed!\r
+goto End\r
+\r
 :location_ccFileError\r
 echo ./data/location.cc file editing failed!\r
 goto End\r