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