aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Masters <jcm@jonmasters.org>2011-06-02 13:29:27 -0400
committerJon Masters <jcm@jonmasters.org>2011-06-02 13:29:27 -0400
commit99f11b10baba7e457c202fff9b142f7af99e6ea0 (patch)
treea366838e76580758e3764ae79ac0017c066904d5
parentad222fe74ea74321748b80743263d497b3d6b6a3 (diff)
downloadmodule-init-tools-99f11b10baba7e457c202fff9b142f7af99e6ea0.tar.gz
doc: properly fix documentation generation
The docbook2man package does not allow output to be written to standard out, nor does the SGML allow for more than one file to be created. A previous hack was to use symlinks and hope for the best. Rather than doing this, retain the symlinks, but explicitly match on them during build and create symlinks to the output files. Furthermore, clean up the documentation source files to remove invalid multiple outputs. Signed-off-by: Jon Masters <jcm@jonmasters.org>
-rw-r--r--Makefile.am11
-rw-r--r--doc/depmod.conf.sgml2
-rw-r--r--doc/modules.dep.sgml2
3 files changed, 7 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index d4ef32e..3e699e5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,7 +36,8 @@ depmod_LDADD = $(LDADD) libmodtools.a
modinfo_LDADD = $(LDADD) libmodtools.a
modindex_LDADD = $(LDADD) libmodtools.a
-MAN5 = modprobe.conf.5 modules.dep.5 depmod.conf.5 modprobe.d.5
+MAN5 = depmod.conf.5 depmod.d.5 modprobe.conf.5 modprobe.d.5 \
+ modules.dep.5 modules.dep.bin.5
MAN8 = depmod.8 insmod.8 lsmod.8 rmmod.8 modprobe.8 modinfo.8
SGML = $(addprefix doc/, $(MAN5:%.5=%.sgml) $(MAN8:%.8=%.sgml))
dist_man_MANS = $(MAN5) $(MAN8)
@@ -68,14 +69,16 @@ MAINTAINERCLEANFILES := $(man_MANS)
# docbook2man writes file itself, doesn't do stdout.
%.8: doc/%.sgml
if [ "$(DOCBOOKTOMAN)" = "docbook2man" ]; then \
- $(DOCBOOKTOMAN) $< > /dev/null 2>&1; \
+ $(DOCBOOKTOMAN) $< > /dev/null 2>&1; \
else \
$(DOCBOOKTOMAN) $< 2>&1 > $@ | sed 's/^[^:]*://'; \
fi
%.5: doc/%.sgml
- if [ "$(DOCBOOKTOMAN)" = "docbook2man" ]; then \
- $(DOCBOOKTOMAN) $< > /dev/null 2>&1; \
+ if [ -h $< ]; then \
+ ln -s $$(basename $$(readlink $<) .sgml).5 $@; \
+ elif [ "$(DOCBOOKTOMAN)" = "docbook2man" ]; then \
+ $(DOCBOOKTOMAN) $< > /dev/null 2>&1; \
else \
$(DOCBOOKTOMAN) $< 2>&1 > $@ | sed 's/^[^:]*://'; \
fi
diff --git a/doc/depmod.conf.sgml b/doc/depmod.conf.sgml
index 4bc399b..d055db1 100644
--- a/doc/depmod.conf.sgml
+++ b/doc/depmod.conf.sgml
@@ -21,8 +21,6 @@
<date>2010-03-01</date>
</refentryinfo>
<refmeta>
- <refentrytitle>depmod.d</refentrytitle>
- <manvolnum>5</manvolnum>
<refentrytitle>depmod.conf</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
diff --git a/doc/modules.dep.sgml b/doc/modules.dep.sgml
index 6aa4607..a0b68ed 100644
--- a/doc/modules.dep.sgml
+++ b/doc/modules.dep.sgml
@@ -21,8 +21,6 @@
<date>2010-03-01</date>
</refentryinfo>
<refmeta>
- <refentrytitle>modules.dep.bin</refentrytitle>
- <manvolnum>5</manvolnum>
<refentrytitle>modules.dep</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>