3 rem Written by Frank Schmitt <ich@frank-schmitt.net>
\r
4 rem based on the work by David Charlap (shamino@writeme.com)
\r
6 rem Clear PWD so emacs doesn't get confused
\r
7 set GNUS_PWD_SAVE=%PWD%
\r
11 if "%1" == "" goto usage
\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
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
33 echo ***************************************************************************
\r
34 echo * Using emacs.exe
\r
35 echo ***************************************************************************
\r
40 if not "%2" == "/copy" goto emacsnocopy
\r
41 if not exist %1\..\site-lisp mkdir %1\..\site-lisp
\r
42 if not exist %1\..\site-lisp\gnus mkdir %1\..\site-lisp\gnus
\r
43 if not exist %1\..\site-lisp\subdirs.el set subdirwarning=yes
\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
52 set EMACS=xemacs.exe
\r
53 if not "%2" == "/copy" goto xemacsnocopy
\r
54 if not exist %1\..\..\site-packages\ mkdir %1\..\..\site-packages\
\r
55 if not exist %1\..\..\site-packages\info mkdir %1\..\..\site-packages\info
\r
56 if not exist %1\..\..\site-packages\lisp mkdir %1\..\..\site-packages\lisp
\r
57 if not exist %1\..\..\site-packages\etc mkdir %1\..\..\site-packages\etc
\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
64 echo ***************************************************************************
\r
65 echo * Using xemacs.exe
\r
66 echo ***************************************************************************
\r
71 set EMACSBATCH=call %1\%EMACS% %EMACS_ARGS%
\r
73 if exist gnus-load.el del gnus-load.el
\r
75 echo Stand by while generating autoloads.
\r
77 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-cus-load .
\r
78 if ErrorLevel 1 set ERROR=make-cus-load
\r
79 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-auto-load .
\r
80 if ErrorLevel 1 set ERROR=%ERROR%,make-auto-load
\r
81 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-load
\r
82 if ErrorLevel 1 set ERROR=%ERROR%,make-load
\r
84 echo Stand by while compiling lisp files.
\r
86 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-compile
\r
87 if ErrorLevel 1 set ERROR=%ERROR%,compile
\r
89 if not "%2" == "/copy" goto infotest
\r
91 echo Stand by while copying lisp files.
\r
93 if not exist %GNUS_LISP_DIR% mkdir %GNUS_LISP_DIR%
\r
94 xcopy /R /Q /Y *.el* %GNUS_LISP_DIR%
\r
95 if ErrorLevel 1 set ERROR=%ERROR%,copy-lisp
\r
100 if exist sieve del sieve
\r
101 makeinfo sieve.texi
\r
102 if exist sieve goto minfo
\r
103 REM It seems that makeinfo isn't available
\r
104 set EMACSINFO=%EMACSBATCH% -l infohack.el -f batch-makeinfo
\r
106 echo ***************************************************************************
\r
107 echo * Using infohack.el, if you've got makeinfo.exe put it in PATH.
\r
108 echo ***************************************************************************
\r
113 set EMACSINFO=makeinfo
\r
115 echo ***************************************************************************
\r
116 echo * Using makeinfo
\r
117 echo ***************************************************************************
\r
123 echo Stand by while generating info files.
\r
125 %EMACSINFO% emacs-mime.texi
\r
126 if ErrorLevel 1 set ERROR=%ERROR%,emacs-mime.texi
\r
127 %EMACSINFO% gnus.texi
\r
128 if ErrorLevel 1 set ERROR=%ERROR%,gnus.texi
\r
129 %EMACSINFO% sieve.texi
\r
130 if ErrorLevel 1 set ERROR=%ERROR%,sieve.texi
\r
131 %EMACSINFO% pgg.texi
\r
132 if ErrorLevel 1 set ERROR=%ERROR%,pgg.texi
\r
133 %EMACSINFO% message.texi
\r
134 if ErrorLevel 1 set ERROR=%ERROR%,message.texi
\r
136 if not "%2" == "/copy" goto nocopy
\r
137 if not exist %GNUS_INFO_DIR% mkdir %GNUS_INFO_DIR%
\r
140 echo Stand by while copying info files.
\r
142 xcopy /R /Q /Y gnus %GNUS_INFO_DIR%
\r
143 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-info
\r
144 xcopy /R /Q /Y gnus-? %GNUS_INFO_DIR%
\r
145 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-x-info
\r
146 xcopy /R /Q /Y gnus-?? %GNUS_INFO_DIR%
\r
147 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-xx-info
\r
148 xcopy /R /Q /Y message %GNUS_INFO_DIR%
\r
149 if ErrorLevel 1 set ERROR=%ERROR%,copy-message-info
\r
150 if exist message-1 xcopy /R /Q /Y message-? %GNUS_INFO_DIR%
\r
151 if ErrorLevel 1 set ERROR=%ERROR%,copy-message-x-info
\r
152 xcopy /R /Q /Y emacs-mime %GNUS_INFO_DIR%
\r
153 if ErrorLevel 1 set ERROR=%ERROR%,copy-emacs-mime-info
\r
154 xcopy /R /Q /Y sieve %GNUS_INFO_DIR%
\r
155 if ErrorLevel 1 set ERROR=%ERROR%,copy-sieve-info
\r
156 xcopy /R /Q /Y pgg %GNUS_INFO_DIR%
\r
157 if ErrorLevel 1 set ERROR=%ERROR%,copy-pgg-info
\r
160 echo ***************************************************************************
\r
161 echo * You should add the following lines to
\r
162 echo * %GNUS_INFO_DIR%\dir
\r
163 echo * if they aren't already there:
\r
165 echo * * PGG: (pgg). Emacs interface to various PGP implementations.
\r
166 echo * * Sieve: (sieve). Managing Sieve scripts in Emacs.
\r
167 echo ***************************************************************************
\r
173 echo Stand by while copying etc files.
\r
175 if not exist %GNUS_ETC_DIR% mkdir %GNUS_ETC_DIR%
\r
176 xcopy /R /Q /Y gnus-tut.txt %GNUS_ETC_DIR%
\r
177 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-gnus-tut-txt
\r
178 if not exist %GNUS_ETC_DIR%\gnus mkdir %GNUS_ETC_DIR%\gnus
\r
179 xcopy /R /Q /Y .\gnus\* %GNUS_ETC_DIR%\gnus\
\r
180 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-gnus-*
\r
181 if not exist %GNUS_ETC_DIR%\smilies mkdir %GNUS_ETC_DIR%\smilies
\r
182 xcopy /R /Q /Y .\smilies\* %GNUS_ETC_DIR%\smilies\
\r
183 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-smilies-*
\r
188 echo ***************************************************************************
\r
189 echo * You chose not to copy the files, therefore you should add the
\r
190 echo * following lines to the TOP of your [X]emacs customization file:
\r
192 echo * (add-to-list 'load-path "/Path/to/gnus/lisp")
\r
193 echo * (if (featurep 'xemacs)
\r
194 echo * (add-to-list 'Info-directory-list "c:/Path/to/gnus/texi/")
\r
195 echo * (add-to-list 'Info-default-directory-list "c:/Path/to/gnus/texi/"))
\r
196 echo * (require 'gnus-load)
\r
198 echo * Replace c:/Path/to/gnus with the Path where your new Gnus is (that's here
\r
199 echo * and yes, you've got to use forward slashes).
\r
200 echo ***************************************************************************
\r
204 if not "%subdirwarning%" == "yes" goto warngnusload
\r
206 echo ***************************************************************************
\r
207 echo * There's no subdirs.el file in your site-lisp directory, you should
\r
208 echo * therefor add the following line to the TOP of your Emacs
\r
209 echo * customization file:
\r
211 echo * (add-to-list 'load-path "/Path/to/emacs-site-lisp-directory/gnus/lisp")
\r
212 echo * (require 'gnus-load)
\r
213 echo * Yes, it must be forward slashes.
\r
214 echo ***************************************************************************
\r
220 echo ***************************************************************************
\r
221 echo * You should add the following line to the TOP of your Emacs
\r
222 echo * customization file:
\r
224 echo * (require 'gnus-load)
\r
225 echo ***************************************************************************
\r
229 if "%ERROR%"==":" goto noerrors
\r
232 echo ***************************************************************************
\r
233 echo * WARNING ERRORS OCCURRED!
\r
234 echo * You should look for error messages in the output of the called programs
\r
235 echo * and try to find out what exactly went wrong.
\r
236 echo * Errors occured in the following modules:
\r
238 echo ***************************************************************************
\r
251 echo ***************************************************************************
\r
252 echo * Unable to find emacs.exe or xemacs.exe on the path you specified!
\r
254 echo ***************************************************************************
\r
260 echo ***************************************************************************
\r
261 echo * Usage: make.bat :[X]Emacs-exe-dir: [/copy]
\r
263 echo * where: :[X]Emacs-exe-dir: is the directory your
\r
264 echo * emacs.exe respectively xemacs.exe resides in,
\r
265 echo * e.g. G:\Programme\XEmacs\XEmacs-21.4.11\i586-pc-win32\
\r
266 echo * or G:\Emacs\bin
\r
267 echo * /copy indicates that the compiled files should be copied to your
\r
268 echo * emacs lisp, info, and etc site directories.
\r
270 echo * Note: If you have Emacs/w3 you should set the environment variable
\r
271 echo * W3DIR to the directory where w3 is installed eg.
\r
272 echo * set W3DIR=d:\lisp\w3-4.0pre46\lisp
\r
273 echo ***************************************************************************
\r
277 rem Restore environment variables
\r
278 set PWD=%GNUS_PWD_SAVE%
\r