diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/disser/nomake.cmd')
-rw-r--r-- | Master/texmf-dist/doc/latex/disser/nomake.cmd | 113 |
1 files changed, 79 insertions, 34 deletions
diff --git a/Master/texmf-dist/doc/latex/disser/nomake.cmd b/Master/texmf-dist/doc/latex/disser/nomake.cmd index aa1d1770b9d..061b185d3d0 100644 --- a/Master/texmf-dist/doc/latex/disser/nomake.cmd +++ b/Master/texmf-dist/doc/latex/disser/nomake.cmd @@ -1,62 +1,107 @@ @echo off -set target=disser +rem nomake script for LaTeX packages +rem Author: Stanislav Kruchinin <stanislav.kruchinin@gmail.com> + +if "%CMDEXTVERSION%"=="" ( + echo Error: This script requires command interpreter from Windows 2000 or above. + goto :eof +) -if %texmf%.==. set texmf=d:\programs\miktex\local +if "%texmf%"=="" set texmf=%programfiles%\miktex-2.6 + +set target=disser +set subclass=gost732 set destdir=%texmf%\tex\latex\%target% set docdir=%texmf%\doc\latex\%target% -set clean=*.rtx *.cls *.log *.out *.aux *.dvi *.idx *.glo *.toc *.ind *.ilg *.bak *.bbl *.blg +set clfiles=*.rtx *.cls *.log *.out *.aux *.dvi *.idx *.glo *.toc *.ind ^ + *.ilg *.bak *.bbl *.blg *.pdf + +set tex=latex +set pdftex=pdflatex -if %1.==. ( +set texflags=-src-specials -terminal=oem + +rem Default target +if "%1"=="" ( :default - goto :all + call :all +goto :eof ) :start -if %1.==. goto :eof +if "%1"=="" goto :eof -if %1.==all. ( +if "%1"=="all" ( :all - latex %target%.ins + call :class call :doc goto :eof ) -if %1.==class. ( +if "%1"=="class" ( :class - latex %target%.ins + %tex% %target%.ins goto :eof ) -if %1.==clean. ( +if "%1"=="clean" ( :clean - del %clean% - goto :eof -goto :end + del %clfiles% +goto :eof ) -if %1.==install. ( -:install - if not exist %target%.cls ( - echo You must run 'nomake' first - goto :eof - ) - if not exist %destdir% mkdir %destdir% - if not exist %docdir% mkdir %docdir% - xcopy /y /f *.rtx %destdir% - xcopy /y /f *.cls %destdir% - xcopy /y /f *.dvi %docdir% -goto :end -) - -if %1.==doc. ( +if "%1"=="doc" ( :doc - chcp 1251 - latex %target%.dtx - latex -src-specials %target%.dtx -goto :end + call :dvi + call :pdf +goto :eof +) + +if "%1"=="dvi" ( +:dvi + %tex% %texflags% %target%.dtx + %tex% %texflags% %target%.dtx + %tex% %texflags% %subclass%.dtx + %tex% %texflags% %subclass%.dtx +goto :eof +) + +if "%1"=="pdf" ( +:pdf + %pdftex% %texflags% %target%.dtx + %pdftex% %texflags% %target%.dtx + %pdftex% %texflags% %subclass%.dtx + %pdftex% %texflags% %subclass%.dtx +goto :eof +) + +if "%1"=="install" ( +:install + if not exist %target%.cls ( call :all ) + if not exist "%destdir%" md "%destdir%" + if not exist "%docdir%" md "%docdir%" + xcopy /y /f *.rtx "%destdir%" + xcopy /y /f *.cls "%destdir%" + xcopy /y /f *.dvi "%docdir%" + xcopy /y /f *.pdf "%docdir%" +goto :eof +) + +if "%1"=="help" ( +:help + echo Targets: + echo all - ^(default^) build classes and documentation + echo class - build classes + echo clean - remove ouptut files + echo doc - build documentation + echo dvi - build DVI version of documentation + echo help - show help + echo install - install package and documentation + echo pdf - build PDF version of documentation +goto :eof ) -if %1. neq . (echo Don't know how to make %1 ) +if "%1" neq "" (echo Don't know how to make %1 ) :end shift & goto :start |