diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:37:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:37:10 +0000 |
commit | c9addba5cc770d2d231b34f6739f32c6be8690f1 (patch) | |
tree | c643da154a95a1d163137135050bb47858a1654e /man/po4a/Makefile.am | |
parent | Initial commit. (diff) | |
download | man-db-c9addba5cc770d2d231b34f6739f32c6be8690f1.tar.xz man-db-c9addba5cc770d2d231b34f6739f32c6be8690f1.zip |
Adding upstream version 2.12.0.upstream/2.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man/po4a/Makefile.am')
-rw-r--r-- | man/po4a/Makefile.am | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/man/po4a/Makefile.am b/man/po4a/Makefile.am new file mode 100644 index 0000000..5c21dd9 --- /dev/null +++ b/man/po4a/Makefile.am @@ -0,0 +1,102 @@ +## Process this file with automake to produce Makefile.in +## +## Copyright (C) 2008 Colin Watson. +## +## This file is part of man-db. +## +## man-db is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## man-db is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with man-db; if not, write to the Free Software Foundation, +## Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +DOMAIN = man-db-manpages +POFILES = \ + po/da.po \ + po/de.po \ + po/es.po \ + po/fr.po \ + po/id.po \ + po/ja.po \ + po/ko.po \ + po/nl.po \ + po/pl.po \ + po/pt.po \ + po/pt_BR.po \ + po/ro.po \ + po/ru.po \ + po/sr.po \ + po/sv.po \ + po/tr.po \ + po/zh_CN.po + +EXTRA_DIST = po4a.cfg Locale/Po4a/Manext.pm po/$(DOMAIN).pot $(POFILES) + +if PO4A +PO4A_ENVIRONMENT = PERL5LIB=$(srcdir) +STAGING = $(builddir)/tmp-po + +# Always generate output files even if poorly translated, since Automake's +# generated rules will get upset otherwise. +PO4A_ARGS = --variable srcdir=$(top_srcdir)/man \ + --variable builddir=$(top_builddir)/man \ + --variable podir=$(STAGING) \ + --keep 0 + +RUN_PO4A = $(PO4A_ENVIRONMENT) $(PO4A) $(PO4A_ARGS) + +all-local: + rm -rf $(STAGING) + $(MKDIR_P) $(STAGING) + set -e; for f in po/$(DOMAIN).pot $(POFILES); do \ + base=`basename $$f`; \ + cp -p $(srcdir)/$$f $(STAGING)/; \ + chmod u+w $(STAGING)/$$base; \ + done + $(RUN_PO4A) $(srcdir)/po4a.cfg + rm -rf $(STAGING) + +update-po-real: + @$(MAKE) -C $(top_builddir)/po remove-potcdate.sed + rm -rf $(STAGING) + $(MKDIR_P) $(STAGING) + set -e; for f in po/$(DOMAIN).pot $(POFILES); do \ + base=`basename $$f`; \ + cp -p $(srcdir)/$$f $(STAGING)/; \ + chmod u+w $(STAGING)/$$base; \ + done + $(RUN_PO4A) --force --no-translations $(srcdir)/po4a.cfg + sed -f $(top_builddir)/po/remove-potcdate.sed \ + < $(srcdir)/po/$(DOMAIN).pot > $(STAGING)/$(DOMAIN).1po + sed -f $(top_builddir)/po/remove-potcdate.sed \ + < $(STAGING)/$(DOMAIN).pot > $(STAGING)/$(DOMAIN).2po + set -e; if ! cmp $(STAGING)/$(DOMAIN).1po $(STAGING)/$(DOMAIN).2po \ + >/dev/null 2>&1; then \ + for f in po/$(DOMAIN).pot $(POFILES); do \ + base=`basename $$f`; \ + mv -f $(STAGING)/$$base $(srcdir)/$$f; \ + done; \ + fi + rm -rf $(STAGING) + +update-po: + @set -e; if test $(srcdir) = $(builddir); then \ + $(MAKE) update-po-real; \ + else \ + echo "update-po does not yet work with out-of-tree builds."; \ + fi + +po/man-db-manpages.pot: + $(MAKE) update-po + +clean-local: + rm -rf $(STAGING) +endif |