gnus-topic.el: Silence some warnings
[gnus] / make.bat
index 91b7986..f305b09 100644 (file)
--- a/make.bat
+++ b/make.bat
-@echo off\r
-\r
-rem Written by David Charlap <shamino@writeme.com>\r
-\r
-rem There are two catches, however.  The emacs.bat batch file may not exist\r
-rem in all distributions.  It is part of the Voelker build of Emacs 19.34\r
-rem (http://www.cs.washington.edu/homes/voelker/ntemacs.html).  If the user\r
-rem installs Gnus with some other build, he may have to replace calls to\r
-rem %1\emacs.bat with something else.\r
-rem \r
-rem Also, the emacs.bat file that Voelker ships does not accept more than 9\r
-rem parameters, so the attempts to compile the .texi files will fail.  To\r
-rem fix that (at least on NT.  I don't know about Win95), the following\r
-rem change should be made to emacs.bat:\r
-rem \r
-rem     %emacs_dir%\bin\emacs.exe %1 %2 %3 %4 %5 %6 %7 %8 %9\r
-rem \r
-rem should become\r
-rem \r
-rem     %emacs_dir%\bin\emacs.exe %*\r
-rem \r
-rem which will allow the batch file to accept an unlimited number of\r
-rem parameters.\r
-\r
-rem Clear PWD so emacs doesn't get confused
-set GNUS_PWD_SAVE=%PWD%
-set PWD=
-
-rem Clear PWD so emacs doesn't get confused
-set GNUS_PWD_SAVE=%PWD%
-set PWD=
-
-if "%1" == "" goto usage\r
+@echo OFF\r
+REM Change this to ON when debugging this batch file.\r
 \r
+rem Written by Frank Schmitt (ich@frank-schmitt.net)\r
+rem based on the work by David Charlap (shamino@writeme.com)\r
+rem .\r
+rem .\r
+rem Clear PWD so emacs doesn't get confused\r
+set GNUS_PWD_SAVE=%PWD%\r
+set PWD=\r
+set ERROR=:\r
+REM set pause=\r
+\r
+if %1p == p goto usage\r
+\r
+echo * Installing Gnus on your system.  Operating system:\r
+ver\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
+if exist %1\emacs.bat goto ebat\r
+if exist %1\emacs.exe goto eexe\r
+if exist %1\xemacs.exe goto xemacs\r
+goto noemacs\r
+\r
+:ebat\r
+set EMACS=emacs.bat\r
+echo.\r
+echo ***************************************************************************\r
+echo * Using emacs.bat  (If you've got Emacs 20.3 or higher please remove\r
+echo * Emacs.bat, it isn't needed anymore.)\r
+echo ***************************************************************************\r
+echo.\r
+goto emacs\r
+\r
+:eexe\r
+set EMACS=emacs.exe\r
+echo.\r
+echo ***************************************************************************\r
+echo * Using emacs.exe\r
+echo ***************************************************************************\r
+echo.\r
+goto emacs\r
+\r
+:emacs\r
+if not "%2" == "/copy" goto emacsnocopy\r
+if not exist %1\..\site-lisp\nul mkdir %1\..\site-lisp\r
+if not exist %1\..\site-lisp\gnus\nul mkdir %1\..\site-lisp\gnus\r
+if not exist %1\..\site-lisp\subdirs.el set subdirwarning=yes\r
+:emacsnocopy\r
+set EMACS_ARGS=-batch -q -no-site-file\r
+set GNUS_INFO_DIR=%1\..\info\r
+set GNUS_LISP_DIR=%1\..\site-lisp\gnus\lisp\r
+set GNUS_ETC_DIR=%1\..\site-lisp\gnus\etc\r
+goto lisp\r
+\r
+:xemacs\r
+set EMACS=xemacs.exe\r
+if not "%2" == "/copy" goto xemacsnocopy\r
+if not exist %1\..\..\site-packages\nul mkdir %1\..\..\site-packages\\r
+if not exist %1\..\..\site-packages\info\nul mkdir %1\..\..\site-packages\info\r
+if not exist %1\..\..\site-packages\lisp\nul mkdir %1\..\..\site-packages\lisp\r
+if not exist %1\..\..\site-packages\etc\nul mkdir %1\..\..\site-packages\etc\r
+:xemacsnocopy\r
+set EMACS_ARGS=-batch -no-autoloads\r
+set GNUS_INFO_DIR=%1\..\..\site-packages\info\r
+set GNUS_LISP_DIR=%1\..\..\site-packages\lisp\gnus\r
+set GNUS_ETC_DIR=%1\..\..\site-packages\etc\r
+echo.\r
+echo ***************************************************************************\r
+echo * Using xemacs.exe\r
+echo ***************************************************************************\r
+echo.\r
+goto lisp\r
+\r
+:lisp\r
+if "%pause%" == "pause" pause\r
+set EMACSBATCH=call %1\%EMACS% %EMACS_ARGS%\r
 cd lisp\r
-call %1\bin\emacs.bat -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-compile\r
-if not "%2" == "copy" goto info\r
-copy *.el* %1\lisp\r
+if exist gnus-load.el attrib -r gnus-load.el\r
+if exist gnus-load.el del gnus-load.el\r
+echo.\r
+echo * Stand by while generating autoloads.\r
+echo.\r
+%EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-cus-load .\r
+if ErrorLevel 1 set ERROR=make-cus-load\r
+%EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-auto-load .\r
+if ErrorLevel 1 set ERROR=%ERROR%,make-auto-load\r
+%EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-load\r
+if ErrorLevel 1 set ERROR=%ERROR%,make-load\r
+echo.\r
+echo * Stand by while compiling lisp files.\r
+echo.\r
+%EMACSBATCH% -l ./dgnushack.el -f dgnushack-compile\r
+if ErrorLevel 1 set ERROR=%ERROR%,compile\r
 \r
-:info\r
+if not "%2" == "/copy" goto infotest\r
+echo.\r
+echo * Stand by while copying lisp files.\r
+echo.\r
+if not exist %GNUS_LISP_DIR%\nul mkdir %GNUS_LISP_DIR%\r
+xcopy /R /Q /Y *.el* %GNUS_LISP_DIR%\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-lisp\r
+goto infotest\r
+\r
+:infotest\r
 cd ..\texi\r
-call %1\bin\emacs.bat -batch -q -no-site-file gnus.texi -l texinfmt -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer\r
-call %1\bin\emacs.bat -batch -q -no-site-file message.texi -l texinfmt -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
-copy message %1\info\r
+if exist sieve attrib -r sieve\r
+if exist sieve del sieve\r
+\r
+echo * Checking if makeinfo is available...\r
+makeinfo sieve.texi\r
+if exist sieve goto minfo\r
+echo * No makeinfo found, using infohack.el.\r
+set EMACSINFO=%EMACSBATCH% -l infohack.el -f batch-makeinfo\r
+echo.\r
+echo ***************************************************************************\r
+echo * Using infohack.el, if you've got makeinfo.exe put it in PATH.\r
+echo ***************************************************************************\r
+echo.\r
+goto info\r
+\r
+:minfo\r
+set EMACSINFO=makeinfo\r
+echo.\r
+echo ***************************************************************************\r
+echo * Using makeinfo\r
+echo ***************************************************************************\r
+echo.\r
+goto info\r
+\r
+:info\r
+if "%pause%" == "pause" pause\r
+echo.\r
+echo * Stand by while generating info files.\r
+echo.\r
+%EMACSINFO% emacs-mime.texi\r
+if ErrorLevel 1 set ERROR=%ERROR%,emacs-mime.texi\r
+%EMACSINFO% gnus.texi\r
+if ErrorLevel 1 set ERROR=%ERROR%,gnus.texi\r
+%EMACSINFO% sieve.texi\r
+if ErrorLevel 1 set ERROR=%ERROR%,sieve.texi\r
+%EMACSINFO% pgg.texi\r
+if ErrorLevel 1 set ERROR=%ERROR%,pgg.texi\r
+%EMACSINFO% message.texi\r
+if ErrorLevel 1 set ERROR=%ERROR%,message.texi\r
+%EMACSINFO% sasl.texi\r
+if ErrorLevel 1 set ERROR=%ERROR%,sasl.texi\r
+\r
+if not "%2" == "/copy" goto nocopy\r
+if not exist %GNUS_INFO_DIR%\nul mkdir %GNUS_INFO_DIR%\r
+\r
+echo.\r
+echo * Stand by while copying info files.\r
+echo.\r
+xcopy /R /Q /Y gnus       %GNUS_INFO_DIR%\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-info\r
+xcopy /R /Q /Y gnus-?     %GNUS_INFO_DIR%\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-x-info\r
+xcopy /R /Q /Y gnus-??    %GNUS_INFO_DIR%\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-xx-info\r
+xcopy /R /Q /Y message    %GNUS_INFO_DIR%\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-message-info\r
+if exist message-1 xcopy /R /Q /Y message-?  %GNUS_INFO_DIR%\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-message-x-info\r
+xcopy /R /Q /Y emacs-mime %GNUS_INFO_DIR%\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-emacs-mime-info\r
+xcopy /R /Q /Y sieve      %GNUS_INFO_DIR%\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-sieve-info\r
+xcopy /R /Q /Y pgg        %GNUS_INFO_DIR%\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-pgg-info\r
+xcopy /R /Q /Y sasl        %GNUS_INFO_DIR%\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-sasl-info\r
+\r
+echo.\r
+echo ***************************************************************************\r
+echo * You should add the following lines to\r
+echo * %GNUS_INFO_DIR%\dir\r
+echo * if they aren't already there:\r
+echo *\r
+echo * * PGG: (pgg).   Emacs interface to various PGP implementations.\r
+echo * * Sieve: (sieve).       Managing Sieve scripts in Emacs.\r
+echo * * SASL: (sasl). The Emacs SASL library.\r
+echo ***************************************************************************\r
+echo.\r
 \r
 :etc\r
+if "%pause%" == "pause" pause\r
 cd ..\etc\r
-copy gnus-tut.txt %1\etc\r
+echo.\r
+echo * Stand by while copying etc files.\r
+echo.\r
+REM\r
+if not exist %GNUS_ETC_DIR% mkdir %GNUS_ETC_DIR%\r
+echo ** gnus-tut.txt ...\r
+xcopy /R /Q /Y gnus-tut.txt %GNUS_ETC_DIR%\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-gnus-tut-txt\r
+REM\r
+REM FIXME: Instead of C&P, we should use a FOR loop.\r
+REM\r
+set i=images\r
+if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
+echo ** .\%i%\ ...\r
+xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
+REM\r
+set i=images\mail\r
+if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
+echo ** .\%i%\ ...\r
+xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
+REM\r
+set i=images\gnus\r
+if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
+echo ** .\%i%\ ...\r
+xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
+REM\r
+set i=images\smilies\r
+if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
+echo ** .\%i%\ ...\r
+xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
+REM\r
+set i=images\smilies\grayscale\r
+if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
+echo ** .\%i%\ ...\r
+xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
+REM\r
+set i=images\smilies\medium\r
+if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
+echo ** .\%i%\ ...\r
+xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
+if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
+REM\r
+set i=\r
+goto warnings\r
+\r
+:nocopy\r
+echo.\r
+echo ***************************************************************************\r
+echo * You chose not to copy the files, therefore you should add the\r
+echo * following lines to the TOP of your [X]emacs customization file:\r
+echo *\r
+echo * (add-to-list 'load-path "/Path/to/gnus/lisp")\r
+echo * (if (featurep 'xemacs)\r
+echo *     (add-to-list 'Info-directory-list "c:/Path/to/gnus/texi/")\r
+echo *   (add-to-list 'Info-default-directory-list "c:/Path/to/gnus/texi/"))\r
+echo * (require 'gnus-load)\r
+echo *\r
+echo * Replace c:/Path/to/gnus with the Path where your new Gnus is (that's here\r
+echo * and yes, you've got to use forward slashes).\r
+echo ***************************************************************************\r
+echo.\r
+\r
+:warnings\r
+if not "%subdirwarning%" == "yes" goto warngnusload\r
+echo.\r
+echo ***************************************************************************\r
+echo * There's no subdirs.el file in your site-lisp directory, you should\r
+echo * therefor add the following line to the TOP of your Emacs\r
+echo * customization file:\r
+echo *\r
+echo * (add-to-list 'load-path "/Path/to/emacs-site-lisp-directory/gnus/lisp")\r
+echo * (require 'gnus-load)\r
+echo * Yes, it must be forward slashes.\r
+echo ***************************************************************************\r
+echo.\r
+goto warnerrors\r
+\r
+:warngnusload\r
+echo.\r
+echo ***************************************************************************\r
+echo * You should add the following line to the TOP of your Emacs\r
+echo * customization file:\r
+echo *\r
+echo * (require 'gnus-load)\r
+echo ***************************************************************************\r
+echo.\r
+\r
+:warnerrors\r
+if "%ERROR%"==":" goto noerrors\r
+set errorlevel=1\r
+echo.\r
+echo ***************************************************************************\r
+echo * WARNING ERRORS OCCURRED!\r
+echo * You should look for error messages in the output of the called programs\r
+echo * and try to find out what exactly went wrong.\r
+echo * Errors occured in the following modules:\r
+echo * %ERROR%\r
+echo ***************************************************************************\r
+echo.\r
+goto done\r
+\r
+:noerrors\r
+set errorlevel=0\r
 \r
 :done\r
 cd ..\r
 goto end\r
 \r
+:noemacs\r
+echo.\r
+echo ***************************************************************************\r
+echo * Unable to find emacs.exe or xemacs.exe on the path you specified!\r
+echo * STOP!\r
+echo ***************************************************************************\r
+echo.\r
+goto usage\r
+\r
 :usage\r
-echo Usage: make ^<emacs-dir^> [copy]\r
-echo.\r
-echo where: ^<emacs-dir^> is the directory you installed emacs in\r
-echo                    eg. d:\emacs\19.34\r
-echo        copy indicates that the compiled files should be copied to your\r
-echo             emacs lisp, info, and etc directories\r
-\r
-rem Restore PWD so whoever called this batch file doesn't get confused
-set PWD=%GNUS_PWD_SAVE%
-set GNUS_PWD_SAVE=
-rem Restore PWD so whoever called this batch file doesn't get confused
-set PWD=%GNUS_PWD_SAVE%
-set GNUS_PWD_SAVE=
+echo.\r
+echo ***************************************************************************\r
+REM echo * Usage: make.bat :[X]Emacs-exe-dir: [/copy] [ ^> inst-log.txt 2^>^&1 ]\r
+echo * Usage: make.bat :[X]Emacs-exe-dir: [/copy]\r
+echo *\r
+echo * where: :[X]Emacs-exe-dir: is the directory your\r
+echo *           emacs.exe respectively xemacs.exe resides in,\r
+echo *           e.g. G:\Programme\XEmacs\XEmacs-21.4.11\i586-pc-win32\\r
+echo *           or G:\Emacs\bin\r
+echo *        /copy indicates that the compiled files should be copied to your\r
+echo *           emacs lisp, info, and etc site directories.\r
+REM echo *        ^> inst-log.txt 2^>^&1\r
+REM echo *           Log output to inst-log.txt\r
+echo ***************************************************************************\r
+echo.\r
+\r
 :end\r
+rem Restore environment variables\r
+set PWD=%GNUS_PWD_SAVE%\r
+set GNUS_PWD_SAVE=\r
+set EMACSBATCH=\r
+set GNUS_LISP_DIR=\r
+set GNUS_INFO_DIR=\r
+set GNUS_ETC_DIR=\r
+set subdirwarning=\r
+set ERROR=\r