]>
Commit | Line | Data |
---|---|---|
ac966541 AL |
1 | # -*- make -*- |
2 | BASE=.. | |
3164dff9 | 3 | SUBDIR=doc |
ac966541 AL |
4 | |
5 | # Bring in the default rules | |
6 | include ../buildlib/defaults.mak | |
7 | ||
a034d852 GJ |
8 | # DocBook XML Documents |
9 | SOURCE = $(wildcard *.dbk) | |
10 | LC = en | |
11 | include $(DOCBOOK_H) | |
ac966541 | 12 | |
a034d852 | 13 | doc: manpages docbook |
e4bc41c7 | 14 | |
eef71f11 | 15 | examples/sources.list: ../vendor/current/sources.list |
85a67355 | 16 | ln -sf '$(abspath $^)' $@ |
eef71f11 | 17 | |
694ef56e | 18 | apt-vendor.ent: ../vendor/current/apt-vendor.ent |
85a67355 | 19 | ln -sf '$(abspath $^)' $@ |
04e9cc08 | 20 | |
c3c459fc | 21 | # Examples |
fcdd9cdd | 22 | SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf |
c3c459fc | 23 | TO = $(DOC) |
8319e9c3 | 24 | TARGET = binary |
c3c459fc | 25 | include $(COPY_H) |
9975c278 | 26 | |
a034d852 | 27 | .PHONY: clean clean/subdirs veryclean veryclean/subdirs manpages/subdirs docbook/subdirs all binary doc stats |
9975c278 | 28 | |
eef71f11 DK |
29 | clean: clean/subdirs clean/examples |
30 | veryclean: veryclean/subdirs clean/examples | |
5cc8cbf3 | 31 | manpages: apt-vendor.ent manpages/subdirs |
5abbf5bb | 32 | docbook: apt-vendor.ent docbook/subdirs |
f1813c1a | 33 | |
ac62eb38 DK |
34 | DOCUMENTATIONPO = $(patsubst %.po,%,$(notdir $(wildcard po/*.po))) |
35 | DOCDIRLIST = $(addsuffix /makefile,$(DOCUMENTATIONPO)) | |
b01390ea | 36 | |
ac62eb38 DK |
37 | dirs: $(DOCDIRLIST) |
38 | $(DOCDIRLIST) :: %/makefile : lang.makefile | |
39 | test -d $(dir $@) || mkdir $(dir $@) | |
40 | sed "s#@@LANG@@#$(subst /,,$(dir $@))#" $< > $@ | |
41 | ||
a034d852 | 42 | docbook/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 |
47 | clean/examples: |
48 | rm -f examples/sources.list | |
694ef56e | 49 | rm -f apt-vendor.ent |
eef71f11 | 50 | |
1098ae37 DK |
51 | stats: |
52 | for i in po/*.po; do echo -n "$$i: "; msgfmt --output-file=/dev/null --statistics $$i; done | |
a11afb9d | 53 | |
b01390ea | 54 | ifdef PO4A |
1098ae37 | 55 | MANPAGEPOLIST = $(addprefix manpages-translation-,$(DOCUMENTATIONPO)) |
a034d852 | 56 | DOCBOOKPOLIST = $(addprefix docbook-translation-,$(DOCUMENTATIONPO)) |
1098ae37 | 57 | |
a034d852 | 58 | .PHONY: update-po po4a $(MANPAGEPOLIST) $(DOCBOOKPOLIST) $(DOCDIRLIST) |
1098ae37 | 59 | |
a034d852 | 60 | po4a: manpages/subdirs docbook/subdirs |
b01390ea | 61 | |
b01390ea | 62 | update-po: |
1c46aec4 | 63 | po4a --previous --no-backups --force --no-translations \ |
9a290230 MV |
64 | --msgmerge-opt --add-location=file \ |
65 | --porefs noline,wrap \ | |
aec22160 | 66 | --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \ |
1c46aec4 | 67 | --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf |
051029f8 DK |
68 | sed -n '/^#$$/,$$p' po/apt-doc.pot > po/apt-doc.pot.headerfree |
69 | #cat po/apt-doc.pot > po/apt-doc.pot.headerfree | |
70 | cat po/header.pot.txt po/apt-doc.pot.headerfree > po/apt-doc.pot | |
71 | rm -f po/apt-doc.pot.headerfree | |
b01390ea | 72 | |
ac62eb38 | 73 | manpages/subdirs: $(MANPAGEPOLIST) |
1098ae37 DK |
74 | $(MANPAGEPOLIST) :: manpages-translation-% : %/makefile po4a.conf |
75 | po4a --previous --no-backups --translate-only $(dir $<)apt.ent \ | |
9a290230 | 76 | --msgmerge-opt --add-location=file \ |
1098ae37 DK |
77 | $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.1.xml,%.$(subst /,,$(dir $<)).1.xml,$(wildcard *.1.xml))) \ |
78 | $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.2.xml,%.$(subst /,,$(dir $<)).2.xml,$(wildcard *.2.xml))) \ | |
79 | $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.3.xml,%.$(subst /,,$(dir $<)).3.xml,$(wildcard *.3.xml))) \ | |
80 | $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.4.xml,%.$(subst /,,$(dir $<)).4.xml,$(wildcard *.4.xml))) \ | |
81 | $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.5.xml,%.$(subst /,,$(dir $<)).5.xml,$(wildcard *.5.xml))) \ | |
82 | $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.6.xml,%.$(subst /,,$(dir $<)).6.xml,$(wildcard *.6.xml))) \ | |
83 | $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.7.xml,%.$(subst /,,$(dir $<)).7.xml,$(wildcard *.7.xml))) \ | |
84 | $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.8.xml,%.$(subst /,,$(dir $<)).8.xml,$(wildcard *.8.xml))) \ | |
aec22160 | 85 | --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \ |
1c46aec4 | 86 | --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf |
b45fb8db | 87 | |
a034d852 GJ |
88 | docbook/subdirs: $(DOCBOOKPOLIST) |
89 | $(DOCBOOKPOLIST) :: docbook-translation-% : %/makefile po4a.conf | |
1098ae37 | 90 | po4a --previous --no-backups --translate-only $(dir $<)apt.ent \ |
9a290230 | 91 | --msgmerge-opt --add-location=file \ |
a034d852 | 92 | $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.dbk,%.$(subst /,,$(dir $<)).dbk,$(wildcard *.dbk))) \ |
1098ae37 DK |
93 | --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \ |
94 | --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf | |
1098ae37 | 95 | endif |
b45fb8db | 96 | |
3174e150 MV |
97 | ifdef DOXYGEN |
98 | DOXYGEN_SOURCES = $(shell find $(BASE)/apt-pkg -not -name .\\\#* -and \( -name \*.cc -or -name \*.h \) ) | |
99 | ||
100 | clean: doxygen-clean | |
101 | ||
102 | doxygen-clean: | |
103 | rm -fr $(BUILD)/doc/doxygen | |
104 | rm -f $(BUILD)/doc/doxygen-stamp | |
105 | ||
3174e150 MV |
106 | $(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile |
107 | rm -fr $(BUILD)/doc/doxygen | |
00c6e1a3 | 108 | mkdir $(BUILD)/doc/doxygen # some versions seem to not create this directory #628799 |
3174e150 MV |
109 | $(DOXYGEN) $(BUILD)/doc/Doxyfile |
110 | touch $(BUILD)/doc/doxygen-stamp | |
111 | ||
a034d852 | 112 | docbook: $(BUILD)/doc/doxygen-stamp |
3174e150 | 113 | endif |