Dpkg::Vendor::Debian: Only enable LFS when time64 is enabled for glibc
[dpkg.git] / man / Makefile.am
blob126a4b26cadc32aab07bcbdf1fe4c4fef1b164be
1 ## Process this file with automake to produce Makefile.in
3 man_MANS = \
4         deb-buildinfo.5 \
5         deb-changelog.5 \
6         deb-changes.5 \
7         deb-conffiles.5 \
8         deb-control.5 \
9         deb-extra-override.5 \
10         deb-md5sums.5 \
11         deb-old.5 \
12         deb-origin.5 \
13         deb-override.5 \
14         deb-postinst.5 \
15         deb-postrm.5 \
16         deb-preinst.5 \
17         deb-prerm.5 \
18         deb-shlibs.5 \
19         deb-split.5 \
20         deb-src-control.5 \
21         deb-src-files.5 \
22         deb-src-rules.5 \
23         deb-src-symbols.5 \
24         deb-substvars.5 \
25         deb-symbols.5 \
26         deb-triggers.5 \
27         deb-version.7 \
28         deb.5 \
29         deb822.5 \
30         dpkg-architecture.1 \
31         dpkg-buildflags.1 \
32         dpkg-buildpackage.1 \
33         dpkg-checkbuilddeps.1 \
34         dpkg-deb.1 \
35         dpkg-distaddfile.1 \
36         dpkg-divert.1 \
37         dpkg-fsys-usrunmess.8 \
38         dpkg-genbuildinfo.1 \
39         dpkg-genchanges.1 \
40         dpkg-gencontrol.1 \
41         dpkg-gensymbols.1 \
42         dpkg-maintscript-helper.1 \
43         dpkg-mergechangelogs.1 \
44         dpkg-name.1 \
45         dpkg-parsechangelog.1 \
46         dpkg-query.1 \
47         dpkg-realpath.1 \
48         dpkg-scanpackages.1 \
49         dpkg-scansources.1 \
50         dpkg-shlibdeps.1 \
51         dpkg-source.1 \
52         dpkg-split.1 \
53         dpkg-statoverride.1 \
54         dpkg-trigger.1 \
55         dpkg-vendor.1 \
56         dpkg.1 \
57         dpkg.cfg.5 \
58         dsc.5 \
59         # EOL
61 if BUILD_DSELECT
62 man_MANS += \
63         dselect.1 \
64         dselect.cfg.5 \
65         # EOL
66 endif
68 if BUILD_START_STOP_DAEMON
69 man_MANS += \
70         start-stop-daemon.8 \
71         # EOL
72 endif
74 if BUILD_UPDATE_ALTERNATIVES
75 man_MANS += \
76         update-alternatives.1 \
77         # EOL
78 endif
80 CLEANFILES = $(man_MANS)
82 EXTRA_DIST = \
83         po/ChangeLog.old \
84         po/dpkg-man.pot \
85         po/po4a.cfg \
86         utf8toman.sed \
87         # EOL
89 # Man page sources.
90 EXTRA_DIST += \
91         deb-buildinfo.pod \
92         deb-changelog.pod \
93         deb-changes.pod \
94         deb-conffiles.pod \
95         deb-control.pod \
96         deb-extra-override.pod \
97         deb-md5sums.pod \
98         deb-old.pod \
99         deb-origin.pod \
100         deb-override.pod \
101         deb-postinst.pod \
102         deb-postrm.pod \
103         deb-preinst.pod \
104         deb-prerm.pod \
105         deb-shlibs.pod \
106         deb-split.pod \
107         deb-src-control.pod \
108         deb-src-files.pod \
109         deb-src-rules.pod \
110         deb-src-symbols.pod \
111         deb-substvars.pod \
112         deb-symbols.pod \
113         deb-triggers.pod \
114         deb-version.pod \
115         deb.pod \
116         deb822.pod \
117         dpkg-architecture.pod \
118         dpkg-buildflags.pod \
119         dpkg-buildpackage.pod \
120         dpkg-checkbuilddeps.pod \
121         dpkg-deb.pod \
122         dpkg-distaddfile.pod \
123         dpkg-divert.pod \
124         dpkg-fsys-usrunmess.pod \
125         dpkg-genbuildinfo.pod \
126         dpkg-genchanges.pod \
127         dpkg-gencontrol.pod \
128         dpkg-gensymbols.pod \
129         dpkg-maintscript-helper.pod \
130         dpkg-mergechangelogs.pod \
131         dpkg-name.pod \
132         dpkg-parsechangelog.pod \
133         dpkg-query.pod \
134         dpkg-realpath.pod \
135         dpkg-scanpackages.pod \
136         dpkg-scansources.pod \
137         dpkg-shlibdeps.pod \
138         dpkg-source.pod \
139         dpkg-split.pod \
140         dpkg-statoverride.pod \
141         dpkg-trigger.pod \
142         dpkg-vendor.pod \
143         dpkg.cfg.pod \
144         dpkg.pod \
145         dsc.pod \
146         dselect.cfg.pod \
147         dselect.pod \
148         start-stop-daemon.pod \
149         update-alternatives.pod \
150         # EOL
153 # Extract the list of languages from the po4a config file.
154 LINGUAS_DIST = `$(SED) -ne 's/^.*\[po4a_langs\] \(.*\)$$/\1/p' $(srcdir)/po/po4a.cfg`
156 # If the user has not defined it let's use the default.
157 LINGUAS ?= $(LINGUAS_DIST)
160 PO4A_V = $(PO4A_V_@AM_V@)
161 PO4A_V_ = $(PO4A_V_@AM_DEFAULT_V@)
162 PO4A_V_0 = @echo "  PO4A   $@";
164 PO4A_OPTS = \
165         --previous \
166         --srcdir $(srcdir) \
167         --destdir $(builddir) \
168         --no-backups \
169         --porefs file \
170         --msgmerge-opt=--add-location=file \
171         --package-name dpkg-man \
172         --package-version $(PACKAGE_VERSION) \
173         --copyright-holder "$(PACKAGE_COPYRIGHT_HOLDER)" \
174         --msgid-bugs-address $(PACKAGE_BUGREPORT) \
175         # EOL
177 all-local: all-local-@USE_PO4A@
179 all-local-no:
180 all-local-yes: gen-man
182 .PHONY: gen-man
184 gen-man: man.stamp
185         for lang in $(LINGUAS); do \
186           files=""; \
187           for man in $(man_MANS); do \
188             tmpl="$${man%%.[0-9]}.pod"; \
189             if [ -f "$(builddir)/$$lang/$$tmpl" ]; then \
190               files="$$files $(builddir)/$$lang/$$man"; \
191             elif [ -f "$(srcdir)/$$lang/$$tmpl" ]; then \
192               files="$$files $(builddir)/$$lang/$$man"; \
193             fi; \
194           done; \
195           if [ -n "$$files" ]; then \
196             $(MKDIR_P) $$lang; \
197             $(MAKE) mandir="$(mandir)/$$lang" man_MANS="" $$files; \
198           fi; \
199         done
201 # FIXME: Use a stamp file until po4a supports them internally.
202 man.stamp:
203         $(PO4A_V) $(PO4A) $(PO4A_OPTS) $(srcdir)/po/po4a.cfg
204         $(AM_V_at) touch $@
206 clean-local: clean-local-@USE_PO4A@
208 clean-local-no:
209 clean-local-yes:
210         rm -rf $(LINGUAS_DIST)
211         $(AM_V_at) rm -f man.stamp
213 .PHONY: update-po
215 update-po:
216         $(PO4A_V) $(PO4A) $(PO4A_OPTS) --force $(srcdir)/po/po4a.cfg
218 SUFFIXES = .pod .1 .5 .7 .8
220 POD2MAN_V = $(POD2MAN_V_@AM_V@)
221 POD2MAN_V_ = $(POD2MAN_V_@AM_DEFAULT_V@)
222 POD2MAN_V_0 = @echo "  POD2MAN $@";
224 POD2MAN_OPTS = \
225         --utf8 \
226         --center='dpkg suite' \
227         --release=$(PACKAGE_VERSION) \
228         --date='$(PACKAGE_RELEASE_DATE)' \
229         # EOL
231 PODSUBST = $(SED) \
232         -e 's/%PACKAGE%/$(PACKAGE)/g' \
233         -e 's/%VERSION%/$(PACKAGE_VERSION)/g' \
234         -e 's/%RELEASE_DATE%/$(PACKAGE_RELEASE_DATE)/g' \
235         -e 's:%CONFDIR%:$(sysconfdir):g' \
236         -e 's:%RUNSTATEDIR%:$(runstatedir):g' \
237         -e 's:%LOGDIR%:$(logdir):g' \
238         -e 's:%ADMINDIR%:$(admindir):g' \
239         -e 's:%BACKUPSDIR%:$(backupsdir):g' \
240         -e 's:%PKGDOCDIR%:$(docdir):g' \
241         -e 's:%PKGCONFDIR%:$(pkgconfdir):g' \
242         -e 's:%PKGLIBDIR%:$(pkglibexecdir):g' \
243         -e 's:%PKGDATADIR%:$(pkgdatadir):g' \
244         -e 's:%INSTDIR_ENVVAR%:DPKG_ROOT:g' \
245         -e 's:%ADMINDIR_ENVVAR%:DPKG_ADMINDIR:g' \
246         # EOL
248 MANFIXUP = $(SED) \
249         -f $(srcdir)/utf8toman.sed \
250         # EOL
252 if BUILD_POD_DOC
253 MANGEN = $(POD2MAN_V) filename='$@'; \
254           $(PODSUBST) $< | \
255           $(POD2MAN) $(POD2MAN_OPTS) \
256           --name="$$(basename $${filename%.*})" \
257           --section="$${filename\#\#*.}" | \
258           $(MANFIXUP) >$@
259 endif
261 .pod.1:
262         $(MANGEN)
263 .pod.5:
264         $(MANGEN)
265 .pod.7:
266         $(MANGEN)
267 .pod.8:
268         $(MANGEN)
270 install-data-local: install-data-local-@USE_PO4A@
272 install-data-local-no:
273 install-data-local-yes:
274         for lang in $(LINGUAS); do \
275           files=""; \
276           for man in $(man_MANS); do \
277             tmpl="$${man%%.[0-9]}.pod"; \
278             if [ -f "$(builddir)/$$lang/$$tmpl" ]; then \
279               files="$$files $(builddir)/$$lang/$$man"; \
280             elif [ -f "$(srcdir)/$$lang/$$tmpl" ]; then \
281               files="$$files $(builddir)/$$lang/$$man"; \
282             fi; \
283           done; \
284           $(MAKE) install-man mandir="$(mandir)/$$lang" man_MANS="$$files"; \
285         done
287 uninstall-local: uninstall-local-@USE_PO4A@
289 uninstall-local-no:
290 uninstall-local-yes:
291         for lang in $(LINGUAS); do \
292           files=""; \
293           for man in $(man_MANS); do \
294             tmpl="$${man%%.[0-9]}.pod"; \
295             if [ -f "$(builddir)/$$lang/$$tmpl" ]; then \
296               files="$$files $(builddir)/$$lang/$$man"; \
297             elif [ -f "$(srcdir)/$$lang/$$tmpl" ]; then \
298               files="$$files $(builddir)/$$lang/$$man"; \
299             fi; \
300           done; \
301           $(MAKE) uninstall-man mandir="$(mandir)/$$lang" man_MANS="$$files"; \
302         done
304 dist-hook: man.stamp
305         cp -p $< $(distdir)/
306         for lang in $(LINGUAS_DIST); do \
307           cp -p $(srcdir)/po/$$lang.po $(distdir)/po; \
308           if [ -e "$(srcdir)/po/$$lang.add" ]; then \
309             cp -p $(srcdir)/po/$$lang.add $(distdir)/po; \
310           fi; \
311           if [ -n "`ls $(builddir)/$$lang/*.pod 2>/dev/null`" ]; then \
312             $(MKDIR_P) $(distdir)/$$lang; \
313             cp -p $(builddir)/$$lang/*.pod $(distdir)/$$lang/; \
314           fi; \
315         done