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