]> git.saurik.com Git - apt.git/blame_incremental - doc/makefile
Release 1.2
[apt.git] / doc / makefile
... / ...
CommitLineData
1# -*- make -*-
2BASE=..
3SUBDIR=doc
4
5# Bring in the default rules
6include ../buildlib/defaults.mak
7
8# DocBook XML Documents
9SOURCE = $(wildcard *.dbk)
10LC = en
11include $(DOCBOOK_H)
12
13doc: manpages docbook
14
15examples/sources.list: ../vendor/current/sources.list
16 ln -sf '$(abspath $^)' $@
17
18apt-vendor.ent: ../vendor/current/apt-vendor.ent
19 ln -sf '$(abspath $^)' $@
20
21# Examples
22SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf
23TO = $(DOC)
24TARGET = binary
25include $(COPY_H)
26
27.PHONY: clean clean/subdirs veryclean veryclean/subdirs manpages/subdirs docbook/subdirs all binary doc stats
28
29clean: clean/subdirs clean/examples
30veryclean: veryclean/subdirs clean/examples
31manpages: apt-vendor.ent manpages/subdirs
32docbook: apt-vendor.ent docbook/subdirs
33
34DOCUMENTATIONPO = $(patsubst %.po,%,$(notdir $(wildcard po/*.po)))
35DOCDIRLIST = $(addsuffix /makefile,$(DOCUMENTATIONPO))
36
37dirs: $(DOCDIRLIST)
38$(DOCDIRLIST) :: %/makefile : lang.makefile
39 test -d $(dir $@) || mkdir $(dir $@)
40 sed "s#@@LANG@@#$(subst /,,$(dir $@))#" $< > $@
41
42docbook/subdirs manpages/subdirs clean/subdirs veryclean/subdirs:
43 for dir in en $(dir $(DOCDIRLIST)); do \
44 $(MAKE) -C $$dir $(patsubst %/subdirs,%,$@); \
45 done
46
47clean/examples:
48 rm -f examples/sources.list
49 rm -f apt-vendor.ent
50
51stats:
52 for i in po/*.po; do echo -n "$$i: "; msgfmt --output-file=/dev/null --statistics $$i; done
53
54ifdef PO4A
55MANPAGEPOLIST = $(addprefix manpages-translation-,$(DOCUMENTATIONPO))
56DOCBOOKPOLIST = $(addprefix docbook-translation-,$(DOCUMENTATIONPO))
57
58.PHONY: update-po po4a $(MANPAGEPOLIST) $(DOCBOOKPOLIST) $(DOCDIRLIST)
59
60po4a: manpages/subdirs docbook/subdirs
61
62update-po:
63 po4a --previous --no-backups --force --no-translations \
64 --msgmerge-opt --add-location=file \
65 --porefs noline,wrap \
66 --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
67 --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
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
72
73manpages/subdirs: $(MANPAGEPOLIST)
74$(MANPAGEPOLIST) :: manpages-translation-% : %/makefile po4a.conf
75 po4a --previous --no-backups --translate-only $(dir $<)apt.ent \
76 --msgmerge-opt --add-location=file \
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))) \
85 --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
86 --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
87
88docbook/subdirs: $(DOCBOOKPOLIST)
89$(DOCBOOKPOLIST) :: docbook-translation-% : %/makefile po4a.conf
90 po4a --previous --no-backups --translate-only $(dir $<)apt.ent \
91 --msgmerge-opt --add-location=file \
92 $(patsubst %,--translate-only $(dir $<)%,$(patsubst %.dbk,%.$(subst /,,$(dir $<)).dbk,$(wildcard *.dbk))) \
93 --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
94 --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
95endif
96
97ifdef DOXYGEN
98DOXYGEN_SOURCES = $(shell find $(BASE)/apt-pkg -not -name .\\\#* -and \( -name \*.cc -or -name \*.h \) )
99
100clean: doxygen-clean
101
102doxygen-clean:
103 rm -fr $(BUILD)/doc/doxygen
104 rm -f $(BUILD)/doc/doxygen-stamp
105
106$(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile
107 rm -fr $(BUILD)/doc/doxygen
108 mkdir $(BUILD)/doc/doxygen # some versions seem to not create this directory #628799
109 $(DOXYGEN) $(BUILD)/doc/Doxyfile
110 touch $(BUILD)/doc/doxygen-stamp
111
112docbook: $(BUILD)/doc/doxygen-stamp
113endif