@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.33
rem e=Path of executable distribution for emx
set e=\emacs\19.33
rem s=Path of source distribution for emx
set s=\emacs\19.33
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 bitmaps %s%\src\bitmaps\
if errorlevel 1 goto error
xcopy ..\lib-src %s%\lib-src\
if errorlevel 1 goto error
xcopy ..\lib-src\os2 %s%\lib-src\os2\
if errorlevel 1 goto error
xcopy ..\lwlib %s%\lwlib\
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 %o%\etc\e %e%\etc\e\
if errorlevel 1 goto error
xcopy ..\etc\DOC %e%\etc\
if errorlevel 1 goto error
if exist ..\etc\DOC-X xcopy ..\etc\DOC-X %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\FAQ %e%\data\
if errorlevel 1 goto error
xcopy %o%\etc\GNU %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%\*~
del %e%\lisp\*~
del %e%\lisp\term\*~
del %e%\emx\*~
del %e%\emx\*.zip
del %e%\etc\FAQ
del %s%\lib-src\*.o
del %s%\lib-src\*~
del %s%\lib-src\os2\*~
del %s%\lib-src\Makefile
del %s%\lib-src\Makefile.c
del %s%\lib-src\getdate.c
del %s%\lib-src\*.exe
del %s%\lib-src\b2m
del %s%\lib-src\ctags
del %s%\lib-src\digest-doc
del %s%\lib-src\etags
del %s%\lib-src\hexl
del %s%\lib-src\make-docfile
del %s%\lib-src\profile
del %s%\lib-src\sorted-doc
del %s%\lib-src\test-distrib
del %s%\lib-src\yow
del %s%\lib-src\os2\*.o
del %s%\lib-src\os2\*.obj
del %s%\lib-src\os2\*.exe
del %s%\lib-src\os2\*.res
del %s%\lisp\Makefile
del %s%\lwlib\Makefile
del %s%\lwlib\liblw.a
del %s%\lwlib\*.o
del %s%\src\*.o
del %s%\src\*~
del %s%\src\*.exe
del %s%\src\paths.h
del %s%\src\config.h
del %s%\src\Makefile
del %s%\src\Makefile.c
del %s%\src\TAGS
del %s%\src\pmemacs.res
del %s%\src\temacs
del %s%\src\temacsx
ren %e%\emx\readme README
ren %e%\emx\faq FAQ
goto end

:error
echo An error occured!
:end
endlocal
