blob: 2100f5de3468d8a2254545df388e8537be2f89bd (
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
|
%%
%% This file generates files required to use the listings package.
%% At your command prompt write
%%
%% tex listings.ins
%%
%%
%% (w)(c) 1996--1999,2002 Carsten Heinz
%%
%% This file is distributed under the terms of the LaTeX Project Public
%% License from CTAN archives in directory macros/latex/base/lppl.txt.
%% Either version 1.0 or, at your option, any later version.
%%
%% This file is completely free and comes without any warranty.
%%
%% Permission is granted to change this file. You are not allowed to
%% distribute any changed version of this file unless you rename it.
%%
\input docstrip
\preamble
\endpreamble
\usedir{tex/latex/listings}
\keepsilent
\askforoverwritefalse
%
% generate base package
%
\generate{
\file{listings.sty}{\from{listings.dtx}{kernel}}
\file{lstmisc.sty}{\from{listings.dtx}{misc,0.21}}
\file{lstdoc.sty}{\from{listings.dtx}{doc}}
\file{lstdrvrs.ins}{\from{lstdrvrs.dtx}{install}}
\file{listings.cfg}{\from{lstdrvrs.dtx}{config}}
}
%
% generate dummy patch if necessary
%
\newif\ifdummypatch
\def\lstinsIfFileExists#1#2#3{% <filename><pre-input><post-input>
\openin\inputcheck #1\relax
\ifeof\inputcheck\else
\closein\inputcheck
#2%
\@@input #1
#3%
\fi}
\def\ProvidesFile#1[#2]{\def\lstpatch{#2}\endinput}
\def\lstinsCheckVersion#1 #2{%
\ifx #2v\dummypatchtrue \expandafter\lstinsGobbleNil \fi
\afterassignment\lstinsCheckVersion@ \count\z@#2}
\def\lstinsCheckVersion@.{%
\afterassignment\lstinsGobbleNil \count\tw@}
\def\lstinsGobbleNil#1\@nil{%
\ifdummypatch\else
\edef\patchversion{\the\count\z@.\the\count\tw@}%
\ifx\lstversion\patchversion\else
\dummypatchtrue
\fi
\fi}
\Msg{checking listings version ...}
\lstinsIfFileExists{listings.sty}
{\def\NeedsTeXFormat#1{\endinput}}
{\let\lstversion\fileversion
\lstinsIfFileExists{lstpatch.sty}%
{\let\fileversion\@undefined}%
{\ifx\fileversion\@undefined
\expandafter\lstinsCheckVersion\lstpatch\@nil
\fi}%
}
\ifdummypatch
\generate{\file{lstpatch.sty}{\from{listings.dtx}{patch}}}
\fi
%
% generate language driver files
%
\batchinput{lstdrvrs.ins}
\Msg{*}
\Msg{* You probably need to move all created `.sty' and `.cfg'}
\Msg{* files into a directory searched by TeX.}
\Msg{*}
\Msg{* And don't forget to refresh your filename database}
\Msg{* if your TeX distribution uses such a database.}
\Msg{*}
\endbatchfile
|