Commit Graph

23 Commits

Author SHA1 Message Date
Karel Zak 3c3e5f4276 build-sys: move python helpers to tools directory
Note that make-man-rules.py is missing in EXTRA_DIST=, this patch
fixes this mistake too.
2014-02-10 13:02:34 +01:00
Tom Gundersen 46b0925d4f man: networkd - add documentation 2013-11-10 21:30:18 +01:00
Tom Gundersen 1f06807cc3 man: udev - add documentation for .link files 2013-11-10 21:27:25 +01:00
Zbigniew Jędrzejewski-Szmek 785a51eb68 man: add CONSTANTS section to systemd.directives(7) 2013-06-26 19:52:00 -04:00
Zbigniew Jędrzejewski-Szmek 827f70eb76 man: fix display of keys which appear in two sections in directive index
When an index key appeared in multiple sections (e.g.
CPUAffinity= was present in both "SYSTEM MANAGER DIRECTIVES"
and "UNIT DIRECTIVES"), when lxml was used, the key would
be not be displayed in all but one of those sections, and
only an empty <term/> element would be present. This
happens because lxml allows only one parent for each node,
and when the same formatted element was used in multiple places,
it was actually moved between them. Fix this by making a copy
of the element. The bug was present since lxml support was
introduced.

Also fix some indentation issues.
2013-05-30 00:43:38 -04:00
Zbigniew Jędrzejewski-Szmek 845c53246f man: add various filenames to the index
Everything which is an absolute filename marked with <filename></filename>
lands in the index, unless noindex= attribute is present. Should make
it easier for people to find stuff when they are looking at a file on
disk.

Various formatting errors in manpages are fixed, kernel-install(1) is
restored to formatting sanity.
2013-05-03 01:00:42 -04:00
Zbigniew Jędrzejewski-Szmek 1a13e31d27 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.
2013-03-29 20:30:21 -04:00
Zbigniew Jędrzejewski-Szmek 80cb917e62 man: use lxml for faster generation and pretty printing 2013-03-09 08:47:50 -05:00
Zbigniew Jędrzejewski-Szmek 699ad6c06c man: drop rhs parts in snippets in directive index
-       --exit-if-exists=file
+       --exit-if-exists=
etc.
2013-02-27 21:55:00 -05:00
Zbigniew Jędrzejewski-Szmek a4e0b94d31 man: add filenames to the index
Limiting the addition to filenames from <refsynopsis>
seems to give a good enough S/N ratio.
2013-02-13 23:09:00 -05:00
Zbigniew Jędrzejewski-Szmek 56ba3c78ae build-sys: create Makefile-man.am automatically
man rules were repeating the same information in too many places,
which was error prone. Those rules can be easily generated from .xml
files. For efficiency and because python is not a required dependency,
Makefile-man.am is only regenerated when requested with

  make update-man-list

If no metadata in man/*.xml changed, this file should not change. So
only when a new man page or a new alias is added, this file should
show up in 'git diff'. The change should then be committed.

If the support for building from git without python was dropped, we
could drop Makefile-man.am from version control. This would also
increase the partial build time (since more stuff would be rebuild
whenever sources in man/*.xml would be modified), so it would probably
wouldn't be worth it.
2013-02-06 23:16:16 -05:00
Zbigniew Jędrzejewski-Szmek d970bd6d39 make-directive-index: use original XML as index entries
udev(7) fields are now display in whole, which looks
much better.
2013-01-26 11:36:53 -05:00
Zbigniew Jędrzejewski-Szmek ccc9a4f9ff man: extend systemd.directives(7) to all manual pages
New sections are added: PAM options, crypttab options, commandline
options, miscellaneous. The last category will be used for all
untagged <varname> elements.

Commandline options sections is meant to be a developer tool: when
adding an option it is sometimes useful to be able to check if
similarly named options exist elsewhere.
2013-01-26 11:36:53 -05:00
Zbigniew Jędrzejewski-Szmek 9cc2c8b763 man: add links to directive index to see-alsos
systemd.directives(5) is renamed to systemd.directives(7).
Section 7 is "Miscellaneous".
2013-01-15 11:30:42 -05:00
Zbigniew Jędrzejewski-Szmek 08177c85ef make-directive-index: link to systemd options 2013-01-15 11:30:42 -05:00
Zbigniew Jędrzejewski-Szmek 0acfdd61ed make-directive-index: count how many directives and pages are shown 2013-01-15 11:30:42 -05:00
Zbigniew Jędrzejewski-Szmek eeb019b5b5 make-directive-index: remove duplicated list of sections 2013-01-15 11:30:41 -05:00
Zbigniew Jędrzejewski-Szmek 4a431c9ab1 man: add bootchart.conf to directives index 2013-01-15 11:30:41 -05:00
Zbigniew Jędrzejewski-Szmek e7098b699a lawyerese: add header to make-directive-index 2012-11-14 22:49:29 +01:00
Zbigniew Jędrzejewski-Szmek f6c2e28b07 directive-index: journal directives 2012-09-17 12:42:22 +02:00
Zbigniew Jędrzejewski-Szmek ffafe91b5a directive-index: system manager directives 2012-09-17 12:42:22 +02:00
Zbigniew Jędrzejewski-Szmek e1abd3efab directive-index: add UDEV fields 2012-09-17 12:42:22 +02:00
Zbigniew Jędrzejewski-Szmek d9cfd69403 man: generate an index of directives
Systemd has a large (and growing) number of manpages. Sometimes it's
not immediately obvious, where to look for a directive. Especially,
when something is described in more than one place. Making sense of
all the settings should be easier with an index.
2012-09-17 12:42:22 +02:00