(rmail-summary-goto-msg): Preserve the current buffer.
[bpt/emacs.git] / config.bat
index d83656c..decbd54 100644 (file)
@@ -29,7 +29,9 @@ rem     line length limit.
 rem   + rm, mv, chmod (From GNU file utilities).\r
 rem   + sed.\r
 rem\r
-rem   You must install in directory c:/emacs or change this script.\r
+rem   You must install in directory c:/emacs or change this script, the\r
+rem   files msdos/sed*.inp, and lisp/dos-fns.el.  (The latter must be\r
+rem   recompiled.)\r
 rem   ----------------------------------------------------------------------\r
 if not "%2" == "" goto usage\r
 if "%1" == "msdos" goto msdos\r
@@ -80,7 +82,7 @@ goto end
 \r
 rem   Create "paths.h"\r
 rm -f paths.h\r
-sed -e "s!/lib/emacs!!" -e "s!/usr/local!c:/emacs!" -e "s!/data!/etc!" <%PATHSH% >paths.h\r
+sed -f ../msdos/sed4.inp <%PATHSH% >paths.h\r
 \r
 rem   Create "config.h"\r
 rm -f config.h config.tmp\r
@@ -96,15 +98,23 @@ if exist dir.h ren dir.h vmsdir.h
 \r
 rem   Create "makefile" from "makefile.in.in" using a context patch.\r
 rm -f makefile junk.c\r
-cp %MAKEFILEIN% junk.c\r
+sed -e "1,/cpp stuff/s@^# .*$@@" <%MAKEFILEIN% >junk.c\r
 gcc -E junk.c | sed -f ../msdos/sed1.inp >makefile\r
 rm -f junk.c\r
 cd ..\r
 rem   ----------------------------------------------------------------------\r
 Echo Configuring the library source directory...\r
 cd lib-src\r
+set MAKEFILEIN=makefile.in-in\r
+if exist %MAKEFILEIN% goto libsrc1\r
+set MAKEFILEIN=makefile-in.in\r
+if exist %MAKEFILEIN% goto libsrc1\r
+echo makefile: *** The file originally called "lib-src/Makefile.in.in" cannot be found.\r
+cd ..\r
+goto end\r
+:libsrc1\r
 rem   Create "makefile" from "makefile.in".\r
-sed -e "s@^# \(Generated.*\)$@/* \1 */@" -e "s@/\*\*/#\(.*\)$@/* \1 */@" <Makefile.in >junk.c\r
+sed -e "1,/cpp stuff/s@^# .*$@@" <%MAKEFILEIN% >junk.c\r
 gcc -E -I. -I../src junk.c | sed -e "s/^ /     /" -e "/^#/d" -e "/^[   \f]*$/d" >Makefile.new\r
 sed -f ../msdos/sed3.inp <makefile.new >makefile\r
 cd ..\r
@@ -117,4 +127,4 @@ set X11=
 set MAKEFILEIN=\r
 set PATHSH=\r
 set CONFIGH=\r
-
+\r