@echo off\r
rem ----------------------------------------------------------------------\r
rem Configuration script for MS Windows 95/98/Me and NT/2000/XP\r
-rem Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 \r
-rem Free Software Foundation, Inc.\r
+rem Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005,\r
+rem 2006 Free Software Foundation, Inc.\r
\r
rem This file is part of GNU Emacs.\r
\r
\r
rem You should have received a copy of the GNU General Public License\r
rem along with GNU Emacs; see the file COPYING. If not, write to the\r
-rem Free Software Foundation, Inc., 59 Temple Place - Suite 330,\r
-rem Boston, MA 02111-1307, USA.\r
+rem Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\r
+rem Boston, MA 02110-1301, USA.\r
rem ----------------------------------------------------------------------\r
rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:\r
rem\r
echo # End of settings from configure.bat>>config.settings\r
echo. >>config.settings\r
\r
-copy config.nt ..\src\config.h\r
-echo. >>..\src\config.h\r
-echo /* Start of settings from configure.bat. */ >>..\src\config.h\r
-if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>..\src\config.h\r
-if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>..\src\config.h\r
-if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>..\src\config.h\r
-if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>..\src\config.h\r
-if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>..\src\config.h\r
-if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>..\src\config.h\r
-if not "(%HAVE_XPM%)" == "()" echo #define HAVE_XPM 1 >>..\src\config.h\r
-echo /* End of settings from configure.bat. */ >>..\src\config.h\r
-\r
+copy config.nt config.tmp\r
+echo. >>config.tmp\r
+echo /* Start of settings from configure.bat. */ >>config.tmp\r
+if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>config.tmp\r
+if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>config.tmp\r
+if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp\r
+if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp\r
+if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp\r
+if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>config.tmp\r
+if not "(%HAVE_XPM%)" == "()" echo #define HAVE_XPM 1 >>config.tmp\r
+echo /* End of settings from configure.bat. */ >>config.tmp\r
+\r
+Rem See if fc.exe returns a meaningful exit status. If it does, we\r
+Rem might as well avoid unnecessary overwriting of config.h and epaths.h,\r
+Rem since this forces recompilation of every source file.\r
+if exist foo.bar del foo.bar\r
+fc /b foo.bar foo.bar >nul 2>&1\r
+if not errorlevel 2 goto doCopy\r
+fc /b config.tmp ..\src\config.h >nul 2>&1\r
+if errorlevel 1 goto doCopy\r
+fc /b paths.h ..\src\epaths.h >nul 2>&1\r
+if errorlevel 0 goto dontCopy\r
+:doCopy\r
+copy config.tmp ..\src\config.h\r
copy paths.h ..\src\epaths.h\r
\r
+:dontCopy\r
+if exist config.tmp del config.tmp\r
copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile\r
copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile\r
copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile\r
copy /b config.settings+%MAKECMD%.defs+..\man\makefile.w32-in ..\man\makefile\r
copy /b config.settings+%MAKECMD%.defs+..\lispref\makefile.w32-in ..\lispref\makefile\r
copy /b config.settings+%MAKECMD%.defs+..\lispintro\makefile.w32-in ..\lispintro\makefile\r
-if not exist ..\lisp\Makefile.unix rename ..\lisp\Makefile.in Makefile.unix\r
if exist ..\lisp\makefile rm -f ../lisp/[Mm]akefile\r
copy /b config.settings+%MAKECMD%.defs+..\lisp\makefile.w32-in ..\lisp\makefile\r
rem Use the default (no-op) Makefile.in if the nt version is not present.\r
\r
echo.\r
echo Emacs successfully configured.\r
+echo Emacs successfully configured. >>config.log\r
echo Run `%MAKECMD%' to build, then run `%MAKECMD% install' to install.\r
goto end\r
\r