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