@rem dist.cmd
@rem Copy GNU Emacs from CVS work directory (src) to distribution directories
@rem Do not run this batch file from the distribution directory!
@rem Run install.cmd first!
rem @echo off
setlocal
rem o=Path of original GNU Emacs 19 distribution
set o=\emacs-19.17
rem e=Path of executable distribution for emx
set e=\emacs\19.17
rem s=Path of source distribution for emx
set s=\emacs\19.17
if not exist vmsfns.c goto error
xcopy ..\lisp %e%\lisp\
if errorlevel 1 goto error
xcopy ..\lisp\term %e%\lisp\term\
if errorlevel 1 goto error
xcopy .. %s%\
if errorlevel 1 goto error
xcopy . %s%\src\
if errorlevel 1 goto error
xcopy s\emx.h %s%\src\s\
if errorlevel 1 goto error
xcopy m\intel386.h %s%\src\m\
if errorlevel 1 goto error
xcopy ..\lib-src %s%\lib-src\
if errorlevel 1 goto error
xcopy ..\emx %e%\emx\
if errorlevel 1 goto error
xcopy %o%\info %e%\info\
if errorlevel 1 goto error
xcopy %o%\man %e%\man\
if errorlevel 1 goto error
xcopy %o%\etc %e%\etc\
if errorlevel 1 goto error
xcopy ..\etc\DOC %e%\etc\
if errorlevel 1 goto error
xcopy %o%\etc\COPYING %e%\data\
if errorlevel 1 goto error
xcopy %o%\etc\DISTRIB %e%\data\
if errorlevel 1 goto error
xcopy %o%\etc\NEWS %e%\data\
if errorlevel 1 goto error
xcopy %o%\etc\TUTORIAL %e%\data\
if errorlevel 1 goto error
xcopy %o%\etc\spook.lines %e%\data\
if errorlevel 1 goto error
xcopy %o%\etc\yow.lines %e%\data\
if errorlevel 1 goto error
xcopy %o%\lisp\version.el %e%\lisp\
if errorlevel 1 goto error
xcopy %o%\lisp\version.el %s%\lisp\
if errorlevel 1 goto error
xcopy %o%\lib-src\testfile %s%\lib-src\
if errorlevel 1 goto error
del %e%\lisp\*~
del %e%\lisp\term\*~
del %e%\emx\*~
del %e%\emx\*.zip
del %s%\lib-src\*.o
del %s%\lib-src\*~
del %s%\lib-src\Makefile
del %s%\lib-src\*.exe
del %s%\lib-src\b2m
del %s%\lib-src\ctags
del %s%\lib-src\cursor
del %s%\lib-src\cvtmail
del %s%\lib-src\digest-doc
del %s%\lib-src\emacsclient
del %s%\lib-src\emacsserver
del %s%\lib-src\env
del %s%\lib-src\etags
del %s%\lib-src\fakemail
del %s%\lib-src\hexl
del %s%\lib-src\make-docfile
del %s%\lib-src\make-path
del %s%\lib-src\movemail
del %s%\lib-src\sorted-doc
del %s%\lib-src\test-distrib
del %s%\lib-src\timer
del %s%\lib-src\wakeup
del %s%\lib-src\yow
del %s%\src\*.o
del %s%\src\*~
del %s%\src\temacs
del %s%\src\*.exe
del %s%\src\xmakefile
del %s%\src\paths.h
del %s%\src\config.h
del %s%\src\Makefile
del %s%\src\vms*
del %s%\src\pmemacs.res
goto end

:error
echo An error occured!
:end
endlocal
