diff options
-rw-r--r-- | docs/Makefile | 37 |
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 |