summaryrefslogtreecommitdiff
path: root/docs/Makefile
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2012-08-14 11:03:22 +0300
committerGuido Günther <agx@sigxcpu.org>2012-08-22 10:18:22 +0200
commit678f85f9b9bdc88348e98684d4344bdfa1b0d61b (patch)
tree61cd7dc26ec74b097156d4ed7a187bff73740dd3 /docs/Makefile
parent0af1e729df48d691018ceaec01ef9672d0554471 (diff)
docs: fix cross-referencing in manpages
Docbook2man has to be run twice to make sure the cross-references are correct. First pass is just to update the cross-reference file (manpage.refs). The second the builds the actual manpages. Otherwise forward-references might be broken. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'docs/Makefile')
-rw-r--r--docs/Makefile37
1 files changed, 24 insertions, 13 deletions
diff --git a/docs/Makefile b/docs/Makefile
index a4b4404..3679018 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -1,18 +1,18 @@
#!/usr/bin/make
-MANS = git-buildpackage \
- git-import-dsc \
- git-import-dscs \
- git-import-orig \
- git-dch \
- gbp-pull \
- gbp-clone \
- gbp-pq \
- gbp-create-remote-repo \
- gbp.conf
+MAN1S = git-buildpackage \
+ git-import-dsc \
+ git-import-dscs \
+ git-import-orig \
+ git-dch \
+ gbp-pull \
+ gbp-clone \
+ gbp-pq \
+ gbp-create-remote-repo
+MAN5S = gbp.conf
MANUAL=manual-html
-SGML_MANPAGES=$(patsubst %,%.1,$(MANS))
+SGML_MANPAGES=$(patsubst %,%.1,$(MAN1S)) $(patsubst %,%.5,$(MAN5S))
POD_MANPAGES=git-pbuilder.1
MANPAGES=$(SGML_MANPAGES) $(POD_MANPAGES)
VERSION_ENT=version.ent
@@ -26,8 +26,18 @@ $(MANUAL): manual.sgml chapters/*.sgml manpages/*.sgml
docbook-2-html -s local $<
cp /usr/share/gtk-doc/data/*.png $(MANUAL)
-%.1: man.%.sgml manpages/%.sgml
- docbook2man -o . $<
+# We build manpages under 'buildxref/' just to get an updated cross-reference
+# file (manpage.refs), before building the final manpages
+BUILD_MAN_XREF_PAGES=$(patsubst %,buildxref/%,$(SGML_MANPAGES))
+
+buildxref/%.1 buildxref/%.5: man.%.sgml manpages/%.sgml
+ docbook2man -o buildxref $<
+
+manpage.refs: $(BUILD_MAN_XREF_PAGES)
+ cp buildxref/$@ $@
+
+%.1 %.5: manpage.refs
+ docbook2man -o . man.$*.sgml
git-pbuilder.1: ../bin/git-pbuilder
pod2man $< $@
@@ -40,4 +50,5 @@ $(VERSION_ENT): $(GBP_VERSION)
clean:
-rm -r manual-html/
-rm *.1 *.5 manpage.* $(VERSION_ENT)
+ -rm -r buildxref