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
+Rem Copyright (C) 2005-2010 Free Software Foundation, Inc.\r
\r
-Rem This program is free software; you can redistribute it and/or modify\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 the Free Software Foundation, either version 3 of the License, or\r
+Rem (at your option) any later version.\r
+Rem\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\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
+Rem along with this program. If not, see <http://www.gnu.org/licenses/>.\r
\r
echo Configuring Bison for DJGPP v2.x...\r
\r
if not "%1" == "" goto ArgLoop\r
\r
Rem Create an arguments file for the configure script.\r
-echo --srcdir=%XSRC% > arguments\r
-if "%CACHING%" == "enabled" echo --cache-file=%XSRC%/djgpp/config.cache >> arguments\r
-if "%DEPENDENCY_TRACKING%" == "enabled" echo --enable-dependency-tracking >> arguments\r
-if "%DEPENDENCY_TRACKING%" == "disabled" echo --disable-dependency-tracking >> arguments\r
-if "%LIBICONV_PREFIX%" == "enabled" echo --with-libiconv-prefix >> arguments\r
-if "%LIBICONV_PREFIX%" == "disabled" echo --without-libiconv-prefix >> arguments\r
-if "%LIBINTL_PREFIX%" == "enabled" echo --with-libintl-prefix >> arguments\r
-if "%LIBINTL_PREFIX%" == "disabled" echo --without-libintl-prefix >> arguments\r
-if "%HTML%" == "enabled" echo --enable-html >> arguments\r
-if "%HTML%" == "disabled" echo --disable-html >> arguments\r
-if not "%ARGS%" == "" echo %ARGS% >> arguments\r
+echo --srcdir=%XSRC% > args\r
+if "%CACHING%" == "enabled" echo --cache-file=%XSRC%/djgpp/config.cache >> args\r
+if "%DEPENDENCY_TRACKING%" == "enabled" echo --enable-dependency-tracking >> args\r
+if "%DEPENDENCY_TRACKING%" == "disabled" echo --disable-dependency-tracking >> args\r
+if "%LIBICONV_PREFIX%" == "enabled" echo --with-libiconv-prefix >> args\r
+if "%LIBICONV_PREFIX%" == "disabled" echo --without-libiconv-prefix >> args\r
+if "%LIBINTL_PREFIX%" == "enabled" echo --with-libintl-prefix >> args\r
+if "%LIBINTL_PREFIX%" == "disabled" echo --without-libintl-prefix >> args\r
+if "%HTML%" == "enabled" echo --enable-html >> args\r
+if "%HTML%" == "disabled" echo --disable-html >> args\r
+if not "%ARGS%" == "" echo %ARGS% >> args\r
set ARGS=\r
set CACHING=\r
set DEPENDENCY_TRACKING=\r
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
+test -f %XSRC%/data/c++-skel.m4\r
+if not errorlevel 1 mv -f %XSRC%/data/c++-skel.m4 %XSRC%/data/cxx-skel.m4\r
+test -f %XSRC%/data/cxx-skel.m4\r
+if errorlevel 1 mv -f %XSRC%/data/cpp-skel.m4 %XSRC%/data/cxx-skel.m4\r
+test -f %XSRC%/build-aux/javacomp.sh.in\r
+if not errorlevel 1 mv -f %XSRC%/build-aux/javacomp.sh.in %XSRC%/build-aux/javacomp.sh-in\r
+test -f %XSRC%/build-aux/javacomp.sh-in\r
+if errorlevel 1 mv -f %XSRC%/build-aux/javacomp.sh %XSRC%/build-aux/javacomp.sh-in\r
+test -f %XSRC%/build-aux/javacomp.sh-in\r
+if errorlevel 1 mv -f %XSRC%/build-aux/javacomp.shin %XSRC%/build-aux/javacomp.sh-in\r
+test -f %XSRC%/build-aux/javacomp.sh-in\r
+if errorlevel 1 mv -f %XSRC%/build-aux/javacomp.sh_in %XSRC%/build-aux/javacomp.sh-in\r
+test -f %XSRC%/build-aux/javacomp.sh-in\r
+if errorlevel 1 mv -f %XSRC%/build-aux/javacomp.sh.in %XSRC%/build-aux/javacomp.sh-in\r
+test -f %XSRC%/build-aux/javaexec.sh.in\r
+if not errorlevel 1 mv -f %XSRC%/build-aux/javaexec.sh.in %XSRC%/build-aux/javaexec.sh-in\r
+test -f %XSRC%/build-aux/javaexec.sh-in\r
+if errorlevel 1 mv -f %XSRC%/build-aux/javaexec.sh %XSRC%/build-aux/javaexec.sh-in\r
+test -f %XSRC%/build-aux/javaexec.sh-in\r
+if errorlevel 1 mv -f %XSRC%/build-aux/javaexec.shin %XSRC%/build-aux/javaexec.sh-in\r
+test -f %XSRC%/build-aux/javaexec.sh-in\r
+if errorlevel 1 mv -f %XSRC%/build-aux/javaexec.sh_in %XSRC%/build-aux/javaexec.sh-in\r
+test -f %XSRC%/build-aux/javaexec.sh-in\r
+if errorlevel 1 mv -f %XSRC%/build-aux/javaexec_sh.in %XSRC%/build-aux/javaexec.sh-in\r
+test -f %XSRC%/doc/yacc.1.in\r
+if not errorlevel 1 mv -f %XSRC%/doc/yacc.1.in %XSRC%/doc/yacc.1-in\r
+test -f %XSRC%/doc/yacc.1-in\r
+if errorlevel 1 mv -f %XSRC%/doc/yacc.1 %XSRC%/doc/yacc.1-in\r
+test -f %XSRC%/doc/yacc.1-in\r
+if errorlevel 1 mv -f %XSRC%/doc/yacc.1in %XSRC%/doc/yacc.1-in\r
+test -f %XSRC%/doc/yacc.1-in\r
+if errorlevel 1 mv -f %XSRC%/doc/yacc.1_in %XSRC%/doc/yacc.1-in\r
+test -f %XSRC%/doc/yacc.1-in\r
+if errorlevel 1 mv -f %XSRC%/doc/yacc_1.in %XSRC%/doc/yacc.1-in\r
+test -f %XSRC%/etc/bench.pl.in\r
+if not errorlevel 1 mv -f %XSRC%/etc/bench.pl.in %XSRC%/etc/bench.pl-in\r
+test -f %XSRC%/etc/bench.pl-in\r
+if errorlevel 1 mv -f %XSRC%/etc/bench.pl %XSRC%/etc/bench.pl-in\r
+test -f %XSRC%/etc/bench.pl-in\r
+if errorlevel 1 mv -f %XSRC%/etc/bench.plin %XSRC%/etc/bench.pl-in\r
+test -f %XSRC%/etc/bench.pl-in\r
+if errorlevel 1 mv -f %XSRC%/etc/bench.pl_in %XSRC%/etc/bench.pl-in\r
+test -f %XSRC%/etc/bench.pl-in\r
+if errorlevel 1 mv -f %XSRC%/etc/bench_pl.in %XSRC%/etc/bench.pl-in\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
if errorlevel 1 goto lalr1_ccFileError\r
mv ./lalr1.cc %XSRC%/data/lalr1.cc\r
sed "s/c++\.m4/cxx.m4/" %XSRC%/data/location.cc > location.cc\r
-if errorlevel 1 goto location.ccFileError\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
+if errorlevel 1 goto glr_ccFileError\r
mv ./glr.cc %XSRC%/data/glr.cc\r
\r
+Rem Fix src/getargs.c to reflect the renaming of c++-skel.m4\r
+sed "s/c++-skel\.m4/cxx-skel.m4/" %XSRC%/src/getargs.c > getargs.c\r
+if errorlevel 1 goto getargs_cFileError\r
+mv ./getargs.c %XSRC%/src/getargs.c\r
+\r
Rem Define DJGPP specific defs in config.hin\r
echo Editing config.hin...\r
test -f %XSRC%/lib/config_h.org\r
test -f %XSRC%/tests/c++.at\r
if not errorlevel 1 mv -f %XSRC%/tests/c++.at %XSRC%/tests/cxx.at\r
\r
+test -f %XSRC%/tests/testsuite.org\r
+if errorlevel 1 update %XSRC%/tests/testsuite %XSRC%/tests/testsuite.org\r
+sed -f %XSRC%/djgpp/testsuite.sed %XSRC%/tests/testsuite.org > testsuite.tmp\r
+if errorlevel 1 goto SedError3\r
+mv -f ./testsuite.tmp %XSRC%/tests/testsuite\r
+\r
Rem Fixing ilicit calc++ file names in the calc++ directory.\r
test -d %XSRC%/examples/calc++\r
if not errorlevel 1 mv -f %XSRC%/examples/calc++ %XSRC%/examples/calcxx\r
Rem Update the arguments file for the configure script.\r
Rem We prefer without-included-gettext because libintl.a from gettext package\r
Rem is the only one that is garanteed to have been ported to DJGPP.\r
-echo --enable-nls --without-included-gettext >> arguments\r
+echo --enable-nls --without-included-gettext >> args\r
goto ConfigurePackage\r
\r
:MissingNLSTools\r
echo Needed libs/tools for NLS not found. Configuring without NLS.\r
:WithoutNLS\r
Rem Update the arguments file for the configure script.\r
-echo --disable-nls >> arguments\r
+echo --disable-nls >> args\r
\r
:ConfigurePackage\r
echo Running the ./configure script...\r
-sh ./configure @arguments\r
+sh ./configure @args\r
if errorlevel 1 goto CfgError\r
-rm arguments\r
+rm args\r
echo Done.\r
goto End\r
\r
echo ./data/glr.cc file editing failed!\r
goto End\r
\r
+:getargs_cFileError\r
+echo ./src/getargs.c file editing failed!\r
+goto End\r
+\r
:location_ccFileError\r
echo ./data/location.cc file editing failed!\r
goto End\r
goto End\r
\r
:SedError2\r
-echo ./config.hin editing failed!\r
+echo ./lib/config.hin editing failed!\r
+goto End\r
+\r
+:SedError3\r
+echo ./tests/testsuite editing failed!\r
goto End\r
\r
:CfgError\r