XEmacs build warning fix
[gnus] / make.bat
1 @echo OFF\r
2 REM Change this to ON when debugging this batch file.\r
3 \r
4 rem Written by Frank Schmitt (ich@frank-schmitt.net)\r
5 rem based on the work by David Charlap (shamino@writeme.com)\r
6 rem .\r
7 rem .\r
8 rem Clear PWD so emacs doesn't get confused\r
9 set GNUS_PWD_SAVE=%PWD%\r
10 set PWD=\r
11 set ERROR=:\r
12 REM set pause=\r
13 \r
14 if %1p == p goto usage\r
15 \r
16 echo * Installing Gnus on your system.  Operating system:\r
17 ver\r
18 rem Emacs 20.7 no longer includes emacs.bat. Use emacs.exe if the batch file is\r
19 rem not present -- this also fixes the problem about too many parameters on Win9x.\r
20 if exist %1\emacs.bat goto ebat\r
21 if exist %1\emacs.exe goto eexe\r
22 if exist %1\xemacs.exe goto xemacs\r
23 goto noemacs\r
24 \r
25 :ebat\r
26 set EMACS=emacs.bat\r
27 echo.\r
28 echo ***************************************************************************\r
29 echo * Using emacs.bat  (If you've got Emacs 20.3 or higher please remove\r
30 echo * Emacs.bat, it isn't needed anymore.)\r
31 echo ***************************************************************************\r
32 echo.\r
33 goto emacs\r
34 \r
35 :eexe\r
36 set EMACS=emacs.exe\r
37 echo.\r
38 echo ***************************************************************************\r
39 echo * Using emacs.exe\r
40 echo ***************************************************************************\r
41 echo.\r
42 goto emacs\r
43 \r
44 :emacs\r
45 if not "%2" == "/copy" goto emacsnocopy\r
46 if not exist %1\..\site-lisp\nul mkdir %1\..\site-lisp\r
47 if not exist %1\..\site-lisp\gnus\nul mkdir %1\..\site-lisp\gnus\r
48 if not exist %1\..\site-lisp\subdirs.el set subdirwarning=yes\r
49 :emacsnocopy\r
50 set EMACS_ARGS=-batch -q -no-site-file\r
51 set GNUS_INFO_DIR=%1\..\info\r
52 set GNUS_LISP_DIR=%1\..\site-lisp\gnus\lisp\r
53 set GNUS_ETC_DIR=%1\..\site-lisp\gnus\etc\r
54 goto lisp\r
55 \r
56 :xemacs\r
57 set EMACS=xemacs.exe\r
58 if not "%2" == "/copy" goto xemacsnocopy\r
59 if not exist %1\..\..\site-packages\nul mkdir %1\..\..\site-packages\\r
60 if not exist %1\..\..\site-packages\info\nul mkdir %1\..\..\site-packages\info\r
61 if not exist %1\..\..\site-packages\lisp\nul mkdir %1\..\..\site-packages\lisp\r
62 if not exist %1\..\..\site-packages\etc\nul mkdir %1\..\..\site-packages\etc\r
63 :xemacsnocopy\r
64 set EMACS_ARGS=-batch -no-autoloads\r
65 set GNUS_INFO_DIR=%1\..\..\site-packages\info\r
66 set GNUS_LISP_DIR=%1\..\..\site-packages\lisp\gnus\r
67 set GNUS_ETC_DIR=%1\..\..\site-packages\etc\r
68 echo.\r
69 echo ***************************************************************************\r
70 echo * Using xemacs.exe\r
71 echo ***************************************************************************\r
72 echo.\r
73 goto lisp\r
74 \r
75 :lisp\r
76 if "%pause%" == "pause" pause\r
77 set EMACSBATCH=call %1\%EMACS% %EMACS_ARGS%\r
78 cd lisp\r
79 if exist gnus-load.el attrib -r gnus-load.el\r
80 if exist gnus-load.el del gnus-load.el\r
81 echo.\r
82 echo * Stand by while generating autoloads.\r
83 echo.\r
84 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-cus-load .\r
85 if ErrorLevel 1 set ERROR=make-cus-load\r
86 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-auto-load .\r
87 if ErrorLevel 1 set ERROR=%ERROR%,make-auto-load\r
88 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-load\r
89 if ErrorLevel 1 set ERROR=%ERROR%,make-load\r
90 echo.\r
91 echo * Stand by while compiling lisp files.\r
92 echo.\r
93 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-compile\r
94 if ErrorLevel 1 set ERROR=%ERROR%,compile\r
95 \r
96 if not "%2" == "/copy" goto infotest\r
97 echo.\r
98 echo * Stand by while copying lisp files.\r
99 echo.\r
100 if not exist %GNUS_LISP_DIR%\nul mkdir %GNUS_LISP_DIR%\r
101 xcopy /R /Q /Y *.el* %GNUS_LISP_DIR%\r
102 if ErrorLevel 1 set ERROR=%ERROR%,copy-lisp\r
103 goto infotest\r
104 \r
105 :infotest\r
106 cd ..\texi\r
107 if exist sieve attrib -r sieve\r
108 if exist sieve del sieve\r
109 \r
110 echo * Checking if makeinfo is available...\r
111 makeinfo sieve.texi\r
112 if exist sieve goto minfo\r
113 echo * No makeinfo found, using infohack.el.\r
114 set EMACSINFO=%EMACSBATCH% -l infohack.el -f batch-makeinfo\r
115 echo.\r
116 echo ***************************************************************************\r
117 echo * Using infohack.el, if you've got makeinfo.exe put it in PATH.\r
118 echo ***************************************************************************\r
119 echo.\r
120 goto info\r
121 \r
122 :minfo\r
123 set EMACSINFO=makeinfo\r
124 echo.\r
125 echo ***************************************************************************\r
126 echo * Using makeinfo\r
127 echo ***************************************************************************\r
128 echo.\r
129 goto info\r
130 \r
131 :info\r
132 if "%pause%" == "pause" pause\r
133 echo.\r
134 echo * Stand by while generating info files.\r
135 echo.\r
136 %EMACSINFO% emacs-mime.texi\r
137 if ErrorLevel 1 set ERROR=%ERROR%,emacs-mime.texi\r
138 %EMACSINFO% gnus.texi\r
139 if ErrorLevel 1 set ERROR=%ERROR%,gnus.texi\r
140 %EMACSINFO% sieve.texi\r
141 if ErrorLevel 1 set ERROR=%ERROR%,sieve.texi\r
142 %EMACSINFO% pgg.texi\r
143 if ErrorLevel 1 set ERROR=%ERROR%,pgg.texi\r
144 %EMACSINFO% message.texi\r
145 if ErrorLevel 1 set ERROR=%ERROR%,message.texi\r
146 %EMACSINFO% sasl.texi\r
147 if ErrorLevel 1 set ERROR=%ERROR%,sasl.texi\r
148 \r
149 if not "%2" == "/copy" goto nocopy\r
150 if not exist %GNUS_INFO_DIR%\nul mkdir %GNUS_INFO_DIR%\r
151 \r
152 echo.\r
153 echo * Stand by while copying info files.\r
154 echo.\r
155 xcopy /R /Q /Y gnus       %GNUS_INFO_DIR%\r
156 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-info\r
157 xcopy /R /Q /Y gnus-?     %GNUS_INFO_DIR%\r
158 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-x-info\r
159 xcopy /R /Q /Y gnus-??    %GNUS_INFO_DIR%\r
160 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-xx-info\r
161 xcopy /R /Q /Y message    %GNUS_INFO_DIR%\r
162 if ErrorLevel 1 set ERROR=%ERROR%,copy-message-info\r
163 if exist message-1 xcopy /R /Q /Y message-?  %GNUS_INFO_DIR%\r
164 if ErrorLevel 1 set ERROR=%ERROR%,copy-message-x-info\r
165 xcopy /R /Q /Y emacs-mime %GNUS_INFO_DIR%\r
166 if ErrorLevel 1 set ERROR=%ERROR%,copy-emacs-mime-info\r
167 xcopy /R /Q /Y sieve      %GNUS_INFO_DIR%\r
168 if ErrorLevel 1 set ERROR=%ERROR%,copy-sieve-info\r
169 xcopy /R /Q /Y pgg        %GNUS_INFO_DIR%\r
170 if ErrorLevel 1 set ERROR=%ERROR%,copy-pgg-info\r
171 xcopy /R /Q /Y sasl        %GNUS_INFO_DIR%\r
172 if ErrorLevel 1 set ERROR=%ERROR%,copy-sasl-info\r
173 \r
174 echo.\r
175 echo ***************************************************************************\r
176 echo * You should add the following lines to\r
177 echo * %GNUS_INFO_DIR%\dir\r
178 echo * if they aren't already there:\r
179 echo *\r
180 echo * * PGG: (pgg).    Emacs interface to various PGP implementations.\r
181 echo * * Sieve: (sieve).        Managing Sieve scripts in Emacs.\r
182 echo * * SASL: (sasl).  The Emacs SASL library.\r