Remove arch-tags from all files, since these are no longer needed.
[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 From http://my.gnus.org/node/343:\r
9 rem   A comment on installing Gnus on Windows 98 SE that might help others: When\r
10 rem   I ran the "make.bat" file in the 5.10.6 tarball I got a bunch of "Out of\r
11 rem   environment space" messages. The solution was to (1) make a shortcut to\r
12 rem   the make.bat file, and (2) right-click on the shortcut, setting "Cmd line"\r
13 rem   in the "Program" tab in "properties" to include the parameters make.bat\r
14 rem   requires, and "initial environment" in the "memories" tab, to the maximum\r
15 rem   (in my case, anyway, 2560).\r
16 rem .\r
17 rem Clear PWD so emacs doesn't get confused\r
18 set GNUS_PWD_SAVE=%PWD%\r
19 set PWD=\r
20 set ERROR=:\r
21 REM set pause=\r
22 \r
23 if %1p == p goto usage\r
24 \r
25 echo * Installing Gnus on your system.  Operating system:\r
26 ver\r
27 rem Emacs 20.7 no longer includes emacs.bat. Use emacs.exe if the batch file is\r
28 rem not present -- this also fixes the problem about too many parameters on Win9x.\r
29 if exist %1\emacs.bat goto ebat\r
30 if exist %1\emacs.exe goto eexe\r
31 if exist %1\xemacs.exe goto xemacs\r
32 goto noemacs\r
33 \r
34 :ebat\r
35 set EMACS=emacs.bat\r
36 echo.\r
37 echo ***************************************************************************\r
38 echo * Using emacs.bat  (If you've got Emacs 20.3 or higher please remove\r
39 echo * Emacs.bat, it isn't needed anymore.)\r
40 echo ***************************************************************************\r
41 echo.\r
42 goto emacs\r
43 \r
44 :eexe\r
45 set EMACS=emacs.exe\r
46 echo.\r
47 echo ***************************************************************************\r
48 echo * Using emacs.exe\r
49 echo ***************************************************************************\r
50 echo.\r
51 goto emacs\r
52 \r
53 :emacs\r
54 if not "%2" == "/copy" goto emacsnocopy\r
55 if not exist %1\..\site-lisp\nul mkdir %1\..\site-lisp\r
56 if not exist %1\..\site-lisp\gnus\nul mkdir %1\..\site-lisp\gnus\r
57 if not exist %1\..\site-lisp\subdirs.el set subdirwarning=yes\r
58 :emacsnocopy\r
59 set EMACS_ARGS=-batch -q -no-site-file\r
60 set GNUS_INFO_DIR=%1\..\info\r
61 set GNUS_LISP_DIR=%1\..\site-lisp\gnus\lisp\r
62 set GNUS_ETC_DIR=%1\..\site-lisp\gnus\etc\r
63 goto lisp\r
64 \r
65 :xemacs\r
66 set EMACS=xemacs.exe\r
67 if not "%2" == "/copy" goto xemacsnocopy\r
68 if not exist %1\..\..\site-packages\nul mkdir %1\..\..\site-packages\\r
69 if not exist %1\..\..\site-packages\info\nul mkdir %1\..\..\site-packages\info\r
70 if not exist %1\..\..\site-packages\lisp\nul mkdir %1\..\..\site-packages\lisp\r
71 if not exist %1\..\..\site-packages\etc\nul mkdir %1\..\..\site-packages\etc\r
72 :xemacsnocopy\r
73 set EMACS_ARGS=-batch -no-autoloads\r
74 set GNUS_INFO_DIR=%1\..\..\site-packages\info\r
75 set GNUS_LISP_DIR=%1\..\..\site-packages\lisp\gnus\r
76 set GNUS_ETC_DIR=%1\..\..\site-packages\etc\r
77 echo.\r
78 echo ***************************************************************************\r
79 echo * Using xemacs.exe\r
80 echo ***************************************************************************\r
81 echo.\r
82 goto lisp\r
83 \r
84 :lisp\r
85 if "%pause%" == "pause" pause\r
86 set EMACSBATCH=call %1\%EMACS% %EMACS_ARGS%\r
87 cd lisp\r
88 if exist gnus-load.el attrib -r gnus-load.el\r
89 if exist gnus-load.el del gnus-load.el\r
90 echo.\r
91 echo * Stand by while generating autoloads.\r
92 echo.\r
93 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-cus-load .\r
94 if ErrorLevel 1 set ERROR=make-cus-load\r
95 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-auto-load .\r
96 if ErrorLevel 1 set ERROR=%ERROR%,make-auto-load\r
97 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-load\r
98 if ErrorLevel 1 set ERROR=%ERROR%,make-load\r
99 echo.\r
100 echo * Stand by while compiling lisp files.\r
101 echo.\r
102 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-compile\r
103 if ErrorLevel 1 set ERROR=%ERROR%,compile\r
104 \r
105 if not "%2" == "/copy" goto infotest\r
106 echo.\r
107 echo * Stand by while copying lisp files.\r
108 echo.\r
109 if not exist %GNUS_LISP_DIR%\nul mkdir %GNUS_LISP_DIR%\r
110 xcopy /R /Q /Y *.el* %GNUS_LISP_DIR%\r
111 if ErrorLevel 1 set ERROR=%ERROR%,copy-lisp\r
112 goto infotest\r
113 \r
114 :infotest\r
115 cd ..\texi\r
116 if exist sieve attrib -r sieve\r
117 if exist sieve del sieve\r
118 \r
119 echo * Checking if makeinfo is available...\r
120 makeinfo sieve.texi\r
121 if exist sieve goto minfo\r
122 echo * No makeinfo found, using infohack.el.\r
123 set EMACSINFO=%EMACSBATCH% -l infohack.el -f batch-makeinfo\r
124 echo.\r
125 echo ***************************************************************************\r
126 echo * Using infohack.el, if you've got makeinfo.exe put it in PATH.\r
127 echo ***************************************************************************\r
128 echo.\r
129 goto info\r
130 \r
131 :minfo\r
132 set EMACSINFO=makeinfo\r
133 echo.\r
134 echo ***************************************************************************\r
135 echo * Using makeinfo\r
136 echo ***************************************************************************\r
137 echo.\r
138 goto info\r
139 \r
140 :info\r
141 if "%pause%" == "pause" pause\r
142 echo.\r
143 echo * Stand by while generating info files.\r
144 echo.\r
145 %EMACSINFO% emacs-mime.texi\r
146 if ErrorLevel 1 set ERROR=%ERROR%,emacs-mime.texi\r
147 %EMACSINFO% gnus.texi\r
148 if ErrorLevel 1 set ERROR=%ERROR%,gnus.texi\r
149 %EMACSINFO% sieve.texi\r
150 if ErrorLevel 1 set ERROR=%ERROR%,sieve.texi\r
151 %EMACSINFO% pgg.texi\r
152 if ErrorLevel 1 set ERROR=%ERROR%,pgg.texi\r
153 %EMACSINFO% message.texi\r
154 if ErrorLevel 1 set ERROR=%ERROR%,message.texi\r
155 %EMACSINFO% sasl.texi\r
156 if ErrorLevel 1 set ERROR=%ERROR%,sasl.texi\r
157 \r
158 if not "%2" == "/copy" goto nocopy\r
159 if not exist %GNUS_INFO_DIR%\nul mkdir %GNUS_INFO_DIR%\r
160 \r
161 echo.\r
162 echo * Stand by while copying info files.\r
163 echo.\r
164 xcopy /R /Q /Y gnus       %GNUS_INFO_DIR%\r
165 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-info\r
166 xcopy /R /Q /Y gnus-?     %GNUS_INFO_DIR%\r
167 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-x-info\r
168 xcopy /R /Q /Y gnus-??    %GNUS_INFO_DIR%\r
169 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-xx-info\r
170 xcopy /R /Q /Y message    %GNUS_INFO_DIR%\r
171 if ErrorLevel 1 set ERROR=%ERROR%,copy-message-info\r
172 if exist message-1 xcopy /R /Q /Y message-?  %GNUS_INFO_DIR%\r
173 if ErrorLevel 1 set ERROR=%ERROR%,copy-message-x-info\r
174 xcopy /R /Q /Y emacs-mime %GNUS_INFO_DIR%\r
175 if ErrorLevel 1 set ERROR=%ERROR%,copy-emacs-mime-info\r
176 xcopy /R /Q /Y sieve      %GNUS_INFO_DIR%\r
177 if ErrorLevel 1 set ERROR=%ERROR%,copy-sieve-info\r
178 xcopy /R /Q /Y pgg        %GNUS_INFO_DIR%\r
179 if ErrorLevel 1 set ERROR=%ERROR%,copy-pgg-info\r
180 xcopy /R /Q /Y sasl        %GNUS_INFO_DIR%\r
181 if ErrorLevel 1 set ERROR=%ERROR%,copy-sasl-info\r
182 \r
183 echo.\r
184 echo ***************************************************************************\r
185 echo * You should add the following lines to\r
186 echo * %GNUS_INFO_DIR%\dir\r
187 echo * if they aren't already there:\r
188 echo *\r
189 echo * * PGG: (pgg).    Emacs interface to various PGP implementations.\r
190 echo * * Sieve: (sieve).        Managing Sieve scripts in Emacs.\r
191 echo * * SASL: (sasl).  The Emacs SASL library.\r
192 echo ***************************************************************************\r
193 echo.\r
194 \r
195 :etc\r
196 if "%pause%" == "pause" pause\r
197 cd ..\etc\r
198 echo.\r
199 echo * Stand by while copying etc files.\r
200 echo.\r
201 REM\r
202 if not exist %GNUS_ETC_DIR% mkdir %GNUS_ETC_DIR%\r
203 echo ** gnus-tut.txt ...\r
204 xcopy /R /Q /Y gnus-tut.txt %GNUS_ETC_DIR%\r
205 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-gnus-tut-txt\r
206 REM\r
207 REM FIXME: Instead of C&P, we should use a FOR loop.\r
208 REM\r
209 set i=images\r
210 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
211 echo ** .\%i%\ ...\r
212 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
213 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
214 REM\r
215 set i=images\mail\r
216 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
217 echo ** .\%i%\ ...\r
218 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
219 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
220 REM\r
221 set i=images\gnus\r
222 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
223 echo ** .\%i%\ ...\r
224 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
225 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
226 REM\r
227 set i=images\smilies\r
228 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
229 echo ** .\%i%\ ...\r
230 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
231 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
232 REM\r
233 set i=images\smilies\grayscale\r
234 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
235 echo ** .\%i%\ ...\r
236 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
237 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
238 REM\r
239 set i=images\smilies\medium\r
240 if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%\r
241 echo ** .\%i%\ ...\r
242 xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\\r
243 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%\r
244 REM\r
245 set i=\r
246 goto warnings\r
247 \r
248 :nocopy\r
249 echo.\r
250 echo ***************************************************************************\r
251 echo * You chose not to copy the files, therefore you should add the\r
252 echo * following lines to the TOP of your [X]emacs customization file:\r
253 echo *\r
254 echo * (add-to-list 'load-path "/Path/to/gnus/lisp")\r
255 echo * (if (featurep 'xemacs)\r
256 echo *     (add-to-list 'Info-directory-list "c:/Path/to/gnus/texi/")\r
257 echo *   (add-to-list 'Info-default-directory-list "c:/Path/to/gnus/texi/"))\r
258 echo * (require 'gnus-load)\r
259 echo *\r
260 echo * Replace c:/Path/to/gnus with the Path where your new Gnus is (that's here\r
261 echo * and yes, you've got to use forward slashes).\r
262 echo ***************************************************************************\r
263 echo.\r
264 \r
265 :warnings\r
266 if not "%subdirwarning%" == "yes" goto warngnusload\r
267 echo.\r
268 echo ***************************************************************************\r
269 echo * There's no subdirs.el file in your site-lisp directory, you should\r
270 echo * therefor add the following line to the TOP of your Emacs\r
271 echo * customization file:\r
272 echo *\r
273 echo * (add-to-list 'load-path "/Path/to/emacs-site-lisp-directory/gnus/lisp")\r
274 echo * (require 'gnus-load)\r
275 echo * Yes, it must be forward slashes.\r
276 echo ***************************************************************************\r
277 echo.\r
278 goto warnerrors\r
279 \r
280 :warngnusload\r
281 echo.\r
282 echo ***************************************************************************\r
283 echo * You should add the following line to the TOP of your Emacs\r
284 echo * customization file:\r
285 echo *\r
286 echo * (require 'gnus-load)\r
287 echo ***************************************************************************\r
288 echo.\r
289 \r
290 :warnerrors\r
291 if "%ERROR%"==":" goto noerrors\r
292 set errorlevel=1\r
293 echo.\r
294 echo ***************************************************************************\r
295 echo * WARNING ERRORS OCCURRED!\r
296 echo * You should look for error messages in the output of the called programs\r
297 echo * and try to find out what exactly went wrong.\r
298 echo * Errors occured in the following modules:\r
299 echo * %ERROR%\r
300 echo ***************************************************************************\r
301 echo.\r
302 goto done\r
303 \r
304 :noerrors\r
305 set errorlevel=0\r
306 \r
307 :done\r
308 cd ..\r
309 goto end\r
310 \r
311 :noemacs\r
312 echo.\r
313 echo ***************************************************************************\r
314 echo * Unable to find emacs.exe or xemacs.exe on the path you specified!\r
315 echo * STOP!\r
316 echo ***************************************************************************\r
317 echo.\r
318 goto usage\r
319 \r
320 :usage\r
321 echo.\r
322 echo ***************************************************************************\r
323 REM echo * Usage: make.bat :[X]Emacs-exe-dir: [/copy] [ ^> inst-log.txt 2^>^&1 ]\r
324 echo * Usage: make.bat :[X]Emacs-exe-dir: [/copy]\r
325 echo *\r
326 echo * where: :[X]Emacs-exe-dir: is the directory your\r
327 echo *           emacs.exe respectively xemacs.exe resides in,\r
328 echo *           e.g. G:\Programme\XEmacs\XEmacs-21.4.11\i586-pc-win32\\r
329 echo *           or G:\Emacs\bin\r
330 echo *        /copy indicates that the compiled files should be copied to your\r
331 echo *           emacs lisp, info, and etc site directories.\r
332 REM echo *        ^> inst-log.txt 2^>^&1\r
333 REM echo *           Log output to inst-log.txt\r
334 echo *\r
335 echo * Note: If you have Emacs/w3 you should set the environment variable\r
336 echo *       W3DIR to the directory where w3 is installed eg.\r
337 echo *                set W3DIR=d:\lisp\w3-4.0pre46\lisp\r
338 echo ***************************************************************************\r
339 echo.\r
340 \r
341 :end\r
342 rem Restore environment variables\r
343 set PWD=%GNUS_PWD_SAVE%\r
344 set GNUS_PWD_SAVE=\r
345 set EMACSBATCH=\r
346 set GNUS_LISP_DIR=\r
347 set GNUS_INFO_DIR=\r
348 set GNUS_ETC_DIR=\r
349 set subdirwarning=\r
350 set ERROR=\r