1 ## Process this file with automake to produce Makefile.in
3 ## Copyright (C) 2008 Colin Watson.
5 ## This file is part of man-db.
7 ## man-db is free software; you can redistribute it and/or modify it
8 ## under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation; either version 2 of the License, or
10 ## (at your option) any later version.
12 ## man-db is distributed in the hope that it will be useful, but
13 ## WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ## GNU General Public License for more details.
17 ## You should have received a copy of the GNU General Public License
18 ## along with man-db; if not, write to the Free Software Foundation,
19 ## Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 DOMAIN = man-db-manpages
33 EXTRA_DIST = po4a.cfg Locale/Po4a/Manext.pm po/$(DOMAIN).pot $(POFILES)
36 PO4A_ENVIRONMENT = PERL5LIB=$(srcdir)
37 STAGING = $(builddir)/tmp-po
39 # Always generate output files even if poorly translated, since Automake's
40 # generated rules will get upset otherwise.
41 PO4A_ARGS = --variable srcdir=$(top_srcdir)/man \
42 --variable builddir=$(top_builddir)/man \
43 --variable podir=$(STAGING) \
46 RUN_PO4A = $(PO4A_ENVIRONMENT) $(PO4A) $(PO4A_ARGS)
51 set -e; for f in po/$(DOMAIN).pot $(POFILES); do \
52 base=`basename $$f`; \
53 cp -p $(srcdir)/$$f $(STAGING)/; \
54 chmod u+w $(STAGING)/$$base; \
56 $(RUN_PO4A) $(srcdir)/po4a.cfg
60 @$(MAKE) -C $(top_builddir)/po remove-potcdate.sed
63 set -e; for f in po/$(DOMAIN).pot $(POFILES); do \
64 base=`basename $$f`; \
65 cp -p $(srcdir)/$$f $(STAGING)/; \
66 chmod u+w $(STAGING)/$$base; \
68 $(RUN_PO4A) --force --no-translations $(srcdir)/po4a.cfg
69 sed -f $(top_builddir)/po/remove-potcdate.sed \
70 < $(srcdir)/po/$(DOMAIN).pot > $(STAGING)/$(DOMAIN).1po
71 sed -f $(top_builddir)/po/remove-potcdate.sed \
72 < $(STAGING)/$(DOMAIN).pot > $(STAGING)/$(DOMAIN).2po
73 set -e; if ! cmp $(STAGING)/$(DOMAIN).1po $(STAGING)/$(DOMAIN).2po \
74 >/dev/null 2>&1; then \
75 for f in po/$(DOMAIN).pot $(POFILES); do \
76 base=`basename $$f`; \
77 mv -f $(STAGING)/$$base $(srcdir)/$$f; \
83 @set -e; if test $(srcdir) = $(builddir); then \
84 $(MAKE) update-po-real; \
86 echo "update-po does not yet work with out-of-tree builds."; \
89 po/man-db-manpages.pot: