Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pms:master commit in: /
Date: Thu, 05 Nov 2015 16:05:20
Message-Id: 1446676920.922a9febd7783cfb61b647f323aefff6fc9c8879.ulm@gentoo
1 commit: 922a9febd7783cfb61b647f323aefff6fc9c8879
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 3 20:01:21 2015 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 4 22:42:00 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=922a9feb
7
8 Inline all listing files. Fix verbatim environments.
9
10 Makefile | 12 +++++-------
11 appendices.tex | 12 ++++++++++--
12 ebuild-env-state.tex | 32 ++++++++++++++++++++++++++++++--
13 eclasses.tex | 6 +++---
14 env-saving.listing | 27 ---------------------------
15 if-else-use.listing | 7 -------
16 pkg-mgr-commands.tex | 7 ++++---
17 7 files changed, 52 insertions(+), 51 deletions(-)
18
19 diff --git a/Makefile b/Makefile
20 index a20f5ec..4dcf33d 100644
21 --- a/Makefile
22 +++ b/Makefile
23 @@ -9,10 +9,8 @@ maintainer-clean: clean
24 rm -f vc.tex
25
26 LATEXFILES := $(filter-out vc.tex,$(wildcard *.tex)) pms.cls
27 -LISTINGFILES := $(wildcard *.listing)
28 -SOURCEFILES = $(LATEXFILES) $(LISTINGFILES)
29
30 -pms.pdf: $(SOURCEFILES) pms.bbl vc.tex eapi-cheatsheet.pdf
31 +pms.pdf: $(LATEXFILES) pms.bbl vc.tex eapi-cheatsheet.pdf
32 @# latex chokes on aux files produced by tex4ht, so remove them
33 if grep -q rEfLiNK pms.aux 2>/dev/null; then rm -f *.aux; fi
34 pdflatex pms
35 @@ -20,7 +18,7 @@ pms.pdf: $(SOURCEFILES) pms.bbl vc.tex eapi-cheatsheet.pdf
36 pdflatex eapi-cheatsheet
37 pdflatex pms
38
39 -pms.html: $(SOURCEFILES) pms.bbl vc.tex
40 +pms.html: $(LATEXFILES) pms.bbl vc.tex
41 @# need to do it twice to make the big env var table work
42 mk4ht xhlatex pms xhtml,fn-in
43 mk4ht xhlatex pms xhtml,fn-in
44 @@ -54,15 +52,15 @@ eapi-cheatsheet-nocombine.pdf: vc.tex
45 pdflatex -jobname eapi-cheatsheet-nocombine \
46 '\PassOptionsToClass{nocombine}{leaflet}\input{eapi-cheatsheet.tex}'
47
48 -vc.tex: $(SOURCEFILES) vc-git.awk
49 +vc.tex: $(LATEXFILES) vc-git.awk
50 /bin/sh ./vc
51
52 -pms.dvi: $(SOURCEFILES) pms.bbl vc.tex
53 +pms.dvi: $(LATEXFILES) pms.bbl vc.tex
54 latex pms
55 latex pms
56 latex pms
57
58 -dist: $(SOURCEFILES) pms.bib vc vc-git.awk vc.tex Makefile
59 +dist: $(LATEXFILES) pms.bib vc vc-git.awk vc.tex Makefile
60 @if test -z $(PV); then \
61 echo "Usage: $(MAKE) $@ PV=<version>"; false; \
62 fi
63
64 diff --git a/appendices.tex b/appendices.tex
65 index eb51dc9..0e64bc5 100644
66 --- a/appendices.tex
67 +++ b/appendices.tex
68 @@ -39,8 +39,16 @@ was met, and the block after the colon would be taken if the condition was not m
69 This feature was deprecated and removed from the tree long before the introduction of \t{EAPI}.
70
71 \begin{listing}
72 - \caption{If-else use blocks}\label{lst:if-else-use-listing}
73 - \verbatiminput{if-else-use.listing}
74 +\caption{If-else use blocks} \label{lst:if-else-use-listing}
75 +\begin{verbatim}
76 +DEPEND="
77 + flag? (
78 + taken/if-true
79 + ) : (
80 + taken/if-false
81 + )
82 + "
83 +\end{verbatim}
84 \end{listing}
85
86 \section{cvs Versions}
87
88 diff --git a/ebuild-env-state.tex b/ebuild-env-state.tex
89 index 4bc80c7..3ddd1ab 100644
90 --- a/ebuild-env-state.tex
91 +++ b/ebuild-env-state.tex
92 @@ -20,8 +20,36 @@ in the build sequence.
93 This is demonstrated by code listing~\ref{lst:env-saving}.
94
95 \begin{listing}
96 - \caption{Environment state between functions}\label{lst:env-saving}
97 - \verbatiminput{env-saving.listing}
98 +\caption{Environment state between functions} \label{lst:env-saving}
99 +\begin{verbatim}
100 +GLOBAL_VARIABLE="a"
101 +
102 +src_compile()
103 +{
104 + GLOBAL_VARIABLE="b"
105 + DEFAULT_VARIABLE="c"
106 + export EXPORTED_VARIABLE="d"
107 + local LOCAL_VARIABLE="e"
108 +}
109 +
110 +src_install(){
111 + [[ ${GLOBAL_VARIABLE} == "a" ]] \
112 + || [[ ${GLOBAL_VARIABLE} == "b" ]] \
113 + || die "broken env saving for globals"
114 +
115 + [[ ${DEFAULT_VARIABLE} == "c" ]] \
116 + || die "broken env saving for default"
117 +
118 + [[ ${EXPORTED_VARIABLE} == "d" ]] \
119 + || die "broken env saving for exported"
120 +
121 + [[ $(printenv EXPORTED_VARIABLE ) == "d" ]] \
122 + || die "broken env saving for exported"
123 +
124 + [[ -z ${LOCAL_VARIABLE} ]] \
125 + || die "broken env saving for locals"
126 +}
127 +\end{verbatim}
128 \end{listing}
129
130 % vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en :
131
132 diff --git a/eclasses.tex b/eclasses.tex
133 index 24ff77f..0f172f7 100644
134 --- a/eclasses.tex
135 +++ b/eclasses.tex
136 @@ -49,8 +49,8 @@ call the eclass-defined version from it. The use of it is best illustrated by an
137 given in listing~\ref{lst:export-functions} and is a snippet from a hypothetical \t{foo.eclass}.
138
139 \begin{listing}
140 - \caption{EXPORT\_FUNCTIONS example: foo.eclass}\label{lst:export-functions}
141 - \begin{verbatim}
142 +\caption{EXPORT\_FUNCTIONS example: foo.eclass} \label{lst:export-functions}
143 +\begin{verbatim}
144 foo_src_compile()
145 {
146 econf --enable-gerbil \
147 @@ -60,7 +60,7 @@ foo_src_compile()
148 }
149
150 EXPORT_FUNCTIONS src_compile
151 - \end{verbatim}
152 +\end{verbatim}
153 \end{listing}
154
155 This example defines an eclass \t{src\_compile} function and uses \t{EXPORT\_FUNCTIONS} to alias
156
157 diff --git a/env-saving.listing b/env-saving.listing
158 deleted file mode 100644
159 index 1650aa7..0000000
160 --- a/env-saving.listing
161 +++ /dev/null
162 @@ -1,27 +0,0 @@
163 -GLOBAL_VARIABLE="a"
164 -
165 -src_compile()
166 -{
167 - GLOBAL_VARIABLE="b"
168 - DEFAULT_VARIABLE="c"
169 - export EXPORTED_VARIABLE="d"
170 - local LOCAL_VARIABLE="e"
171 -}
172 -
173 -src_install(){
174 - [[ ${GLOBAL_VARIABLE} == "a" ]] \
175 - || [[ ${GLOBAL_VARIABLE} == "b" ]] \
176 - || die "broken env saving for globals"
177 -
178 - [[ ${DEFAULT_VARIABLE} == "c" ]] \
179 - || die "broken env saving for default"
180 -
181 - [[ ${EXPORTED_VARIABLE} == "d" ]] \
182 - || die "broken env saving for exported"
183 -
184 - [[ $(printenv EXPORTED_VARIABLE ) == "d" ]] \
185 - || die "broken env saving for exported"
186 -
187 - [[ -z ${LOCAL_VARIABLE} ]] \
188 - || die "broken env saving for locals"
189 -}
190
191 diff --git a/if-else-use.listing b/if-else-use.listing
192 deleted file mode 100644
193 index 83a2ae8..0000000
194 --- a/if-else-use.listing
195 +++ /dev/null
196 @@ -1,7 +0,0 @@
197 -DEPEND="
198 - flag? (
199 - taken/if-true
200 - ) : (
201 - taken/if-false
202 - )
203 - "
204
205 diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
206 index 83fbd68..d7347fe 100644
207 --- a/pkg-mgr-commands.tex
208 +++ b/pkg-mgr-commands.tex
209 @@ -224,9 +224,10 @@ current phase function has returned.
210 \t{D} instead of \t{ED} in the command given in Listing~\ref{lst:einstall}.
211 Variable \t{libdir} is an auxiliary local variable whose value is determined by
212 Algorithm~\ref{alg:ebuild-libdir}.
213 +
214 \begin{listing}[H]
215 - \caption{einstall command}\label{lst:einstall}
216 - \begin{verbatim}
217 +\caption{einstall command} \label{lst:einstall}
218 +\begin{verbatim}
219 emake \
220 prefix="${ED}"/usr \
221 datadir="${ED}"/usr/share \
222 @@ -238,7 +239,7 @@ emake \
223 -j1 \
224 "$@" \
225 install
226 - \end{verbatim}
227 +\end{verbatim}
228 \end{listing}
229
230 \end{description}