X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/3768a1ae181a50b4ee42713ef50377a2328c42f7..4517da37570b39a3d4b3f523dd373abe7c622bb0:/djgpp/config.bat diff --git a/djgpp/config.bat b/djgpp/config.bat index caea6b8a..abcdaee6 100644 --- a/djgpp/config.bat +++ b/djgpp/config.bat @@ -1,4 +1,7 @@ @echo off +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. + echo Configuring GNU Bison for DJGPP v2.x... Rem The SmallEnv tests protect against fixed and too small size @@ -169,11 +172,25 @@ 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 - -Rem Fix data/lalr1.cc to reflect the renaming of c++.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 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 Rem Define DJGPP specific defs in config.hin echo Editing config.hin... @@ -381,6 +398,10 @@ goto End echo ./data/lalr1.cc file editing failed! goto End +:location_ccFileError +echo ./data/location.cc file editing failed! +goto End + :calcxxFileError echo ./examples/calcxx file editing failed! goto End