2003-01-10 Reiner Steib <Reiner.Steib@gmx.de>
[gnus] / make.bat
1 @echo off\r
2 \r
3 rem Written by David Charlap (shamino@writeme.com)\r
4 rem\r
5 rem There are two possible problems with this batch file.  The emacs.bat batch\r
6 rem file may not exist in all distributions.  It is part of the GNU build of\r
7 rem Emacs 20.4 (http://www.gnu.org/softare/emacs/windows.ntemacs.html)  If you\r
8 rem install Gnus with some other build, you may have to replace calls to\r
9 rem %1\emacs.bat with something else.\r
10 rem \r
11 rem Also, the emacs.bat file that comes with Emacs does not accept more than 9\r
12 rem parameters, so the attempts to compile the .texi files will fail.  To\r
13 rem fix that (at least on NT.  I don't know about Win95), the following\r
14 rem change should be made to emacs.bat:\r
15 rem \r
16 rem     %emacs_dir%\bin\emacs.exe %1 %2 %3 %4 %5 %6 %7 %8 %9\r
17 rem \r
18 rem should become\r
19 rem \r
20 rem     %emacs_dir%\bin\emacs.exe %*\r
21 rem \r
22 rem which will allow the batch file to accept an unlimited number of\r
23 rem parameters.\r
24 \r
25 rem Clear PWD so emacs doesn't get confused\r
26 set GNUS_PWD_SAVE=%PWD%\r
27 set PWD=\r
28 \r
29 if "%1" == "" goto usage\r
30 \r
31 rem Directory where the info files are installed\r
32 set GNUS_INFO_DIR=%1\info\r
33 \r
34 rem Emacs 20.7 no longer includes emacs.bat. Use emacs.exe if the batch file is\r
35 rem not present -- this also fixes the problem about too many parameters on Win9x.\r
36 set emacs=emacs.exe\r
37 if exist %1\bin\emacs.bat set emacs=emacs.bat\r
38 set EMACSBATCH=call %1\bin\%emacs% -no-site-file -batch -q\r
39 \r
40 cd lisp\r
41 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-compile\r
42 if not "%2" == "/copy" goto info\r
43 attrib -r %1\lisp\gnus\*\r
44 copy *.el* %1\lisp\gnus\r
45 \r
46 :info\r
47 set EMACSINFO=%EMACSBATCH% -l infohack.el -f batch-makeinfo\r
48 cd ..\texi\r
49 %EMACSINFO% message.texi\r
50 %EMACSINFO% emacs-mime.texi\r
51 %EMACSINFO% gnus.texi\r
52 if not "%2" == "/copy" goto done\r
53 copy gnus       %GNUS_INFO_DIR%\r
54 copy gnus-?     %GNUS_INFO_DIR%\r
55 copy gnus-??    %GNUS_INFO_DIR%\r
56 copy message    %GNUS_INFO_DIR%\r
57 copy message-?  %GNUS_INFO_DIR%\r
58 copy emacs-mime %GNUS_INFO_DIR%\r
59 copy sieve      %GNUS_INFO_DIR%\r
60 copy pgg        %GNUS_INFO_DIR%\r
61 echo Maybe you should add the following line to %GNUS_INFO_DIR%\dir:\r
62 echo.\r
63 echo * PGG: (pgg).              Emacs interface to various PGP implementations.\r
64 echo * Sieve: (sieve).  Managing Sieve scripts in Emacs.\r
65 echo.\r
66 \r
67 :etc\r
68 cd ..\etc\r
69 copy gnus-tut.txt %1\etc\r
70 \r
71 :done\r
72 cd ..\r
73 goto end\r
74 \r
75 :usage\r
76 echo Usage: make :emacs-dir: [/copy]\r
77 echo.\r
78 echo where: :emacs-dir: is the directory you installed emacs in\r
79 echo                    eg. d:\emacs\20.4\r
80 echo        /copy indicates that the compiled files should be copied to your\r
81 echo             emacs lisp, info, and etc directories\r
82 echo.\r
83 echo Note: If you have Emacs/w3 you should set the environment variable \r
84 echo       W3DIR to the directory where w3 is installed eg.\r
85 echo                 set W3DIR=d:\lisp\w3-4.0pre46\lisp\r
86 \r
87 rem Restore PWD so whoever called this batch file doesn't get confused\r
88 set PWD=%GNUS_PWD_SAVE%\r
89 set GNUS_PWD_SAVE=\r
90 set EMACSBATCH=\r
91 set GNUS_INFO_DIR=\r
92 :end\r