diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-05-18 19:57:24 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-05-18 19:57:24 +0000 |
commit | 755b04521a5b37ceac529df984c9ca1e466741c6 (patch) | |
tree | f44b464dcad4c03281027aa95ca5e1dd11b2e7b9 /po/Makefile.in.in | |
parent | 55406e60956ebbd4e50e0907e0bcd94df5f71d55 (diff) | |
download | gnunet-755b04521a5b37ceac529df984c9ca1e466741c6.tar.gz gnunet-755b04521a5b37ceac529df984c9ca1e466741c6.zip |
-gettext and libtoolize updates
Diffstat (limited to 'po/Makefile.in.in')
-rw-r--r-- | po/Makefile.in.in | 108 |
1 files changed, 90 insertions, 18 deletions
diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 5022b8b18..65184f65c 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in | |||
@@ -1,5 +1,5 @@ | |||
1 | # Makefile for PO directory in any package using GNU gettext. | 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, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu> |
3 | # | 3 | # |
4 | # This file can be copied and used freely without restrictions. It can | 4 | # This file can be copied and used freely without restrictions. It can |
5 | # be used in projects which are not available under the GNU General Public | 5 | # be used in projects which are not available under the GNU General Public |
@@ -8,12 +8,14 @@ | |||
8 | # Please note that the actual code of GNU gettext is covered by the GNU | 8 | # Please note that the actual code of GNU gettext is covered by the GNU |
9 | # General Public License and is *not* in the public domain. | 9 | # General Public License and is *not* in the public domain. |
10 | # | 10 | # |
11 | # Origin: gettext-0.16 | 11 | # Origin: gettext-0.19 |
12 | GETTEXT_MACRO_VERSION = 0.19 | ||
12 | 13 | ||
13 | PACKAGE = @PACKAGE@ | 14 | PACKAGE = @PACKAGE@ |
14 | VERSION = @VERSION@ | 15 | VERSION = @VERSION@ |
15 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | 16 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ |
16 | 17 | ||
18 | SED = @SED@ | ||
17 | SHELL = /bin/sh | 19 | SHELL = /bin/sh |
18 | @SET_MAKE@ | 20 | @SET_MAKE@ |
19 | 21 | ||
@@ -75,6 +77,16 @@ POTFILES = \ | |||
75 | 77 | ||
76 | CATALOGS = @CATALOGS@ | 78 | CATALOGS = @CATALOGS@ |
77 | 79 | ||
80 | POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot | ||
81 | POFILESDEPS_yes = $(POFILESDEPS_) | ||
82 | POFILESDEPS_no = | ||
83 | POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT)) | ||
84 | |||
85 | DISTFILESDEPS_ = update-po | ||
86 | DISTFILESDEPS_yes = $(DISTFILESDEPS_) | ||
87 | DISTFILESDEPS_no = | ||
88 | DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) | ||
89 | |||
78 | # Makevars gets inserted here. (Don't remove this line!) | 90 | # Makevars gets inserted here. (Don't remove this line!) |
79 | 91 | ||
80 | .SUFFIXES: | 92 | .SUFFIXES: |
@@ -87,8 +99,8 @@ CATALOGS = @CATALOGS@ | |||
87 | .po.gmo: | 99 | .po.gmo: |
88 | @lang=`echo $* | sed -e 's,.*/,,'`; \ | 100 | @lang=`echo $* | sed -e 's,.*/,,'`; \ |
89 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | 101 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
90 | echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ | 102 | echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ |
91 | cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo | 103 | cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo |
92 | 104 | ||
93 | .sin.sed: | 105 | .sin.sed: |
94 | sed -e '/^#/d' $< > t-$@ | 106 | sed -e '/^#/d' $< > t-$@ |
@@ -100,6 +112,13 @@ all: all-@USE_NLS@ | |||
100 | all-yes: stamp-po | 112 | all-yes: stamp-po |
101 | all-no: | 113 | all-no: |
102 | 114 | ||
115 | # Ensure that the gettext macros and this Makefile.in.in are in sync. | ||
116 | CHECK_MACRO_VERSION = \ | ||
117 | test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ | ||
118 | || { 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; \ | ||
119 | exit 1; \ | ||
120 | } | ||
121 | |||
103 | # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no | 122 | # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no |
104 | # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because | 123 | # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because |
105 | # we don't want to bother translators with empty POT files). We assume that | 124 | # we don't want to bother translators with empty POT files). We assume that |
@@ -115,6 +134,7 @@ all-no: | |||
115 | # $(POFILES) has been designed to not touch files that don't need to be | 134 | # $(POFILES) has been designed to not touch files that don't need to be |
116 | # changed. | 135 | # changed. |
117 | stamp-po: $(srcdir)/$(DOMAIN).pot | 136 | stamp-po: $(srcdir)/$(DOMAIN).pot |
137 | @$(CHECK_MACRO_VERSION) | ||
118 | test ! -f $(srcdir)/$(DOMAIN).pot || \ | 138 | test ! -f $(srcdir)/$(DOMAIN).pot || \ |
119 | test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) | 139 | test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) |
120 | @test ! -f $(srcdir)/$(DOMAIN).pot || { \ | 140 | @test ! -f $(srcdir)/$(DOMAIN).pot || { \ |
@@ -129,17 +149,53 @@ stamp-po: $(srcdir)/$(DOMAIN).pot | |||
129 | 149 | ||
130 | # This target rebuilds $(DOMAIN).pot; it is an expensive operation. | 150 | # This target rebuilds $(DOMAIN).pot; it is an expensive operation. |
131 | # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. | 151 | # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. |
152 | # The determination of whether the package xyz is a GNU one is based on the | ||
153 | # heuristic whether some file in the top level directory mentions "GNU xyz". | ||
154 | # If GNU 'find' is available, we avoid grepping through monster files. | ||
132 | $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed | 155 | $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed |
156 | package_gnu="$(PACKAGE_GNU)"; \ | ||
157 | test -n "$$package_gnu" || { \ | ||
158 | if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ | ||
159 | LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \ | ||
160 | -size -10000000c -exec grep 'GNU @PACKAGE@' \ | ||
161 | /dev/null '{}' ';' 2>/dev/null; \ | ||
162 | else \ | ||
163 | LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ | ||
164 | fi; \ | ||
165 | } | grep -v 'libtool:' >/dev/null; then \ | ||
166 | package_gnu=yes; \ | ||
167 | else \ | ||
168 | package_gnu=no; \ | ||
169 | fi; \ | ||
170 | }; \ | ||
171 | if test "$$package_gnu" = "yes"; then \ | ||
172 | package_prefix='GNU '; \ | ||
173 | else \ | ||
174 | package_prefix=''; \ | ||
175 | fi; \ | ||
133 | if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ | 176 | if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ |
134 | msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ | 177 | msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ |
135 | else \ | 178 | else \ |
136 | msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ | 179 | msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ |
137 | fi; \ | 180 | fi; \ |
138 | $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ | 181 | case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ |
139 | --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ | 182 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ |
140 | --files-from=$(srcdir)/POTFILES.in \ | 183 | $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ |
141 | --copyright-holder='$(COPYRIGHT_HOLDER)' \ | 184 | --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ |
142 | --msgid-bugs-address="$$msgid_bugs_address" | 185 | --files-from=$(srcdir)/POTFILES.in \ |
186 | --copyright-holder='$(COPYRIGHT_HOLDER)' \ | ||
187 | --msgid-bugs-address="$$msgid_bugs_address" \ | ||
188 | ;; \ | ||
189 | *) \ | ||
190 | $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ | ||
191 | --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ | ||
192 | --files-from=$(srcdir)/POTFILES.in \ | ||
193 | --copyright-holder='$(COPYRIGHT_HOLDER)' \ | ||
194 | --package-name="$${package_prefix}@PACKAGE@" \ | ||
195 | --package-version='@VERSION@' \ | ||
196 | --msgid-bugs-address="$$msgid_bugs_address" \ | ||
197 | ;; \ | ||
198 | esac | ||
143 | test ! -f $(DOMAIN).po || { \ | 199 | test ! -f $(DOMAIN).po || { \ |
144 | if test -f $(srcdir)/$(DOMAIN).pot; then \ | 200 | if test -f $(srcdir)/$(DOMAIN).pot; then \ |
145 | sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ | 201 | sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ |
@@ -163,12 +219,20 @@ $(srcdir)/$(DOMAIN).pot: | |||
163 | 219 | ||
164 | # This target rebuilds a PO file if $(DOMAIN).pot has changed. | 220 | # This target rebuilds a PO file if $(DOMAIN).pot has changed. |
165 | # Note that a PO file is not touched if it doesn't need to be changed. | 221 | # Note that a PO file is not touched if it doesn't need to be changed. |
166 | $(POFILES): $(srcdir)/$(DOMAIN).pot | 222 | $(POFILES): $(POFILESDEPS) |
167 | @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ | 223 | @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ |
168 | if test -f "$(srcdir)/$${lang}.po"; then \ | 224 | if test -f "$(srcdir)/$${lang}.po"; then \ |
225 | test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \ | ||
169 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | 226 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
170 | echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ | 227 | echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ |
171 | cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ | 228 | cd $(srcdir) \ |
229 | && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ | ||
230 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ | ||
231 | $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ | ||
232 | *) \ | ||
233 | $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ | ||
234 | esac; \ | ||
235 | }; \ | ||
172 | else \ | 236 | else \ |
173 | $(MAKE) $${lang}.po-create; \ | 237 | $(MAKE) $${lang}.po-create; \ |
174 | fi | 238 | fi |
@@ -191,7 +255,6 @@ install-data: install-data-@USE_NLS@ | |||
191 | fi | 255 | fi |
192 | install-data-no: all | 256 | install-data-no: all |
193 | install-data-yes: all | 257 | install-data-yes: all |
194 | $(mkdir_p) $(DESTDIR)$(datadir) | ||
195 | @catalogs='$(CATALOGS)'; \ | 258 | @catalogs='$(CATALOGS)'; \ |
196 | for cat in $$catalogs; do \ | 259 | for cat in $$catalogs; do \ |
197 | cat=`basename $$cat`; \ | 260 | cat=`basename $$cat`; \ |
@@ -243,7 +306,6 @@ installdirs-data: installdirs-data-@USE_NLS@ | |||
243 | fi | 306 | fi |
244 | installdirs-data-no: | 307 | installdirs-data-no: |
245 | installdirs-data-yes: | 308 | installdirs-data-yes: |
246 | $(mkdir_p) $(DESTDIR)$(datadir) | ||
247 | @catalogs='$(CATALOGS)'; \ | 309 | @catalogs='$(CATALOGS)'; \ |
248 | for cat in $$catalogs; do \ | 310 | for cat in $$catalogs; do \ |
249 | cat=`basename $$cat`; \ | 311 | cat=`basename $$cat`; \ |
@@ -321,7 +383,7 @@ maintainer-clean: distclean | |||
321 | 383 | ||
322 | distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) | 384 | distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) |
323 | dist distdir: | 385 | dist distdir: |
324 | $(MAKE) update-po | 386 | test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) |
325 | @$(MAKE) dist2 | 387 | @$(MAKE) dist2 |
326 | # This is a separate target because 'update-po' must be executed before. | 388 | # This is a separate target because 'update-po' must be executed before. |
327 | dist2: stamp-po $(DISTFILES) | 389 | dist2: stamp-po $(DISTFILES) |
@@ -369,9 +431,15 @@ update-po: Makefile | |||
369 | tmpdir=`pwd`; \ | 431 | tmpdir=`pwd`; \ |
370 | echo "$$lang:"; \ | 432 | echo "$$lang:"; \ |
371 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | 433 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
372 | echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ | 434 | echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ |
373 | cd $(srcdir); \ | 435 | cd $(srcdir); \ |
374 | if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ | 436 | if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ |
437 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ | ||
438 | $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ | ||
439 | *) \ | ||
440 | $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ | ||
441 | esac; \ | ||
442 | }; then \ | ||
375 | if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ | 443 | if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ |
376 | rm -f $$tmpdir/$$lang.new.po; \ | 444 | rm -f $$tmpdir/$$lang.new.po; \ |
377 | else \ | 445 | else \ |
@@ -392,9 +460,13 @@ $(DUMMYPOFILES): | |||
392 | update-gmo: Makefile $(GMOFILES) | 460 | update-gmo: Makefile $(GMOFILES) |
393 | @: | 461 | @: |
394 | 462 | ||
463 | # Recreate Makefile by invoking config.status. Explicitly invoke the shell, | ||
464 | # because execution permission bits may not work on the current file system. | ||
465 | # Use @SHELL@, which is the shell determined by autoconf for the use by its | ||
466 | # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. | ||
395 | Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ | 467 | Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ |
396 | cd $(top_builddir) \ | 468 | cd $(top_builddir) \ |
397 | && $(SHELL) ./config.status $(subdir)/$@.in po-directories | 469 | && @SHELL@ ./config.status $(subdir)/$@.in po-directories |
398 | 470 | ||
399 | force: | 471 | force: |
400 | 472 | ||