aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/Makefile
blob: a4b4404620614e2ddcfae48fc82c398dac30d3ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/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

MANUAL=manual-html
SGML_MANPAGES=$(patsubst %,%.1,$(MANS))
POD_MANPAGES=git-pbuilder.1
MANPAGES=$(SGML_MANPAGES) $(POD_MANPAGES)
VERSION_ENT=version.ent
GBP_VERSION=../gbp/version.py
DEB_VERSION=$(shell sed -ne 's/^gbp_version="\([.a-z0-9~]\+\)"/\1/p' $(GBP_VERSION))
CHANGELOG=../debian/changelog

all: $(MANUAL) $(MANPAGES)

$(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 . $<

git-pbuilder.1: ../bin/git-pbuilder
	pod2man $< $@

manual.sgml: $(VERSION_ENT)

$(VERSION_ENT): $(GBP_VERSION)
	echo '<!ENTITY gbp-version "$(DEB_VERSION)">' > $(VERSION_ENT)

clean:
	-rm -r manual-html/
	-rm *.1 *.5 manpage.* $(VERSION_ENT)