diff options
Diffstat (limited to 'po/Makefile.in.in')
-rw-r--r-- | po/Makefile.in.in | 72 |
1 files changed, 51 insertions, 21 deletions
diff --git a/po/Makefile.in.in b/po/Makefile.in.in index fce63a6e..38c293d2 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in | |||
@@ -1,20 +1,19 @@ | |||
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-2007, 2009-2010 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 | # Copying and distribution of this file, with or without modification, |
5 | # be used in projects which are not available under the GNU General Public | 5 | # are permitted in any medium without royalty provided the copyright |
6 | # License but which still want to provide support for the GNU gettext | 6 | # notice and this notice are preserved. This file is offered as-is, |
7 | # functionality. | 7 | # without any warranty. |
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. | ||
10 | # | 8 | # |
11 | # Origin: gettext-0.18.2 | 9 | # Origin: gettext-0.19.8 |
12 | GETTEXT_MACRO_VERSION = 0.18 | 10 | GETTEXT_MACRO_VERSION = 0.19 |
13 | 11 | ||
14 | PACKAGE = @PACKAGE@ | 12 | PACKAGE = @PACKAGE@ |
15 | VERSION = @VERSION@ | 13 | VERSION = @VERSION@ |
16 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | 14 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ |
17 | 15 | ||
16 | SED = @SED@ | ||
18 | SHELL = /bin/sh | 17 | SHELL = /bin/sh |
19 | @SET_MAKE@ | 18 | @SET_MAKE@ |
20 | 19 | ||
@@ -44,6 +43,11 @@ install_sh = $(SHELL) @install_sh@ | |||
44 | MKDIR_P = @MKDIR_P@ | 43 | MKDIR_P = @MKDIR_P@ |
45 | mkdir_p = @mkdir_p@ | 44 | mkdir_p = @mkdir_p@ |
46 | 45 | ||
46 | # When building gettext-tools, we prefer to use the built programs | ||
47 | # rather than installed programs. However, we can't do that when we | ||
48 | # are cross compiling. | ||
49 | CROSS_COMPILING = @CROSS_COMPILING@ | ||
50 | |||
47 | GMSGFMT_ = @GMSGFMT@ | 51 | GMSGFMT_ = @GMSGFMT@ |
48 | GMSGFMT_no = @GMSGFMT@ | 52 | GMSGFMT_no = @GMSGFMT@ |
49 | GMSGFMT_yes = @GMSGFMT_015@ | 53 | GMSGFMT_yes = @GMSGFMT_015@ |
@@ -76,6 +80,16 @@ POTFILES = \ | |||
76 | 80 | ||
77 | CATALOGS = @CATALOGS@ | 81 | CATALOGS = @CATALOGS@ |
78 | 82 | ||
83 | POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot | ||
84 | POFILESDEPS_yes = $(POFILESDEPS_) | ||
85 | POFILESDEPS_no = | ||
86 | POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT)) | ||
87 | |||
88 | DISTFILESDEPS_ = update-po | ||
89 | DISTFILESDEPS_yes = $(DISTFILESDEPS_) | ||
90 | DISTFILESDEPS_no = | ||
91 | DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) | ||
92 | |||
79 | # Makevars gets inserted here. (Don't remove this line!) | 93 | # Makevars gets inserted here. (Don't remove this line!) |
80 | 94 | ||
81 | .SUFFIXES: | 95 | .SUFFIXES: |
@@ -142,15 +156,25 @@ stamp-po: $(srcdir)/$(DOMAIN).pot | |||
142 | # heuristic whether some file in the top level directory mentions "GNU xyz". | 156 | # heuristic whether some file in the top level directory mentions "GNU xyz". |
143 | # If GNU 'find' is available, we avoid grepping through monster files. | 157 | # If GNU 'find' is available, we avoid grepping through monster files. |
144 | $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed | 158 | $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed |
145 | if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ | 159 | package_gnu="$(PACKAGE_GNU)"; \ |
146 | LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \ | 160 | test -n "$$package_gnu" || { \ |
147 | else \ | 161 | if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ |
148 | LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ | 162 | LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \ |
149 | fi; \ | 163 | -size -10000000c -exec grep 'GNU @PACKAGE@' \ |
150 | } | grep -v 'libtool:' >/dev/null; then \ | 164 | /dev/null '{}' ';' 2>/dev/null; \ |
151 | package_gnu='GNU '; \ | 165 | else \ |
166 | LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ | ||
167 | fi; \ | ||
168 | } | grep -v 'libtool:' >/dev/null; then \ | ||
169 | package_gnu=yes; \ | ||
170 | else \ | ||
171 | package_gnu=no; \ | ||
172 | fi; \ | ||
173 | }; \ | ||
174 | if test "$$package_gnu" = "yes"; then \ | ||
175 | package_prefix='GNU '; \ | ||
152 | else \ | 176 | else \ |
153 | package_gnu=''; \ | 177 | package_prefix=''; \ |
154 | fi; \ | 178 | fi; \ |
155 | if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ | 179 | if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ |
156 | msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ | 180 | msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ |
@@ -170,12 +194,17 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed | |||
170 | --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ | 194 | --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ |
171 | --files-from=$(srcdir)/POTFILES.in \ | 195 | --files-from=$(srcdir)/POTFILES.in \ |
172 | --copyright-holder='$(COPYRIGHT_HOLDER)' \ | 196 | --copyright-holder='$(COPYRIGHT_HOLDER)' \ |
173 | --package-name="$${package_gnu}@PACKAGE@" \ | 197 | --package-name="$${package_prefix}@PACKAGE@" \ |
174 | --package-version='@VERSION@' \ | 198 | --package-version='@VERSION@' \ |
175 | --msgid-bugs-address="$$msgid_bugs_address" \ | 199 | --msgid-bugs-address="$$msgid_bugs_address" \ |
176 | ;; \ | 200 | ;; \ |
177 | esac | 201 | esac |
178 | test ! -f $(DOMAIN).po || { \ | 202 | test ! -f $(DOMAIN).po || { \ |
203 | if test -f $(srcdir)/$(DOMAIN).pot-header; then \ | ||
204 | sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \ | ||
205 | cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \ | ||
206 | rm -f $(DOMAIN).1po; \ | ||
207 | fi; \ | ||
179 | if test -f $(srcdir)/$(DOMAIN).pot; then \ | 208 | if test -f $(srcdir)/$(DOMAIN).pot; then \ |
180 | sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ | 209 | sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ |
181 | sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ | 210 | sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ |
@@ -198,13 +227,14 @@ $(srcdir)/$(DOMAIN).pot: | |||
198 | 227 | ||
199 | # This target rebuilds a PO file if $(DOMAIN).pot has changed. | 228 | # This target rebuilds a PO file if $(DOMAIN).pot has changed. |
200 | # Note that a PO file is not touched if it doesn't need to be changed. | 229 | # Note that a PO file is not touched if it doesn't need to be changed. |
201 | $(POFILES): $(srcdir)/$(DOMAIN).pot | 230 | $(POFILES): $(POFILESDEPS) |
202 | @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ | 231 | @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ |
203 | if test -f "$(srcdir)/$${lang}.po"; then \ | 232 | if test -f "$(srcdir)/$${lang}.po"; then \ |
233 | test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \ | ||
204 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | 234 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
205 | echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ | 235 | echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ |
206 | cd $(srcdir) \ | 236 | cd $(srcdir) \ |
207 | && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ | 237 | && { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ |
208 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ | 238 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ |
209 | $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ | 239 | $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ |
210 | *) \ | 240 | *) \ |
@@ -361,7 +391,7 @@ maintainer-clean: distclean | |||
361 | 391 | ||
362 | distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) | 392 | distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) |
363 | dist distdir: | 393 | dist distdir: |
364 | $(MAKE) update-po | 394 | test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) |
365 | @$(MAKE) dist2 | 395 | @$(MAKE) dist2 |
366 | # This is a separate target because 'update-po' must be executed before. | 396 | # This is a separate target because 'update-po' must be executed before. |
367 | dist2: stamp-po $(DISTFILES) | 397 | dist2: stamp-po $(DISTFILES) |
@@ -405,7 +435,7 @@ update-po: Makefile | |||
405 | 435 | ||
406 | .nop.po-update: | 436 | .nop.po-update: |
407 | @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ | 437 | @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ |
408 | if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ | 438 | if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ |
409 | tmpdir=`pwd`; \ | 439 | tmpdir=`pwd`; \ |
410 | echo "$$lang:"; \ | 440 | echo "$$lang:"; \ |
411 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | 441 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |