Ensure nonempty variable value. Reported by Frank
[gnus] / make-x.bat
1 @echo off\r
2 \r
3 rem Modified once more by Frank Schmitt (ich@Frank-Schmitt.net)\r
4 rem Modified by ShengHuo Zhu (zsh@cs.rochester.edu)\r
5 rem Originally from make.bat by David Charlap (shamino@writeme.com)\r
6 \r
7 rem Clear PWD so emacs doesn't get confused\r
8 set GNUS_PWD_SAVE=%PWD%\r
9 set PWD=\r
10 \r
11 if "%1" == "" goto usage\r
12 \r
13 set emacs=xemacs.exe\r
14 if "%2" == "" set copy="false"\r
15 if "%2" == "copy" set copy=true\r
16 if "%2" == "/copy" set copy=true\r
17 \r
18 cd lisp\r
19 call %1\%emacs% -batch -q -no-site-file -l ./dgnushack.el -f dgnushack-compile\r
20 if not %copy%==true goto info\r
21 attrib -r %1\..\..\xemacs-packages\lisp\gnus\*.*\r
22 copy *.el? %1\..\..\xemacs-packages\lisp\gnus\r
23 \r
24 :info\r
25 set EMACSINFO=call %1\%emacs% -no-site-file -no-init-file -batch -q -l infohack.el -f batch-makeinfo\r
26 cd ..\texi\r
27 %EMACSINFO% message.texi\r
28 %EMACSINFO% emacs-mime.texi\r
29 %EMACSINFO% gnus.texi\r
30 if not %copy%==true goto done\r
31 copy gnus %1\..\..\xemacs-packages\info\r
32 copy gnus-?? %1\..\..\xemacs-packages\info\r
33 copy message %1\..\..\xemacs-packages\info\r
34 copy emacs-mime %1\..\..\xemacs-packages\info\r
35 \r
36 :etc\r
37 cd ..\etc\r
38 copy gnus-tut.txt %1\..\..\xemacs-packages\etc\r
39 \r
40 :done\r
41 cd ..\r
42 goto end\r
43 \r
44 :usage\r
45 echo Usage: make-x.bat :xemacs-dir: [/copy]\r
46 echo.\r
47 echo where: :xemacs-dir: is the directory you installed xemacs in \r
48 echo                     (the directory where xemacs.exe is situated)\r
49 echo                    eg. C:\Programme\XEmacs\XEmacs-21.4.3\i586-pc-win32\r
50 echo        /copy indicates that the compiled files should be copied to your\r
51 echo             emacs lisp, info, and etc directories\r
52 echo.\r
53 echo Note: If you have Emacs/w3 you should set the environment variable \r
54 echo       W3DIR to the directory where w3 is installed eg.\r
55 echo                 set W3DIR=C:\Progra~1\XEmacs\xemacs-packages\lisp\w3\r
56 \r
57 rem Restore PWD so whoever called this batch file doesn't get confused\r
58 set PWD=%GNUS_PWD_SAVE%\r
59 set GNUS_PWD_SAVE=\r
60 :end\r