diff options
author | H. Peter Anvin <hpa@zytor.com> | 2002-04-30 21:01:08 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2002-04-30 21:01:08 +0000 |
commit | 734b188090539eddf08e61c317415f566446691b (patch) | |
tree | abc7516f5a80c8b0810f5018125eb5f95717ca76 /doc/makedocs.bat | |
parent | 1cd0e2d5bf50b2cc482cad7beb8f7dee6a81d57b (diff) | |
download | nasm-734b188090539eddf08e61c317415f566446691b.tar.gz nasm-734b188090539eddf08e61c317415f566446691b.tar.bz2 nasm-734b188090539eddf08e61c317415f566446691b.zip |
NASM 0.98.09
Diffstat (limited to 'doc/makedocs.bat')
-rw-r--r-- | doc/makedocs.bat | 254 |
1 files changed, 254 insertions, 0 deletions
diff --git a/doc/makedocs.bat b/doc/makedocs.bat new file mode 100644 index 0000000..70db811 --- /dev/null +++ b/doc/makedocs.bat @@ -0,0 +1,254 @@ +@echo off +if "%1"=="clean" goto makeclean +if "%1"=="CLEAN" goto makeclean +if "%1"=="spotless" goto spotless +if "%1"=="SPOTLESS" goto spotless +if "%1"=="install" goto install +if "%1"=="INSTALL" goto install + +cls +echo. +echo. +echo. +echo Usage: +echo. +echo makedocs - no parameters - makes all Docs +echo makedocs install - installs already made docs in subdirectories +echo makedocs clean - removes docs from current directory +echo makedocs spotless - removes all - including default install dirs +echo. +echo. +echo. +echo. +echo Makedocs(.bat), with no parameters will create Nasm Documentation +echo in several formats: plain ascii text, ps, html, rtf, Windows help +echo format, and if you've got an "info" system installed, info format. +echo. +echo. +echo This requires Perl, and almost 4MB disk space. +echo. +echo. +choice " Proceed with making docs? " +if errorlevel 2 goto exit + +:makeall + +echo. +echo. +echo This takes a while. Stretch! +echo. +echo. + +perl rdsrc.pl<nasmdoc.src +echo. +echo. +choice " Make *info* files? " +if errorlevel 2 goto noinfo +:makeinfo +echo. +echo. +makeinfo nasmdoc.tex + +:noinfo + +:install + +if not exist nasmdoc.txt goto nofiles +if not exist nasmdoc0.htm goto nofiles +if not exist nasmdo10.htm goto nofiles +if not exist nasmdoc.hpj goto nofiles +if not exist nasmdoc.rtf goto nofiles +if not exist nasmdoc.ps goto nofiles +if not exist nasmdoc.tex goto nofiles +goto gotfiles +:nofiles +echo. +echo. +echo. +echo. +echo Alert! Files missing! +echo. +echo. +choice " Would you like to make them now? " +if errorlevel 2 goto exit +goto makeall + +:gotfiles + +:: get current path + +set oldprompt=%prompt% +echo @prompt set nasdoc=$p>temp1.bat +command /c temp1.bat>temp2.bat +call temp2 +del temp1.bat +del temp2.bat +set prompt=%oldprompt% +set oldprompt= + +echo. +echo. +echo. +echo. +echo Current Directory is %nasdoc% +echo Nasm Documentation will be installed under this +echo as %nasdoc%\text\nasmdoc.txt, etc. +echo. +echo. +choice " Change this directory? " +if errorlevel 2 goto dirok + +echo. +echo. +echo. +echo. +echo Directory *above* the directory you name (at least) should exist. +echo Nasm documentation will be installed *under* the directory you +echo name. E.G. \docs\nasm\html, etc. No trailing backslash! +echo. +echo. + +echo Enter new name for base directory: +set input= +fc con nul /lb1 /n|date|find "1:">magic.bat +echo set input=%%5>enter.bat +call magic +set nasdoc=%input% +del magic.bat +del enter.bat +set input= + +echo. +echo. +md %nasdoc% +echo. +echo. + +choice " Install Text docs in %nasdoc%\text ? " +if errorlevel 2 goto notext +md %nasdoc%\text +copy nasmdoc.txt %nasdoc%\text +:notext + +choice " Install Html docs in %nasdoc%\html ? " +if errorlevel 2 goto nohtml +md %nasdoc%\html +copy *.htm %nasdoc%\html +:nohtml + +choice " Install Info docs in %nasdoc%\info ? " +if errorlevel 2 goto noinfodocs +if not exist nasm.inf goto inofiles +if not exist nasm.i9 goto inofiles +goto gotifiles +:inofiles +echo. +echo. +echo Alert! Files missing! +echo. +echo. +choice " Would you like to make them now? " +if errorlevel 2 goto noinfodocs +if not exist nasmdoc.tex goto makeall +goto makeinfo + +:gotifiles + +md %nasdoc%\info +copy nasm.i* %nasdoc%\info +:noinfodocs + +choice " Install Winhelp docs in %nasdoc%\winhelp ? " +if errorlevel 2 goto nowinhelp +md %nasdoc%\winhelp +copy nasmdoc.rtf %nasdoc%\winhelp +copy nasmdoc.hpj %nasdoc%\winhelp +:nowinhelp + +choice " Install Postscript docs in %nasdoc%\ps ? " +if errorlevel 2 goto nops +md %nasdoc%\ps +copy nasmdoc.ps %nasdoc%\ps +:nops +goto cleanup + +:dirok + +choice " Install Text docs in .\text ? " +if errorlevel 2 goto notext2 +md text +copy nasmdoc.txt text +:notext2 + +choice " Install Html docs in .\html ? " +if errorlevel 2 goto nohtml2 +md html +copy *.htm html +:nohtml2 + +choice " Install Info docs in .\info ? " +if errorlevel 2 goto nid2 + +if not exist nasm.inf goto inof2 +if not exist nasm.i9 goto inof2 +goto gifiles2 +:inof2 +echo. +echo. +echo Alert! Files missing! +echo. +echo. +choice " Would you like to make them now? " +if errorlevel 2 goto nid2 +if not exist nasmdoc.tex goto makeall +goto makeinfo + +:gifiles2 + +md info +copy nasm.i* info +:nid2 + +choice " Install Winhelp docs in .\winhelp ? " +if errorlevel 2 goto nwhelp2 +md winhelp +copy nasmdoc.rtf winhelp +copy nasmdoc.hpj winhelp +:nwhelp2 + +choice " Install Postscript docs in .\ps ? " +if errorlevel 2 goto nops2 +md ps +copy nasmdoc.ps ps +:nops2 + + +:cleanup +set nasdoc= + +echo. +echo. +echo. +echo. +choice " Remove all files created, but not installed?" +if not errorlevel 2 goto makeclean + +goto exit + +:spotless +deltree /y text +deltree /y html +deltree /y info +deltree /y winhelp +deltree /y ps + +:makeclean +del *.htm +del *.rtf +del *.hpj +del *.txt +del *.tex +del *.ps +del nasm.i* + +:exit |