blob: ab194a768f2d162b08034fdf1477dccc479faad0 (
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
@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
)
setlocal enabledelayedexpansion
set target=disser
set subclass=gost732
set bst=disser-bst
set manual=manual
set clsfiles=*.cls *.rtx
set docfiles=%subclass%.pdf %target%.pdf %subclass%.pdf %manual%.pdf ^
..\README ..\README.ru ..\ChangeLog
set bstfile=%target%.bst
set bstdocfile=%bst%.pdf
set srcfiles=*.dtx *.ins %manual%.tex Makefile nomake.cmd
if "!texmf!"=="" set texmf=%programfiles%\miktex
if "%clsdir%"=="" set clsdir=!texmf!\tex\latex\%target%
if "%bstdir%"=="" set bstdir=!texmf!\bibtex\bst\%target%
if "%docdir%"=="" set docdir=!texmf!\doc\latex\%target%
if "%bstdocdir%"=="" set bstdocdir=!texmf!\doc\bibtex\%target%
if "%srcdir%"=="" set srcdir=!texmf!\source\latex\%target%
if "%clfiles%"=="" set clfiles=*.rtx *.cls *.log *.out *.aux *.dvi *.ind ^
*.idx *.ilg *.glo *.toc *.ind *.bak *.bbl *.blg *.pdf *.sav *.ps *.bst
if "%latex%"=="" set latex=latex
if "%pdflatex%"=="" set pdflatex=pdflatex
if "%mi%"=="" 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 :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
%latex% %latexflags% %bst%.dtx
%latex% %latexflags% %bst%.dtx
%latex% %latexflags% %manual%.tex
%latex% %latexflags% %manual%.tex
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
%pdflatex% %pdflatexflags% %bst%.dtx
%pdflatex% %pdflatexflags% %bst%.dtx
%pdflatex% %pdflatexflags% %manual%.tex
%pdflatex% %pdflatexflags% %manual%.tex
goto :eof
)
if "%1"=="install" (
:install
if not exist %target%.cls call :all
if not exist "%clsdir%" md "%clsdir%"
if not exist "%docdir%" md "%docdir%"
if not exist "%bstdir%" md "%bstdir%"
if not exist "%srcdir%" md "%srcdir%"
for %%f in (%clsfiles%) do xcopy /y /f %%f "%clsdir%"
for %%f in (%docfiles%) do xcopy /y /f %%f "%docdir%"
for %%f in (%bstfile%) do xcopy /y /f %%f "%bstdir%"
for %%f in (%bstdocfile%) do xcopy /y /f %%f "%docdir%"
for %%f in (%srcfiles%) do xcopy /y /f %%f "%srcdir%"
goto :eof
)
if "%1"=="help" (
:help
echo Targets:
echo all ^(default^) build classes and documentation
echo class build class
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
|