diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-03-29 14:22:27 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-03-29 20:30:21 -0400 |
commit | 1a13e31d275430ffba713c8a68ee7f22093c29e0 (patch) | |
tree | 66b0b3e91d22fce58affea603c2a5cbf6eb0c6a9 /man | |
parent | 4e7b3c20e00c40372c551bd42c57e40500f4ceb4 (diff) |
build-sys,man: use XML entities to substite strings
This makes it easier to add substitutions to man pages,
avoiding the separate transformation step.
mkdir -p's are removed from the rule, because xsltproc will
will create directories on it's own.
All in all, two or three forks per man page are avoided,
which should make things marginally faster.
Unfortunately python parsers must too be tweaked to handle
entities. This isn't particularly easy: with lxml a custom
Resolver can be used, but the stdlib etree doesn't support
external entities *at all*. So when running without lxml,
the entities are just removed. Right now it doesn't matter,
since the entities are not indexed anyway. But I intend to
add indexing of filenames in the near future, and then the
index generated without lxml might be missing a few lines.
Oh well.
Diffstat (limited to 'man')
-rw-r--r-- | man/.gitignore | 2 | ||||
-rw-r--r-- | man/systemd.unit.xml | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/man/.gitignore b/man/.gitignore index 3798c75f1d..bf5eeab938 100644 --- a/man/.gitignore +++ b/man/.gitignore @@ -1,4 +1,4 @@ /systemd.directives.xml /systemd.index.xml /*.[13578] -/python-systemd/ +/custom-entities.ent diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 2196e73bb3..47c50315ae 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -1,6 +1,9 @@ <?xml version='1.0'?> <!--*-nxml-*--> <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" - "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % entities SYSTEM "custom-entities.ent" > +%entities; +]> <!-- This file is part of systemd. @@ -278,7 +281,7 @@ <entry>Generated units</entry> </row> <row> - <entry><filename>@SYSTEM_CONFIG_UNIT_PATH@</filename></entry> + <entry><filename>&SYSTEM_CONFIG_UNIT_PATH;</filename></entry> <entry morerows='1'>Local configuration</entry> </row> <row> @@ -297,7 +300,7 @@ <entry>Units for local packages</entry> </row> <row> - <entry><filename>@systemunitdir@</filename></entry> + <entry><filename>&systemunitdir;</filename></entry> <entry>Systemd package configuration</entry> </row> <row> @@ -335,7 +338,7 @@ <entry>Generated units</entry> </row> <row> - <entry><filename>@USER_CONFIG_UNIT_PATH@</filename></entry> + <entry><filename>&USER_CONFIG_UNIT_PATH;</filename></entry> <entry morerows='1'>Local configuration</entry> </row> <row> @@ -357,7 +360,7 @@ <entry><filename>/usr/local/share/systemd/user</filename></entry> </row> <row> - <entry><filename>@userunitdir@</filename></entry> + <entry><filename>&userunitdir;</filename></entry> <entry>Systemd package configuration</entry> </row> <row> |