~ubuntu-branches/ubuntu/quantal/apt/quantal

« back to all changes in this revision

Viewing changes to doc/makefile

  • Committer: Package Import Robot
  • Author(s): Steve Langasek, Michael Vogt, Steve Langasek
  • Date: 2012-06-11 22:36:16 UTC
  • mfrom: (1.4.47 sid)
  • Revision ID: package-import@ubuntu.com-20120611223616-1cctfc7qrxrx4vcu
Tags: 0.9.6ubuntu1
[ Michael Vogt ]
* merged from Debian, remaining changes:
  - use ubuntu keyring and ubuntu archive keyring in apt-key
  - run update-apt-xapian-index in apt.cron
  - support apt-key net-update and verify keys against master-keyring
  - run apt-key net-update in cron.daily
  - different example sources.list
  - APT::pkgPackageManager::MaxLoopCount set to 5000
  - apport pkgfailure handling
  - ubuntu changelog download handling
  - patch for apt cross-building, see http://bugs.debian.org/666772

[ Steve Langasek ]
* Drop upgrade handling for obsolete conffile /etc/apt/apt.conf.d/01ubuntu,
  removed in previous LTS.
* prepare-release: declare the packages needed as source build deps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
DEBIANDOC_HTML_OPTIONS=-l en.UTF-8
12
12
include $(DEBIANDOC_H)
13
13
 
 
14
MANPAGEPO = $(patsubst %.po,%,$(notdir $(wildcard po/*.po)))
 
15
MANPAGEPOLIST = $(patsubst %,manpages-translation-%,$(MANPAGEPO))
 
16
 
 
17
doc: manpages
 
18
 
14
19
# Do not use XMLTO, build the manpages directly with XSLTPROC
15
20
ifdef XSLTPROC
16
21
# generate a list of accepted man page translations
17
22
SOURCE = $(patsubst %.xml,%,$(wildcard *.?.xml))
18
 
INCLUDES = apt.ent
 
23
INCLUDES = apt.ent apt-verbatim.ent
19
24
STYLESHEET=manpage-style.xsl
20
25
 
21
26
LOCAL := manpage-$(firstword $(SOURCE))
22
27
$(LOCAL)-LIST := $(SOURCE)
23
28
 
24
29
# Install generation hooks
25
 
doc: $($(LOCAL)-LIST)
26
 
veryclean: veryclean/$(LOCAL)
 
30
manpages: $(MANPAGEPOLIST) $($(LOCAL)-LIST)
27
31
 
28
 
$($(LOCAL)-LIST) :: % : %.xml $(INCLUDES)
 
32
$($(LOCAL)-LIST) :: % : %.xml $(STYLESHEET) $(INCLUDES)
29
33
        echo Creating man page $@
30
34
        $(XSLTPROC) -o $@ $(STYLESHEET) $<
31
35
 
 
36
$(MANPAGEPOLIST) :: manpages-translation-% : %/makefile po4a
 
37
        $(MAKE) -C $(dir $<) doc
 
38
 
 
39
.PHONY: manpages dirs-manpage-subdirs $(MANPAGEPOLIST)
 
40
dirs: dirs-manpage-subdirs
 
41
dirs-manpage-subdirs:
 
42
        for i in $(MANPAGEPO); do \
 
43
                test -d $$i || mkdir $$i; \
 
44
                test -f $$i/makefile || sed "s#@@LANG@@#$$i#" lang.makefile > $$i/makefile; \
 
45
        done
 
46
 
32
47
# Clean rule
33
48
.PHONY: veryclean/$(LOCAL)
 
49
veryclean: veryclean/$(LOCAL)
34
50
veryclean/$(LOCAL):
35
51
        -rm -rf $($(@F)-LIST)
36
52
 
40
56
SOURCE = apt.8
41
57
include $(MANPAGE_H)
42
58
 
 
59
examples/sources.list: examples/sources.list.in apt-verbatim.ent
 
60
        sed -e 's#&ubuntu-codename;#$(shell grep --max-count=1 '^<!ENTITY ubuntu-codename "' apt-verbatim.ent | cut -d'"' -f 2)#g' examples/sources.list.in > examples/sources.list
 
61
 
43
62
# Examples
44
63
SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf
45
64
TO = $(DOC)
47
66
include $(COPY_H)
48
67
 
49
68
.PHONY: clean clean-subdirs veryclean veryclean-subdirs all binary doc
50
 
doc:
51
 
        for i in $(shell ls po/*.po | sed -r 's#po/([a-z]+[A-Z_]*).po#\1#'); do \
52
 
                test -d $$i || mkdir $$i; \
53
 
                test -f $$i/makefile || sed "s#@@LANG@@#$$i#" lang.makefile > $$i/makefile; \
54
 
                $(MAKE) -C $$i $@; \
55
 
        done
56
69
 
57
70
clean: clean-subdirs
58
71
veryclean: veryclean-subdirs
67
80
                rm -rf $$dir; \
68
81
        done
69
82
 
 
83
.PHONY: update-po po4a stats
 
84
 
70
85
ifdef PO4A
71
86
doc: po4a
72
87
 
73
 
clean: po4a-clean
74
 
 
75
 
.PHONY: update-po po4a stats
76
88
update-po:
77
 
        po4a --previous --no-backups --force --no-translations po4a.conf
78
 
 
79
 
po4a-clean:
80
 
        po4a --previous --rm-backups --rm-translations po4a.conf
 
89
        po4a --previous --no-backups --force --no-translations \
 
90
                --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
 
91
                --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
81
92
 
82
93
po4a:
83
 
        po4a --previous --no-backups po4a.conf
 
94
        po4a --previous --no-backups \
 
95
                --package-name='$(PACKAGE)-doc' --package-version='$(PACKAGE_VERSION)' \
 
96
                --msgid-bugs-address='$(PACKAGE_MAIL)' po4a.conf
 
97
endif
84
98
 
85
99
stats:
86
 
        for i in po/*.po; do echo -n "$$i: "; msgfmt --statistics $$i; done
87
 
 
88
 
endif
 
100
        for i in po/*.po; do echo -n "$$i: "; msgfmt --output-file=/dev/null --statistics $$i; done
89
101
 
90
102
ifdef DOXYGEN
91
103
DOXYGEN_SOURCES = $(shell find $(BASE)/apt-pkg -not -name .\\\#* -and \( -name \*.cc -or -name \*.h \) )
96
108
        rm -fr $(BUILD)/doc/doxygen
97
109
        rm -f $(BUILD)/doc/doxygen-stamp
98
110
 
99
 
$(BUILD)/doc/Doxyfile: Doxyfile.in
100
 
        (cd $(BUILD) && ./config.status doc/Doxyfile)
101
 
 
102
111
$(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile
103
112
        rm -fr $(BUILD)/doc/doxygen
104
113
        mkdir $(BUILD)/doc/doxygen  # some versions seem to not create this directory #628799