(message-tool-bar-zap-list, message-tool-bar)
[gnus] / make.bat
1 @echo off\r
2 \r
3 rem Written by Frank Schmitt (ich@frank-schmitt.net)\r
4 rem based on the work by David Charlap (shamino@writeme.com)\r
5 rem .\r
6 rem Clear PWD so emacs doesn't get confused\r
7 set GNUS_PWD_SAVE=%PWD%\r
8 set PWD=\r
9 set ERROR=:\r
10 \r
11 if "%1" == "" goto usage\r
12 \r
13 rem Emacs 20.7 no longer includes emacs.bat. Use emacs.exe if the batch file is\r
14 rem not present -- this also fixes the problem about too many parameters on Win9x.\r
15 if exist %1\emacs.bat goto ebat\r
16 if exist %1\emacs.exe goto eexe\r
17 if exist %1\xemacs.exe goto xemacs\r
18 goto noemacs\r
19 \r
20 :ebat\r
21 set EMACS=emacs.bat\r
22 echo.\r
23 echo ***************************************************************************\r
24 echo * Using emacs.bat (If you've got en Emacs >= 20.3 please remove Emacs.bat,\r
25 echo * it isn't needed anymore.\r
26 echo ***************************************************************************\r
27 echo.\r
28 goto emacs\r
29 \r
30 :eexe\r
31 set EMACS=emacs.exe\r
32 echo.\r
33 echo ***************************************************************************\r
34 echo * Using emacs.exe\r
35 echo ***************************************************************************\r
36 echo.\r
37 goto emacs\r
38 \r
39 :emacs\r
40 if not "%2" == "/copy" goto emacsnocopy\r
41 if not exist %1\..\site-lisp\nul mkdir %1\..\site-lisp\r
42 if not exist %1\..\site-lisp\gnus\nul mkdir %1\..\site-lisp\gnus\r
43 if not exist %1\..\site-lisp\subdirs.el set subdirwarning=yes\r
44 :emacsnocopy\r
45 set EMACS_ARGS=-batch -q -no-site-file\r
46 set GNUS_INFO_DIR=%1\..\info\r
47 set GNUS_LISP_DIR=%1\..\site-lisp\gnus\lisp\r
48 set GNUS_ETC_DIR=%1\..\site-lisp\gnus\etc\r
49 goto lisp\r
50 \r
51 :xemacs\r
52 set EMACS=xemacs.exe\r
53 if not "%2" == "/copy" goto xemacsnocopy\r
54 if not exist %1\..\..\site-packages\nul mkdir %1\..\..\site-packages\\r
55 if not exist %1\..\..\site-packages\info\nul mkdir %1\..\..\site-packages\info\r
56 if not exist %1\..\..\site-packages\lisp\nul mkdir %1\..\..\site-packages\lisp\r
57 if not exist %1\..\..\site-packages\etc\nul mkdir %1\..\..\site-packages\etc\r
58 :xemacsnocopy\r
59 set EMACS_ARGS=-batch -no-autoloads\r
60 set GNUS_INFO_DIR=%1\..\..\site-packages\info\r
61 set GNUS_LISP_DIR=%1\..\..\site-packages\lisp\gnus\r
62 set GNUS_ETC_DIR=%1\..\..\site-packages\etc\r
63 echo.\r
64 echo ***************************************************************************\r
65 echo * Using xemacs.exe\r
66 echo ***************************************************************************\r
67 echo.\r
68 goto lisp\r
69 \r
70 :lisp\r
71 set EMACSBATCH=call %1\%EMACS% %EMACS_ARGS%\r
72 cd lisp\r
73 attrib -r gnus-load.el\r
74 if exist gnus-load.el del gnus-load.el\r
75 echo.\r
76 echo Stand by while generating autoloads.\r
77 echo.\r
78 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-cus-load .\r
79 if ErrorLevel 1 set ERROR=make-cus-load\r
80 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-auto-load .\r
81 if ErrorLevel 1 set ERROR=%ERROR%,make-auto-load\r
82 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-load\r
83 if ErrorLevel 1 set ERROR=%ERROR%,make-load\r
84 echo.\r
85 echo Stand by while compiling lisp files.\r
86 echo.\r
87 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-compile\r
88 if ErrorLevel 1 set ERROR=%ERROR%,compile\r
89 \r
90 if not "%2" == "/copy" goto infotest\r
91 echo.\r
92 echo Stand by while copying lisp files.\r
93 echo.\r
94 if not exist %GNUS_LISP_DIR%\nul mkdir %GNUS_LISP_DIR%\r
95 xcopy /R /Q /Y *.el* %GNUS_LISP_DIR%\r
96 if ErrorLevel 1 set ERROR=%ERROR%,copy-lisp\r
97 goto infotest\r
98 \r
99 :infotest\r
100 cd ..\texi\r
101 attrib -r sieve\r
102 if exist sieve del sieve\r
103 \r
104 makeinfo sieve.texi\r
105 if exist sieve goto minfo\r
106 REM It seems that makeinfo isn't available\r
107 set EMACSINFO=%EMACSBATCH% -l infohack.el -f batch-makeinfo\r
108 echo.\r
109 echo ***************************************************************************\r
110 echo * Using infohack.el, if you've got makeinfo.exe put it in PATH.\r
111 echo ***************************************************************************\r
112 echo.\r
113 goto info\r
114 \r
115 :minfo\r
116 set EMACSINFO=makeinfo\r
117 echo.\r
118 echo ***************************************************************************\r
119 echo * Using makeinfo\r
120 echo ***************************************************************************\r
121 echo.\r
122 goto info\r
123 \r
124 :info\r
125 echo.\r
126 echo Stand by while generating info files.\r
127 echo.\r
128 %EMACSINFO% emacs-mime.texi\r
129 if ErrorLevel 1 set ERROR=%ERROR%,emacs-mime.texi\r
130 %EMACSINFO% gnus.texi\r
131 if ErrorLevel 1 set ERROR=%ERROR%,gnus.texi\r
132 %EMACSINFO% sieve.texi\r
133 if ErrorLevel 1 set ERROR=%ERROR%,sieve.texi\r
134 %EMACSINFO% pgg.texi\r
135 if ErrorLevel 1 set ERROR=%ERROR%,pgg.texi\r
136 %EMACSINFO% message.texi\r
137 if ErrorLevel 1 set ERROR=%ERROR%,message.texi\r
138 %EMACSINFO% sasl.texi\r
139 if ErrorLevel 1 set ERROR=%ERROR%,sasl.texi\r
140 \r
141 if not "%2" == "/copy" goto nocopy\r
142 if not exist %GNUS_INFO_DIR%\nul mkdir %GNUS_INFO_DIR%\r
143 \r
144 echo.\r
145 echo Stand by while copying info files.\r
146 echo.\r
147 xcopy /R /Q /Y gnus       %GNUS_INFO_DIR%\r
148 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-info\r
149 xcopy /R /Q /Y gnus-?     %GNUS_INFO_DIR%\r
150 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-x-info\r
151 xcopy /R /Q /Y gnus-??    %GNUS_INFO_DIR%\r
152 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-xx-info\r
153 xcopy /R /Q /Y message    %GNUS_INFO_DIR%\r
154 if ErrorLevel 1 set ERROR=%ERROR%,copy-message-info\r
155 if exist message-1 xcopy /R /Q /Y message-?  %GNUS_INFO_DIR%\r
156 if ErrorLevel 1 set ERROR=%ERROR%,copy-message-x-info\r
157 xcopy /R /Q /Y emacs-mime %GNUS_INFO_DIR%\r
158 if ErrorLevel 1 set ERROR=%ERROR%,copy-emacs-mime-info\r
159 xcopy /R /Q /Y sieve      %GNUS_INFO_DIR%\r
160 if ErrorLevel 1 set ERROR=%ERROR%,copy-sieve-info\r
161 xcopy /R /Q /Y pgg        %GNUS_INFO_DIR%\r
162 if ErrorLevel 1 set ERROR=%ERROR%,copy-pgg-info\r
163 xcopy /R /Q /Y sasl        %GNUS_INFO_DIR%\r
164 if ErrorLevel 1 set ERROR=%ERROR%,copy-sasl-info\r
165 \r
166 echo.\r
167 echo ***************************************************************************\r
168 echo * You should add the following lines to\r
169 echo * %GNUS_INFO_DIR%\dir\r
170 echo * if they aren't already there:\r
171 echo *\r
172 echo * * PGG: (pgg).    Emacs interface to various PGP implementations.\r
173 echo * * Sieve: (sieve).        Managing Sieve scripts in Emacs.\r
174 echo * * SASL: (sasl).  The Emacs SASL library.\r
175 echo ***************************************************************************\r
176 echo.\r
177 \r
178 :etc\r
179 cd ..\etc\r
180 echo.\r
181 echo Stand by while copying etc files.\r
182 echo.\r
183 if not exist %GNUS_ETC_DIR%\nul mkdir %GNUS_ETC_DIR%\r
184 xcopy /R /Q /Y gnus-tut.txt %GNUS_ETC_DIR%\r
185 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-gnus-tut-txt\r
186 if not exist %GNUS_ETC_DIR%\gnus\nul mkdir %GNUS_ETC_DIR%\gnus\r
187 xcopy /R /Q /Y .\gnus\* %GNUS_ETC_DIR%\gnus\\r
188 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-gnus-*\r
189 if not exist %GNUS_ETC_DIR%\images\nul mkdir %GNUS_ETC_DIR%\images\r
190 if not exist %GNUS_ETC_DIR%\images\gnus\nul mkdir %GNUS_ETC_DIR%\images\gnus\r
191 xcopy /R /Q /Y .\images\gnus\* %GNUS_ETC_DIR%\images\gnus\\r
192 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-images-gnus-*\r
193 if not exist %GNUS_ETC_DIR%\images\smilies\nul mkdir %GNUS_ETC_DIR%\images\smilies\r
194 xcopy /R /Q /Y .\images\smilies\* %GNUS_ETC_DIR%\images\smilies\\r
195 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-images-smilies-*\r
196 goto warnings\r
197 \r
198 :nocopy\r
199 echo.\r
200 echo ***************************************************************************\r
201 echo * You chose not to copy the files, therefore you should add the\r
202 echo * following lines to the TOP of your [X]emacs customization file:\r
203 echo *\r
204 echo * (add-to-list 'load-path "/Path/to/gnus/lisp")\r
205 echo * (if (featurep 'xemacs)\r
206 echo *     (add-to-list 'Info-directory-list "c:/Path/to/gnus/texi/")\r
207 echo *   (add-to-list 'Info-default-directory-list "c:/Path/to/gnus/texi/"))\r
208 echo * (require 'gnus-load)\r
209 echo *\r
210 echo * Replace c:/Path/to/gnus with the Path where your new Gnus is (that's here\r
211 echo * and yes, you've got to use forward slashes).\r
212 echo ***************************************************************************\r
213 echo.\r
214 \r
215 :warnings\r
216 if not "%subdirwarning%" == "yes" goto warngnusload\r
217 echo.\r
218 echo ***************************************************************************\r
219 echo * There's no subdirs.el file in your site-lisp directory, you should\r
220 echo * therefor add the following line to the TOP of your Emacs\r
221 echo * customization file:\r
222 echo *\r
223 echo * (add-to-list 'load-path "/Path/to/emacs-site-lisp-directory/gnus/lisp")\r
224 echo * (require 'gnus-load)\r
225 echo * Yes, it must be forward slashes.\r
226 echo ***************************************************************************\r
227 echo.\r
228 goto warnerrors\r
229 \r
230 :warngnusload\r
231 echo.\r
232 echo ***************************************************************************\r
233 echo * You should add the following line to the TOP of your Emacs\r
234 echo * customization file:\r
235 echo *\r
236 echo * (require 'gnus-load)\r
237 echo ***************************************************************************\r
238 echo.\r
239 \r
240 :warnerrors\r
241 if "%ERROR%"==":" goto noerrors\r
242 set errorlevel=1\r
243 echo.\r
244 echo ***************************************************************************\r
245 echo * WARNING ERRORS OCCURRED!\r
246 echo * You should look for error messages in the output of the called programs\r
247 echo * and try to find out what exactly went wrong.\r
248 echo * Errors occured in the following modules:\r
249 echo * %ERROR%\r
250 echo ***************************************************************************\r
251 echo.\r
252 goto done\r
253 \r
254 :noerrors\r
255 set errorlevel=0\r
256 \r
257 :done\r
258 cd ..\r
259 goto end\r
260 \r
261 :noemacs\r
262 echo.\r
263 echo ***************************************************************************\r
264 echo * Unable to find emacs.exe or xemacs.exe on the path you specified!\r
265 echo * STOP!\r
266 echo ***************************************************************************\r
267 echo.\r
268 goto usage\r
269 \r
270 :usage\r
271 echo.\r
272 echo ***************************************************************************\r
273 echo * Usage: make.bat :[X]Emacs-exe-dir: [/copy]\r
274 echo *\r
275 echo * where: :[X]Emacs-exe-dir: is the directory your\r
276 echo *           emacs.exe respectively xemacs.exe resides in,\r
277 echo *           e.g. G:\Programme\XEmacs\XEmacs-21.4.11\i586-pc-win32\\r
278 echo *           or G:\Emacs\bin\r
279 echo *        /copy indicates that the compiled files should be copied to your\r
280 echo *           emacs lisp, info, and etc site directories.\r
281 echo *\r
282 echo * Note: If you have Emacs/w3 you should set the environment variable\r
283 echo *       W3DIR to the directory where w3 is installed eg.\r
284 echo *                set W3DIR=d:\lisp\w3-4.0pre46\lisp\r
285 echo ***************************************************************************\r
286 echo.\r
287 \r
288 :end\r
289 rem Restore environment variables\r
290 set PWD=%GNUS_PWD_SAVE%\r
291 set GNUS_PWD_SAVE=\r
292 set EMACSBATCH=\r
293 set GNUS_LISP_DIR=\r
294 set GNUS_INFO_DIR=\r
295 set GNUS_ETC_DIR=\r
296 set subdirwarning=\r
297 set ERROR=\r
298 \r
299 goto skipArchTag\r
300    arch-tag: 502dd14c-acde-4f69-8e82-43203b12a82c\r
301 :skipArchTag\r