Copyright (C)2013-2018 Ian Jackson
Copyright (C)2016-2018 Sean Whitton
+Copyright (C)1999-2010 Joey Hess
+Copyright (C)2004-2010 Colin Watson
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it's GPL (implicitly GPLv3 compatible).
+Some of the i18n build system was copied from the Debian debconf
+package, which has the BSD-2-clause (GPLv3-compatible) licence:
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+
+
Contributions are accepted upstram under the same terms; please sign
off your patches (by writing an approprite Signed-Off-By tag in your
commit message or patch submission) to indicate your attestation that
--- /dev/null
+# List here all source files with translatable strings.
+POTFILES=$(sort $(shell find ../Debconf -type f -name \*.pm)) \
+ ../dpkg-* ../debconf-* ../debconf
+
+POFILES=$(wildcard *.po)
+MOFILES=$(POFILES:.po=.mo)
+
+all: debconf.pot $(MOFILES)
+
+install: all
+ for file in $(MOFILES); do \
+ lang=`echo $$file | sed 's/\.mo//'`; \
+ install -d $(prefix)/usr/share/locale/$$lang/LC_MESSAGES/; \
+ install -m 0644 $$file $(prefix)/usr/share/locale/$$lang/LC_MESSAGES/debconf.mo; \
+ done
+
+debconf.pot: $(POTFILES)
+ @echo "Rebuilding the pot file"
+ TZ=UTC xgettext $(POTFILES) -o debconf.pot.new -Lperl
+ if [ -f debconf.pot ]; then \
+ ./remove-potcdate.pl < debconf.pot > debconf.1po && \
+ ./remove-potcdate.pl < debconf.pot.new > debconf.2po && \
+ if cmp debconf.1po debconf.2po >/dev/null 2>&1; then \
+ rm -f debconf.1po debconf.2po debconf.pot.new; \
+ else \
+ rm -f debconf.1po debconf.2po && \
+ mv debconf.pot.new debconf.pot; \
+ fi; \
+ else \
+ mv debconf.pot.new debconf.pot; \
+ fi
+
+clean:
+ rm -f $(MOFILES) debconf.pot.new messages messages.mo
+
+%.mo: %.po
+ msgfmt -o $@ $<
+
+%.po: debconf.pot
+ @echo -n "Merging debconf.pot and $@"
+ @msgmerge --previous $@ debconf.pot -o $@.new
+ @mv -f $@.new $@
+ @msgfmt --statistics $@
+
+check:
+ @for file in $(POFILES); do \
+ lang=`echo $$file | sed 's/\.po//'`; \
+ printf "$$lang: "; \
+ msgfmt -o /dev/null -c -v --statistics $$lang.po;\
+ done