summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-02-02 22:21:29 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-07-10 16:00:54 +0400
commitd500a1d9ca3c10451225f520416f3832849e3bd1 (patch)
tree9d1f3f56fe6e0d8491640b33a2b1d00ed38b279b
parent3e00bbb3cb5c8f55c14000cd4834468fe7386a44 (diff)
downloaddctrl-tools-d500a1d9ca3c10451225f520416f3832849e3bd1.tar.gz
Autotools with gettext
-rw-r--r--.gitignore24
-rw-r--r--GNUmakefile212
-rw-r--r--Makefile.am67
-rw-r--r--configure.ac32
-rw-r--r--po/.gitignore1
-rw-r--r--po/ChangeLog4
-rw-r--r--po/LINGUAS16
-rw-r--r--po/Makefile.in.in444
-rw-r--r--po/Makevars41
-rw-r--r--po/POTFILES.in20
10 files changed, 648 insertions, 213 deletions
diff --git a/.gitignore b/.gitignore
index ee181bb..33061a1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,26 @@
-libdctrl.a
+*~
+ABOUT-NLS
+aclocal.m4
+autom4te.cache
+build-aux
+config.h
+config.h.in
+config.status
+configure
debian/dctrl-tools
debian/dctrl-tools.debhelper.log
debian/dctrl-tools.substvars
+.deps
+.dirstamp
+INSTALL
+*.la
+libdctrl.a
+.libs
+libtool
+*.lo
+*.log
+m4/*
+Makefile
+Makefile.in
+*.o
+stamp-h1
diff --git a/GNUmakefile b/GNUmakefile
deleted file mode 100644
index 2723e8f..0000000
--- a/GNUmakefile
+++ /dev/null
@@ -1,212 +0,0 @@
-
-version := $(shell dpkg-parsechangelog | grep '^Version' | cut -b10-)
-maintainer := "$(shell grep ^Maintainer: debian/control | cut -b13-)"
-prefix = /usr/local
-exec_prefix = $(prefix)
-sysconfdir = $(prefix)/etc
-bindir = $(exec_prefix)/bin
-sbindir = $(exec_prefix)/sbin
-datarootdir = $(prefix)/share
-docdir = $(datarootdir)/doc/dctrl-tools
-mandir = $(datarootdir)/man
-man1dir = $(mandir)/man1
-man8dir = $(mandir)/man8
-localedir = $(datarootdir)/locale
-
-CC = gcc
-CFLAGS ?= -g -O2 -Wall -Wextra -Werror
-ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS) -std=gnu99 -Ilib \
- -DENABLE_L_DEBUG -D_GNU_SOURCE -DSYSCONF=\"$(sysconfdir)\" \
- -DHAVE_GETTEXT -DPACKAGE=\"dctrl-tools\" -DLOCALEDIR=\"$(localedir)\"
-
-ALL_CFLAGS += -DVERSION=\"$(version)\"
-ALL_CFLAGS += -DMAINTAINER='$(maintainer)'
-
-INSTALL = install
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m644
-INSTALL_DIR = $(INSTALL) -d
-
-PO4A = po4a
-PO4A_CONFIG = man/po4a/po4a.cfg
-
-libsrc = $(wildcard lib/*.c)
-libobj = $(libsrc:.c=.o)
-
-src = $(libsrc) \
- $(wildcard grep-dctrl/*.c) \
- $(wildcard sort-dctrl/*.c) \
- $(wildcard tbl-dctrl/*.c) \
- $(wildcard join-dctrl/*.c)
-
-obj = $(src:.c=.o)
-
-exe = grep-dctrl/grep-dctrl \
- sort-dctrl/sort-dctrl \
- tbl-dctrl/tbl-dctrl \
- join-dctrl/join-dctrl
-
-LDLIBS = -L. -ldctrl
-
-# List of translated languages is given in langs.mk
-include langs.mk
-
-all : all-no-mo mo translated-man
-
-all-no-mo : sync-available/sync-available \
- man/grep-dctrl.1 \
- $(exe)
-aliases = grep-status grep-available grep-aptavail grep-debtags
-
-install :
- $(INSTALL_DIR) $(DESTDIR)$(sbindir)
- $(INSTALL_DIR) $(DESTDIR)$(bindir)
- $(INSTALL_DIR) $(DESTDIR)$(docdir)
- $(INSTALL_DIR) $(DESTDIR)$(man1dir)
- $(INSTALL_DIR) $(DESTDIR)$(man8dir)
- $(INSTALL_PROGRAM) sync-available/sync-available $(DESTDIR)$(sbindir)
- $(INSTALL_PROGRAM) join-dctrl/join-dctrl $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) tbl-dctrl/tbl-dctrl $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) sort-dctrl/sort-dctrl $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) grep-dctrl/grep-dctrl $(DESTDIR)$(bindir)
- set -e ; for dest in $(aliases) ; do \
- ln -s grep-dctrl $(DESTDIR)$(bindir)/$$dest ; \
- done
- $(INSTALL_DATA) man/sync-available.8 $(DESTDIR)$(man8dir)/
- gzip -9 $(DESTDIR)$(man8dir)/sync-available.8
- $(INSTALL_DATA) man/sort-dctrl.1 $(DESTDIR)$(man1dir)/
- gzip -9 $(DESTDIR)$(man1dir)/sort-dctrl.1
- $(INSTALL_DATA) man/tbl-dctrl.1 $(DESTDIR)$(man1dir)/
- gzip -9 $(DESTDIR)$(man1dir)/tbl-dctrl.1
- $(INSTALL_DATA) man/join-dctrl.1 $(DESTDIR)$(man1dir)/
- gzip -9 $(DESTDIR)$(man1dir)/join-dctrl.1
- $(INSTALL_DATA) man/grep-dctrl.1 $(DESTDIR)$(man1dir)/
- gzip -9 $(DESTDIR)$(man1dir)/grep-dctrl.1
- set -e ; for dest in $(aliases) ; do \
- ln -s grep-dctrl.1.gz $(DESTDIR)$(man1dir)/$$dest.1.gz ; \
- done
- set -e ; for d in man/translated/*; do \
- lang=`echo $$d | cut -c16-`; \
- if [ -e $$d/sync-available.8 ]; then \
- $(INSTALL_DIR) $(DESTDIR)$(mandir)/$$lang/man8; \
- $(INSTALL_DATA) $$d/sync-available.8 $(DESTDIR)$(mandir)/$$lang/man8/; \
- gzip -9 $(DESTDIR)$(mandir)/$$lang/man8/sync-available.8; \
- fi; \
- for file in sort-dctrl.1 tbl-dctrl.1 join-dctrl.1 grep-dctrl.1; do \
- if [ -e $$d/$$file ]; then \
- if ! [ -d $(DESTDIR)$(mandir)/$$lang/man1 ]; then \
- $(INSTALL_DIR) $(DESTDIR)$(mandir)/$$lang/man1; \
- fi; \
- $(INSTALL_DATA) $$d/$$file $(DESTDIR)$(mandir)/$$lang/man1/; \
- gzip -9 $(DESTDIR)$(mandir)/$$lang/man1/$$file; \
- fi; \
- done; \
- if [ -e $(DESTDIR)$(mandir)/$$lang/man1/grep-dctrl.1.gz ]; then \
- for dest in $(aliases) ; do \
- ln -s grep-dctrl.1.gz $(DESTDIR)$(mandir)/$$lang/man1/$$dest.1.gz ; \
- done; \
- fi; \
- done;
- $(INSTALL_DATA) TODO README $(DESTDIR)$(docdir)
- set -e ; for lang in $(langs) ; do \
- $(INSTALL_DIR) $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES ; \
- $(INSTALL_DATA) po/$$lang.mo \
- $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/dctrl-tools.mo ; \
- done
-
-
-pot : po/dctrl-tools.pot man/po4a/po/dctrl-tools-man.pot
-
-po : $(foreach f,$(langs),po/$(f).po)
-
-mo : $(foreach f,$(langs),po/$(f).mo)
-
-grep-dctrl/grep-dctrl : grep-dctrl/grep-dctrl.o libdctrl.a
-
-sort-dctrl/sort-dctrl : sort-dctrl/sort-dctrl.o libdctrl.a
-
-tbl-dctrl/tbl-dctrl : tbl-dctrl/tbl-dctrl.o libdctrl.a
-
-join-dctrl/join-dctrl : join-dctrl/join-dctrl.o libdctrl.a
-
-% : %.o
- $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
-
-%.o : %.c
- $(CC) $(ALL_CFLAGS) -MD -MF $*.d -c -o $@ $<
-
-libdctrl.a : $(libobj)
- ar cr $@ $^
- ranlib $@
-
-libdctrl.so : $(soobj)
- $(LD) -shared -o $@ $^ -lc $(SOLDLIBS)
-
-%.test : %.test.o
-
-%.test.o : %.c
- $(CC) -c $(CFLAGS) -DTESTMAIN $< -o $@
-
-so/%.o : %.c
- $(CC) -fPIC $(CFLAGS) -c $< -o $@
-
-%.1 : %.1.cp
- sed 's*SYSCONF*$(sysconfdir)*' $< > $@
-
-sync-available/sync-available : sync-available/sync-available.cp
- sed 's*VERSION*$(version)*' $< > $@
- chmod 755 $@
-
-xgettext_opts=--copyright-holder="Antti-Juhani Kaijanaho" \
- --msgid-bugs-address="ajk@debian.org" -kN_ -k_
-
-po/%.po : po/dctrl-tools.pot
- msgmerge --previous -q -U --backup=existing $@ $^
-
-po/%.mo : po/%.po
- msgfmt -c --statistics -o $@ $<
-
-po/dctrl-tools.pot : $(src) lib/msg.h
- xgettext $(xgettext_opts) -d grep-dctrl $^
- mv grep-dctrl.po $@
-
-# create (or update) dctrl-tools-man.pot
-man/po4a/po/dctrl-tools-man.pot :
- touch man/po4a/po/dctrl-tools-man.pot
- $(PO4A) --force --no-translations $(PO4A_CONFIG)
-
-# build translated manpages in man/translated/$lang/
-po4a :
- touch man/po4a/po/dctrl-tools-man.pot
- $(PO4A) --force --no-backups $(PO4A_CONFIG)
-
-# handle the "%.1 : %.1.cp" rule if and only if the grep-dctrl.1.cp file exists
-translated-man : po4a
- set -e ; for d in man/translated/*; do \
- if [ -e $$d/grep-dctrl.1.cp ]; then \
- sed 's*SYSCONF*$(sysconfdir)*' \
- $$d/grep-dctrl.1.cp > $$d/grep-dctrl.1; \
- fi; \
- done
-
-fsaf.test : fsaf.test.o msg.o
-
-test : all-no-mo
- sh ./tester.sh
-
-clean :
- $(RM) core $(exe) man/grep-dctrl.1 $(obj) so/*.o libdctrl.a libdctrl.so
- $(RM) po/*.mo TAGS *.d */*.d
- $(RM) sync-available/sync-available
- $(RM) -r man/translated
-
-distclean : clean
-
-maintainer-clean : distclean
- $(RM) po/*.pot man/po4a/po/*.pot
-
-tags :
- etags *.[hc]
-
--include $(obj:.o=.d)
-
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..5613e8a
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,67 @@
+SUBDIRS = po .
+
+ACLOCAL_AMFLAGS = -I m4
+
+lib_LTLIBRARIES = lib/libdctrl.la
+
+bin_PROGRAMS = \
+ grep-dctrl/grep-dctrl \
+ sort-dctrl/sort-dctrl \
+ tbl-dctrl/tbl-dctrl \
+ join-dctrl/join-dctrl
+
+AM_CPPFLAGS = -I$(top_srcdir)/lib \
+-DSYSCONF=\"$(sysconfdir)\" \
+-DLOCALEDIR=\"$(localedir)\" \
+-DMAINTAINER=\"$(PACKAGE_BUGREPORT)\"
+
+AM_CFLAGS = $(WERROR)
+
+grep_dctrl_grep_dctrl_SOURCES = grep-dctrl/grep-dctrl.c
+grep_dctrl_grep_dctrl_LDADD = lib/libdctrl.la
+
+sort_dctrl_sort_dctrl_SOURCES = sort-dctrl/sort-dctrl.c
+sort_dctrl_sort_dctrl_LDADD = lib/libdctrl.la
+
+tbl_dctrl_tbl_dctrl_SOURCES = tbl-dctrl/tbl-dctrl.c
+tbl_dctrl_tbl_dctrl_LDADD = lib/libdctrl.la
+
+join_dctrl_join_dctrl_SOURCES = join-dctrl/join-dctrl.c
+join_dctrl_join_dctrl_LDADD = lib/libdctrl.la
+
+lib_libdctrl_la_SOURCES = \
+lib/align.h \
+lib/atom.c \
+lib/atom.h \
+lib/fieldtrie.c \
+lib/fieldtrie.h \
+lib/fnutil.c \
+lib/fnutil.h \
+lib/fsaf.c \
+lib/fsaf.h \
+lib/i18n.h \
+lib/ifile.c \
+lib/ifile.h \
+lib/misc.c \
+lib/misc.h \
+lib/msg.c \
+lib/msg.h \
+lib/para_bundle.c \
+lib/para_bundle.h \
+lib/paragraph.c \
+lib/paragraph.h \
+lib/para_pool.c \
+lib/para_pool.h \
+lib/predicate.c \
+lib/predicate.h \
+lib/sorter.c \
+lib/sorter.h \
+lib/strlist.c \
+lib/strlist.h \
+lib/strutil.c \
+lib/strutil.h \
+lib/util.c \
+lib/util.h \
+lib/version.c \
+lib/version.h
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..99d30b9
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,32 @@
+AC_INIT([dctrl-tools], [2.22.2], [dctrl-tools-devel@lists.alioth.debian.org])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_INIT_AUTOMAKE([foreign subdir-objects dist-bzip2])
+
+AC_PROG_CC_C99
+AC_USE_SYSTEM_EXTENSIONS
+LT_INIT
+
+AC_CHECK_PROG([PO4A],[po4a],[po4a],[no])
+AM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A" != "xno"])
+
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.18.1])
+
+AC_ARG_ENABLE([werror],
+ AS_HELP_STRING([--enable-werror], [treat warnings as errors]))
+
+AS_IF([test "x$enable_werror" != "xno"], [
+ AC_SUBST([WERROR], [-Werror])
+])
+
+
+AC_SUBST([GREP_ALIASES], ["grep-status grep-available grep-aptavail grep-debtags"])
+
+AC_CONFIG_FILES([
+ Makefile
+ po/Makefile.in
+])
+
+AC_OUTPUT
diff --git a/po/.gitignore b/po/.gitignore
index 6c2da8d..f470a61 100644
--- a/po/.gitignore
+++ b/po/.gitignore
@@ -3,3 +3,4 @@
*.o
*.d
dctrl-tools.pot
+*.gmo
diff --git a/po/ChangeLog b/po/ChangeLog
new file mode 100644
index 0000000..991304a
--- /dev/null
+++ b/po/ChangeLog
@@ -0,0 +1,4 @@
+2013-02-02 gettextize <bug-gnu-gettext@gnu.org>
+
+ * POTFILES.in: New file.
+
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..7ff3aad
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,16 @@
+ca
+cs
+da
+de
+es
+fi
+fr
+id
+it
+ja
+pl
+pt
+pt_BR
+ru
+sv
+vi
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 0000000..83d8838
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,444 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU General Public
+# License but which still want to provide support for the GNU gettext
+# functionality.
+# Please note that the actual code of GNU gettext is covered by the GNU
+# General Public License and is *not* in the public domain.
+#
+# Origin: gettext-0.18
+GETTEXT_MACRO_VERSION = 0.18
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+datadir = @datadir@
+localedir = @localedir@
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+# We use $(mkdir_p).
+# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
+# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
+# @install_sh@ does not start with $(SHELL), so we add it.
+# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
+# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
+# versions, $(mkinstalldirs) and $(install_sh) are unused.
+mkinstalldirs = $(SHELL) @install_sh@ -d
+install_sh = $(SHELL) @install_sh@
+MKDIR_P = @MKDIR_P@
+mkdir_p = @mkdir_p@
+
+GMSGFMT_ = @GMSGFMT@
+GMSGFMT_no = @GMSGFMT@
+GMSGFMT_yes = @GMSGFMT_015@
+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
+MSGFMT_ = @MSGFMT@
+MSGFMT_no = @MSGFMT@
+MSGFMT_yes = @MSGFMT_015@
+MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
+XGETTEXT_ = @XGETTEXT@
+XGETTEXT_no = @XGETTEXT@
+XGETTEXT_yes = @XGETTEXT_015@
+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+
+# Makevars gets inserted here. (Don't remove this line!)
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
+
+.po.mo:
+ @echo "$(MSGFMT) -c -o $@ $<"; \
+ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
+
+.po.gmo:
+ @lang=`echo $* | sed -e 's,.*/,,'`; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
+ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+
+.sin.sed:
+ sed -e '/^#/d' $< > t-$@
+ mv t-$@ $@
+
+
+all: check-macro-version all-@USE_NLS@
+
+all-yes: stamp-po
+all-no:
+
+# Ensure that the gettext macros and this Makefile.in.in are in sync.
+check-macro-version:
+ @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
+ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
+ exit 1; \
+ }
+
+# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
+# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
+# we don't want to bother translators with empty POT files). We assume that
+# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
+# In this case, stamp-po is a nop (i.e. a phony target).
+
+# stamp-po is a timestamp denoting the last time at which the CATALOGS have
+# been loosely updated. Its purpose is that when a developer or translator
+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
+# invocations of "make" will do nothing. This timestamp would not be necessary
+# if updating the $(CATALOGS) would always touch them; however, the rule for
+# $(POFILES) has been designed to not touch files that don't need to be
+# changed.
+stamp-po: $(srcdir)/$(DOMAIN).pot
+ test ! -f $(srcdir)/$(DOMAIN).pot || \
+ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
+ @test ! -f $(srcdir)/$(DOMAIN).pot || { \
+ echo "touch stamp-po" && \
+ echo timestamp > stamp-poT && \
+ mv stamp-poT stamp-po; \
+ }
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+ if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
+ package_gnu='GNU '; \
+ else \
+ package_gnu=''; \
+ fi; \
+ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
+ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
+ else \
+ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
+ fi; \
+ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
+ --msgid-bugs-address="$$msgid_bugs_address" \
+ ;; \
+ *) \
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
+ --package-name="$${package_gnu}@PACKAGE@" \
+ --package-version='@VERSION@' \
+ --msgid-bugs-address="$$msgid_bugs_address" \
+ ;; \
+ esac
+ test ! -f $(DOMAIN).po || { \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+ else \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ else \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ }
+
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
+$(srcdir)/$(DOMAIN).pot:
+ $(MAKE) $(DOMAIN).pot-update
+
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
+# Note that a PO file is not touched if it doesn't need to be changed.
+$(POFILES): $(srcdir)/$(DOMAIN).pot
+ @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+ if test -f "$(srcdir)/$${lang}.po"; then \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
+ cd $(srcdir) \
+ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
+ *) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
+ esac; \
+ }; \
+ else \
+ $(MAKE) $${lang}.po-create; \
+ fi
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+ for file in $(DISTFILES.common) Makevars.template; do \
+ $(INSTALL_DATA) $(srcdir)/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ for file in Makevars; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+install-data-no: all
+install-data-yes: all
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
+ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
+ fi; \
+ done; \
+ done
+
+install-strip: install
+
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ : ; \
+ fi
+installdirs-data-no:
+installdirs-data-yes:
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ fi; \
+ done; \
+ done
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ for file in $(DISTFILES.common) Makevars.template; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+uninstall-data-no:
+uninstall-data-yes:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ done; \
+ done
+
+check: all
+
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
+
+mostlyclean:
+ rm -f remove-potcdate.sed
+ rm -f stamp-poT
+ rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f stamp-po $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+ $(MAKE) update-po
+ @$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: stamp-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ dists="$$dists Makevars.template"; \
+ fi; \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ dists="$$dists $(DOMAIN).pot stamp-po"; \
+ fi; \
+ if test -f $(srcdir)/ChangeLog; then \
+ dists="$$dists ChangeLog"; \
+ fi; \
+ for i in 0 1 2 3 4 5 6 7 8 9; do \
+ if test -f $(srcdir)/ChangeLog.$$i; then \
+ dists="$$dists ChangeLog.$$i"; \
+ fi; \
+ done; \
+ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
+ for file in $$dists; do \
+ if test -f $$file; then \
+ cp -p $$file $(distdir) || exit 1; \
+ else \
+ cp -p $(srcdir)/$$file $(distdir) || exit 1; \
+ fi; \
+ done
+
+update-po: Makefile
+ $(MAKE) $(DOMAIN).pot-update
+ test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
+ $(MAKE) update-gmo
+
+# General rule for creating PO files.
+
+.nop.po-create:
+ @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
+ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
+ exit 1
+
+# General rule for updating PO files.
+
+.nop.po-update:
+ @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+ cd $(srcdir); \
+ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ *) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ esac; \
+ }; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+ @:
+
+# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
+# because execution permission bits may not work on the current file system.
+# Use @SHELL@, which is the shell determined by autoconf for the use by its
+# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
+ cd $(top_builddir) \
+ && @SHELL@ ./config.status $(subdir)/$@.in po-directories
+
+force:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..ee7a5e1
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
+# package. (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.) Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright. The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Antti-Juhani Kaijanaho <ajk@debian.org>
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+# in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+# understood.
+# - Strings which make invalid assumptions about notation of date, time or
+# money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = dctrl-tools-devel@lists.alioth.debian.org
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used. It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..eb40a7e
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,20 @@
+grep-dctrl/grep-dctrl.c
+join-dctrl/join-dctrl.c
+lib/atom.c
+lib/fieldtrie.c
+lib/fnutil.c
+lib/fsaf.c
+lib/ifile.c
+lib/misc.c
+lib/msg.c
+lib/para_bundle.c
+lib/paragraph.c
+lib/para_pool.c
+lib/predicate.c
+lib/sorter.c
+lib/strlist.c
+lib/strutil.c
+lib/util.c
+lib/version.c
+sort-dctrl/sort-dctrl.c
+tbl-dctrl/tbl-dctrl.c