commit: 922a9febd7783cfb61b647f323aefff6fc9c8879
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 3 20:01:21 2015 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Nov 4 22:42:00 2015 +0000
URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=922a9feb
Inline all listing files. Fix verbatim environments.
Makefile | 12 +++++-------
appendices.tex | 12 ++++++++++--
ebuild-env-state.tex | 32 ++++++++++++++++++++++++++++++--
eclasses.tex | 6 +++---
env-saving.listing | 27 ---------------------------
if-else-use.listing | 7 -------
pkg-mgr-commands.tex | 7 ++++---
7 files changed, 52 insertions(+), 51 deletions(-)
diff --git a/Makefile b/Makefile
index a20f5ec..4dcf33d 100644
--- a/Makefile
+++ b/Makefile
@@ -9,10 +9,8 @@ maintainer-clean: clean
rm -f vc.tex
LATEXFILES := $(filter-out vc.tex,$(wildcard *.tex)) pms.cls
-LISTINGFILES := $(wildcard *.listing)
-SOURCEFILES = $(LATEXFILES) $(LISTINGFILES)
-pms.pdf: $(SOURCEFILES) pms.bbl vc.tex eapi-cheatsheet.pdf
+pms.pdf: $(LATEXFILES) pms.bbl vc.tex eapi-cheatsheet.pdf
@# latex chokes on aux files produced by tex4ht, so remove them
if grep -q rEfLiNK pms.aux 2>/dev/null; then rm -f *.aux; fi
pdflatex pms
@@ -20,7 +18,7 @@ pms.pdf: $(SOURCEFILES) pms.bbl vc.tex eapi-cheatsheet.pdf
pdflatex eapi-cheatsheet
pdflatex pms
-pms.html: $(SOURCEFILES) pms.bbl vc.tex
+pms.html: $(LATEXFILES) pms.bbl vc.tex
@# need to do it twice to make the big env var table work
mk4ht xhlatex pms xhtml,fn-in
mk4ht xhlatex pms xhtml,fn-in
@@ -54,15 +52,15 @@ eapi-cheatsheet-nocombine.pdf: vc.tex
pdflatex -jobname eapi-cheatsheet-nocombine \
'\PassOptionsToClass{nocombine}{leaflet}\input{eapi-cheatsheet.tex}'
-vc.tex: $(SOURCEFILES) vc-git.awk
+vc.tex: $(LATEXFILES) vc-git.awk
/bin/sh ./vc
-pms.dvi: $(SOURCEFILES) pms.bbl vc.tex
+pms.dvi: $(LATEXFILES) pms.bbl vc.tex
latex pms
latex pms
latex pms
-dist: $(SOURCEFILES) pms.bib vc vc-git.awk vc.tex Makefile
+dist: $(LATEXFILES) pms.bib vc vc-git.awk vc.tex Makefile
@if test -z $(PV); then \
echo "Usage: $(MAKE) $@ PV=<version>"; false; \
fi
diff --git a/appendices.tex b/appendices.tex
index eb51dc9..0e64bc5 100644
--- a/appendices.tex
+++ b/appendices.tex
@@ -39,8 +39,16 @@ was met, and the block after the colon would be taken if the
condition was not m
This feature was deprecated and removed from the tree long before the
introduction of \t{EAPI}.
\begin{listing}
- \caption{If-else use blocks}\label{lst:if-else-use-listing}
- \verbatiminput{if-else-use.listing}
+\caption{If-else use blocks} \label{lst:if-else-use-listing}
+\begin{verbatim}
+DEPEND="
+ flag? (
+ taken/if-true
+ ) : (
+ taken/if-false
+ )
+ "
+\end{verbatim}
\end{listing}
\section{cvs Versions}
diff --git a/ebuild-env-state.tex b/ebuild-env-state.tex
index 4bc80c7..3ddd1ab 100644
--- a/ebuild-env-state.tex
+++ b/ebuild-env-state.tex
@@ -20,8 +20,36 @@ in the build sequence.
This is demonstrated by code listing~\ref{lst:env-saving}.
\begin{listing}
- \caption{Environment state between functions}\label{lst:env-saving}
- \verbatiminput{env-saving.listing}
+\caption{Environment state between functions} \label{lst:env-saving}
+\begin{verbatim}
+GLOBAL_VARIABLE="a"
+
+src_compile()
+{
+ GLOBAL_VARIABLE="b"
+ DEFAULT_VARIABLE="c"
+ export EXPORTED_VARIABLE="d"
+ local LOCAL_VARIABLE="e"
+}
+
+src_install(){
+ [[ ${GLOBAL_VARIABLE} == "a" ]] \
+ || [[ ${GLOBAL_VARIABLE} == "b" ]] \
+ || die "broken env saving for globals"
+
+ [[ ${DEFAULT_VARIABLE} == "c" ]] \
+ || die "broken env saving for default"
+
+ [[ ${EXPORTED_VARIABLE} == "d" ]] \
+ || die "broken env saving for exported"
+
+ [[ $(printenv EXPORTED_VARIABLE ) == "d" ]] \
+ || die "broken env saving for exported"
+
+ [[ -z ${LOCAL_VARIABLE} ]] \
+ || die "broken env saving for locals"
+}
+\end{verbatim}
\end{listing}
% vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en :
diff --git a/eclasses.tex b/eclasses.tex
index 24ff77f..0f172f7 100644
--- a/eclasses.tex
+++ b/eclasses.tex
@@ -49,8 +49,8 @@ call the eclass-defined version from it. The use of it is
best illustrated by an
given in listing~\ref{lst:export-functions} and is a snippet from a
hypothetical \t{foo.eclass}.
\begin{listing}
- \caption{EXPORT\_FUNCTIONS example: foo.eclass}\label{lst:export-functions}
- \begin{verbatim}
+\caption{EXPORT\_FUNCTIONS example: foo.eclass} \label{lst:export-functions}
+\begin{verbatim}
foo_src_compile()
{
econf --enable-gerbil \
@@ -60,7 +60,7 @@ foo_src_compile()
}
EXPORT_FUNCTIONS src_compile
- \end{verbatim}
+\end{verbatim}
\end{listing}
This example defines an eclass \t{src\_compile} function and uses
\t{EXPORT\_FUNCTIONS} to alias
diff --git a/env-saving.listing b/env-saving.listing
deleted file mode 100644
index 1650aa7..0000000
--- a/env-saving.listing
+++ /dev/null
@@ -1,27 +0,0 @@
-GLOBAL_VARIABLE="a"
-
-src_compile()
-{
- GLOBAL_VARIABLE="b"
- DEFAULT_VARIABLE="c"
- export EXPORTED_VARIABLE="d"
- local LOCAL_VARIABLE="e"
-}
-
-src_install(){
- [[ ${GLOBAL_VARIABLE} == "a" ]] \
- || [[ ${GLOBAL_VARIABLE} == "b" ]] \
- || die "broken env saving for globals"
-
- [[ ${DEFAULT_VARIABLE} == "c" ]] \
- || die "broken env saving for default"
-
- [[ ${EXPORTED_VARIABLE} == "d" ]] \
- || die "broken env saving for exported"
-
- [[ $(printenv EXPORTED_VARIABLE ) == "d" ]] \
- || die "broken env saving for exported"
-
- [[ -z ${LOCAL_VARIABLE} ]] \
- || die "broken env saving for locals"
-}
diff --git a/if-else-use.listing b/if-else-use.listing
deleted file mode 100644
index 83a2ae8..0000000
--- a/if-else-use.listing
+++ /dev/null
@@ -1,7 +0,0 @@
-DEPEND="
- flag? (
- taken/if-true
- ) : (
- taken/if-false
- )
- "
diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
index 83fbd68..d7347fe 100644
--- a/pkg-mgr-commands.tex
+++ b/pkg-mgr-commands.tex
@@ -224,9 +224,10 @@ current phase function has returned.
\t{D} instead of \t{ED} in the command given in Listing~\ref{lst:einstall}.
Variable \t{libdir} is an auxiliary local variable whose value is
determined by
Algorithm~\ref{alg:ebuild-libdir}.
+
\begin{listing}[H]
- \caption{einstall command}\label{lst:einstall}
- \begin{verbatim}
+\caption{einstall command} \label{lst:einstall}
+\begin{verbatim}
emake \
prefix="${ED}"/usr \
datadir="${ED}"/usr/share \
@@ -238,7 +239,7 @@ emake \
-j1 \
"$@" \
install
- \end{verbatim}
+\end{verbatim}
\end{listing}
\end{description}