blob: a85368fd2a7ded4e35b900c9ae96b5eb05c7e7fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
@echo off
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 "%target%"=="" set target=disser
set subclass=gost732
if "%texmf%"=="" set texmf=%programfiles%\miktex
if "%destdir%"=="" set destdir=%texmf%\tex\latex\%target%
if "%docdir%"=="" set docdir=%texmf%\doc\latex\%target%
if "%clfiles%"=="" set clfiles=*.rtx *.cls *.log *.out *.aux *.dvi *.ind ^
*.idx *.ilg *.glo *.toc *.ind *.bak *.bbl *.blg *.pdf *.sav *.ps
if "%latex%"=="" set latex=latex
if "%pdflatex%"=="" set pdflatex=pdflatex
set mi=makeindex
if "%latexflags%"=="" set latexflags=-src-specials
if "%pdflatexflags%"=="" set pdflatexflags=""
rem Default target
if "%1"=="" (
:default
call :all
goto :eof
)
:start
if "%1"=="" goto :eof
if "%1"=="all" (
:all
call :class
call :doc
goto :eof
)
if "%1"=="class" (
:class
%latex% %target%.ins
goto :eof
)
if "%1"=="clean" (
:clean
del %clfiles%
goto :eof
)
if "%1"=="doc" (
:doc
call :dvi
call :pdf
goto :eof
)
if "%1"=="dvi" (
:dvi
%latex% %latexflags% %target%.dtx
%mi% -r %target%
%latex% %latexflags% %target%.dtx
%latex% %latexflags% %subclass%.dtx
%latex% %latexflags% %subclass%.dtx
goto :eof
)
if "%1"=="pdf" (
:pdf
%pdflatex% %pdflatexflags% %target%.dtx
%mi% -r %target%
%pdflatex% %pdflatexflags% %target%.dtx
%pdflatex% %pdflatexflags% %subclass%.dtx
%pdflatex% %pdflatexflags% %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 List of 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
:end
shift & goto :start
|