]> git.saurik.com Git - apt.git/blame - doc/makefile
implement BuildProfileSpec support as dpkg has in 1.17.2
[apt.git] / doc / makefile
CommitLineData
ac966541
AL
1# -*- make -*-
2BASE=..
3164dff9 3SUBDIR=doc
ac966541
AL
4
5# Bring in the default rules
6include ../buildlib/defaults.mak
7
b2e465d6 8# Debian Doc SGML Documents
7652e03e 9SOURCE = $(wildcard *.sgml)
46e39c8e 10DEBIANDOC_HTML_OPTIONS=-l en.UTF-8
ac966541
AL
11include $(DEBIANDOC_H)
12
1098ae37 13doc: manpages debiandoc
e4bc41c7 14
eef71f11
DK
15examples/sources.list: ../vendor/current/sources.list
16 ln -sf $(shell readlink -f $^) $@
17
694ef56e
DK
18apt-vendor.ent: ../vendor/current/apt-vendor.ent
19 ln -sf $(shell readlink -f $^) $@
04e9cc08 20
c3c459fc 21# Examples
fcdd9cdd 22SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf
c3c459fc 23TO = $(DOC)
8319e9c3 24TARGET = binary
c3c459fc 25include $(COPY_H)
9975c278 26
ac62eb38 27.PHONY: clean clean/subdirs veryclean veryclean/subdirs manpages/subdirs debiandoc/subdirs all binary doc stats
9975c278 28
eef71f11
DK
29clean: clean/subdirs clean/examples
30veryclean: veryclean/subdirs clean/examples
5cc8cbf3 31manpages: apt-vendor.ent manpages/subdirs
ac62eb38 32debiandoc: debiandoc/subdirs
f1813c1a 33
ac62eb38
DK
34DOCUMENTATIONPO = $(patsubst %.po,%,$(notdir $(wildcard po/*.po)))
35DOCDIRLIST = $(addsuffix /makefile,$(DOCUMENTATIONPO))
b01390ea 36
ac62eb38
DK
37dirs: $(DOCDIRLIST)
38$(DOCDIRLIST) :: %/makefile : lang.makefile
39 test -d $(dir $@) || mkdir $(dir $@)
40 sed "s#@@LANG@@#$(subst /,,$(dir $@))#" $< > $@
41
57da1b4b 42debiandoc/subdirs manpages/subdirs clean/subdirs veryclean/subdirs:
ac62eb38
DK
43 for dir in en $(dir $(DOCDIRLIST)); do \
44 $(MAKE) -C $$dir $(patsubst %/subdirs,%,$@); \
2a52e8c5 45 done
8667550d 46
eef71f11
DK
47clean/examples:
48 rm -f examples/sources.list
694ef56e 49 rm -f apt-vendor.ent
eef71f11 50
1098ae37
DK
51stats:
52 for i in po/*.po; do echo -n "$$i: "; msgfmt --output-file=/dev/null --statistics $$i; done
a11afb9d 53
b01390ea 54ifdef PO4A
1098ae37
DK
55MANPAGEPOLIST = $(addprefix manpages-translation-,$(DOCUMENTATIONPO))
56DEBIANDOCPOLIST = $(addprefix debiandoc-translation-,$(DOCUMENTATIONPO))
57
ac62eb38 58.PHONY: update-po po4a $(MANPAGEPOLIST) $(DEBIANDOCPOLIST) $(DOCDIRLIST)
1098ae37 59
ac62eb38 60po4a: manpages/subdirs debiandoc/subdirs
b01390ea 61
b01390ea 62update-po:
1c46aec4 63 po4a --previous --no-backups --force --no-translations \
aec22160 64 --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
1c46aec4 65 --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
b01390ea 66
ac62eb38 67manpages/subdirs: $(MANPAGEPOLIST)
1098ae37 68$(MANPAGEPOLIST) :: manpages-translation-% : %/makefile po4a.conf
34c2a164 69 # first line is for apt.8 (see Bug#696923)
1098ae37 70 po4a --previous --no-backups --translate-only $(dir $<)apt.ent \
34c2a164 71 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.8,%.$(subst /,,$(dir $<)).8,$(wildcard *.8))) \
1098ae37
DK
72 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.1.xml,%.$(subst /,,$(dir $<)).1.xml,$(wildcard *.1.xml))) \
73 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.2.xml,%.$(subst /,,$(dir $<)).2.xml,$(wildcard *.2.xml))) \
74 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.3.xml,%.$(subst /,,$(dir $<)).3.xml,$(wildcard *.3.xml))) \
75 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.4.xml,%.$(subst /,,$(dir $<)).4.xml,$(wildcard *.4.xml))) \
76 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.5.xml,%.$(subst /,,$(dir $<)).5.xml,$(wildcard *.5.xml))) \
77 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.6.xml,%.$(subst /,,$(dir $<)).6.xml,$(wildcard *.6.xml))) \
78 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.7.xml,%.$(subst /,,$(dir $<)).7.xml,$(wildcard *.7.xml))) \
79 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.8.xml,%.$(subst /,,$(dir $<)).8.xml,$(wildcard *.8.xml))) \
aec22160 80 --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
1c46aec4 81 --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
b45fb8db 82
ac62eb38 83debiandoc/subdirs: $(DEBIANDOCPOLIST)
1098ae37
DK
84$(DEBIANDOCPOLIST) :: debiandoc-translation-% : %/makefile po4a.conf
85 po4a --previous --no-backups --translate-only $(dir $<)apt.ent \
86 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.sgml,%.$(subst /,,$(dir $<)).sgml,$(wildcard *.sgml))) \
87 --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
88 --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
1098ae37 89endif
b45fb8db 90
3174e150
MV
91ifdef DOXYGEN
92DOXYGEN_SOURCES = $(shell find $(BASE)/apt-pkg -not -name .\\\#* -and \( -name \*.cc -or -name \*.h \) )
93
94clean: doxygen-clean
95
96doxygen-clean:
97 rm -fr $(BUILD)/doc/doxygen
98 rm -f $(BUILD)/doc/doxygen-stamp
99
3174e150
MV
100$(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile
101 rm -fr $(BUILD)/doc/doxygen
00c6e1a3 102 mkdir $(BUILD)/doc/doxygen # some versions seem to not create this directory #628799
3174e150
MV
103 $(DOXYGEN) $(BUILD)/doc/Doxyfile
104 touch $(BUILD)/doc/doxygen-stamp
105
1098ae37 106debiandoc: $(BUILD)/doc/doxygen-stamp
3174e150 107endif