1
1
# Makefile for PO directory in any package using GNU gettext.
2
# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
2
# Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
4
4
# This file can be copied and used freely without restrictions. It can
5
5
# be used in projects which are not available under the GNU General Public
99
all: check-macro-version all-@USE_NLS@
100
101
all-yes: stamp-po
104
# Ensure that the gettext macros and this Makefile.in.in are in sync.
106
@test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
107
|| { 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; \
103
111
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
104
112
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
105
113
# we don't want to bother translators with empty POT files). We assume that
130
138
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
131
139
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
132
140
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
141
if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
142
package_gnu='GNU '; \
133
146
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
134
147
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
136
149
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
138
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
139
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
140
--files-from=$(srcdir)/POTFILES.in \
141
--copyright-holder='$(COPYRIGHT_HOLDER)' \
142
--msgid-bugs-address="$$msgid_bugs_address"
151
case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
152
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
153
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
154
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
155
--files-from=$(srcdir)/POTFILES.in \
156
--copyright-holder='$(COPYRIGHT_HOLDER)' \
157
--msgid-bugs-address="$$msgid_bugs_address" \
160
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
161
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
162
--files-from=$(srcdir)/POTFILES.in \
163
--copyright-holder='$(COPYRIGHT_HOLDER)' \
164
--package-name="$${package_gnu}@PACKAGE@" \
165
--package-version='@VERSION@' \
166
--msgid-bugs-address="$$msgid_bugs_address" \
143
169
test ! -f $(DOMAIN).po || { \
144
170
if test -f $(srcdir)/$(DOMAIN).pot; then \
145
171
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \