Synch with Gnus.
[elisp/gnus.git-] / make.bat
index 9e9936c..978cdd6 100755 (executable)
--- a/make.bat
+++ b/make.bat
@@ -28,17 +28,23 @@ set PWD=
 \r
 if "%1" == "" goto usage\r
 \r
+rem Emacs 20.7 no longer includes emacs.bat. Use emacs.exe if the batch file is\r
+rem not present -- this also fixes the problem about too many parameters on Win9x.\r
+set emacs=emacs.exe\r
+if exist %1\bin\emacs.bat set emacs=emacs.bat\r
+\r
 cd lisp\r
-call %1\bin\emacs.bat -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-compile\r
+call %1\bin\%emacs% -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-compile\r
 if not "%2" == "copy" goto info\r
 attrib -r %1\lisp\gnus\*\r
 copy *.el* %1\lisp\gnus\r
 \r
 :info\r
+set EMACSINFOHACK="(while (re-search-forward \"@\\(end \\)?ifnottex\" nil t) (replace-match \"\"))"\r
 cd ..\texi\r
-call %1\bin\emacs.bat -batch -q -no-site-file message.texi -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer\r
-call %1\bin\emacs.bat -batch -q -no-site-file emacs-mime.texi -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer\r
-call %1\bin\emacs.bat -batch -q -no-site-file gnus.texi -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer\r
+call %1\bin\%emacs% -batch -q -no-site-file message.texi -eval %EMACSINFOHACK% -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer\r
+call %1\bin\%emacs% -batch -q -no-site-file emacs-mime.texi -eval %EMACSINFOHACK% -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer\r
+call %1\bin\%emacs% -batch -q -no-site-file gnus.texi -eval %EMACSINFOHACK% -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer\r
 if not "%2" == "copy" goto done\r
 copy gnus %1\info\r
 copy gnus-?? %1\info\r