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.in61
1 files changed, 16 insertions, 45 deletions
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index 1f5cc285..75c5d469 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-2005 by Ulrich Drepper <drepper@gnu.ai.mit.edu> 2# Copyright (C) 1995-1997, 2000-2003 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,11 +8,10 @@
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.14.4 11# Origin: gettext-0.13
12 12
13PACKAGE = @PACKAGE@ 13PACKAGE = @PACKAGE@
14VERSION = @VERSION@ 14VERSION = @VERSION@
15PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
16 15
17SHELL = /bin/sh 16SHELL = /bin/sh
18@SET_MAKE@ 17@SET_MAKE@
@@ -47,7 +46,7 @@ UPDATEPOFILES = @UPDATEPOFILES@
47DUMMYPOFILES = @DUMMYPOFILES@ 46DUMMYPOFILES = @DUMMYPOFILES@
48DISTFILES.common = Makefile.in.in remove-potcdate.sin \ 47DISTFILES.common = Makefile.in.in remove-potcdate.sin \
49$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) 48$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
50DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ 49DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \
51$(POFILES) $(GMOFILES) \ 50$(POFILES) $(GMOFILES) \
52$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) 51$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
53 52
@@ -58,7 +57,7 @@ CATALOGS = @CATALOGS@
58# Makevars gets inserted here. (Don't remove this line!) 57# Makevars gets inserted here. (Don't remove this line!)
59 58
60.SUFFIXES: 59.SUFFIXES:
61.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update 60.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
62 61
63.po.mo: 62.po.mo:
64 @echo "$(MSGFMT) -c -o $@ $<"; \ 63 @echo "$(MSGFMT) -c -o $@ $<"; \
@@ -80,12 +79,6 @@ all: all-@USE_NLS@
80all-yes: stamp-po 79all-yes: stamp-po
81all-no: 80all-no:
82 81
83# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
84# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
85# we don't want to bother translators with empty POT files). We assume that
86# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
87# In this case, stamp-po is a nop (i.e. a phony target).
88
89# stamp-po is a timestamp denoting the last time at which the CATALOGS have 82# stamp-po is a timestamp denoting the last time at which the CATALOGS have
90# been loosely updated. Its purpose is that when a developer or translator 83# been loosely updated. Its purpose is that when a developer or translator
91# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, 84# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
@@ -95,13 +88,10 @@ all-no:
95# $(POFILES) has been designed to not touch files that don't need to be 88# $(POFILES) has been designed to not touch files that don't need to be
96# changed. 89# changed.
97stamp-po: $(srcdir)/$(DOMAIN).pot 90stamp-po: $(srcdir)/$(DOMAIN).pot
98 test ! -f $(srcdir)/$(DOMAIN).pot || \ 91 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
99 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) 92 @echo "touch stamp-po"
100 @test ! -f $(srcdir)/$(DOMAIN).pot || { \ 93 @echo timestamp > stamp-poT
101 echo "touch stamp-po" && \ 94 @mv stamp-poT stamp-po
102 echo timestamp > stamp-poT && \
103 mv stamp-poT stamp-po; \
104 }
105 95
106# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', 96# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
107# otherwise packages like GCC can not be built if only parts of the source 97# otherwise packages like GCC can not be built if only parts of the source
@@ -110,16 +100,11 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
110# This target rebuilds $(DOMAIN).pot; it is an expensive operation. 100# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
111# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. 101# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
112$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed 102$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
113 if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
114 msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
115 else \
116 msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
117 fi; \
118 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ 103 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
119 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ 104 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
120 --files-from=$(srcdir)/POTFILES.in \ 105 --files-from=$(srcdir)/POTFILES.in \
121 --copyright-holder='$(COPYRIGHT_HOLDER)' \ 106 --copyright-holder='$(COPYRIGHT_HOLDER)' \
122 --msgid-bugs-address="$$msgid_bugs_address" 107 --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)'
123 test ! -f $(DOMAIN).po || { \ 108 test ! -f $(DOMAIN).po || { \
124 if test -f $(srcdir)/$(DOMAIN).pot; then \ 109 if test -f $(srcdir)/$(DOMAIN).pot; then \
125 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ 110 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
@@ -145,13 +130,9 @@ $(srcdir)/$(DOMAIN).pot:
145# Note that a PO file is not touched if it doesn't need to be changed. 130# Note that a PO file is not touched if it doesn't need to be changed.
146$(POFILES): $(srcdir)/$(DOMAIN).pot 131$(POFILES): $(srcdir)/$(DOMAIN).pot
147 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ 132 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
148 if test -f "$(srcdir)/$${lang}.po"; then \ 133 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
149 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 134 echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
150 echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ 135 cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
151 cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
152 else \
153 $(MAKE) $${lang}.po-create; \
154 fi
155 136
156 137
157install: install-exec install-data 138install: install-exec install-data
@@ -304,14 +285,11 @@ dist distdir:
304 $(MAKE) update-po 285 $(MAKE) update-po
305 @$(MAKE) dist2 286 @$(MAKE) dist2
306# This is a separate target because 'update-po' must be executed before. 287# This is a separate target because 'update-po' must be executed before.
307dist2: stamp-po $(DISTFILES) 288dist2: $(DISTFILES)
308 dists="$(DISTFILES)"; \ 289 dists="$(DISTFILES)"; \
309 if test "$(PACKAGE)" = "gettext-tools"; then \ 290 if test "$(PACKAGE)" = "gettext-tools"; then \
310 dists="$$dists Makevars.template"; \ 291 dists="$$dists Makevars.template"; \
311 fi; \ 292 fi; \
312 if test -f $(srcdir)/$(DOMAIN).pot; then \
313 dists="$$dists $(DOMAIN).pot stamp-po"; \
314 fi; \
315 if test -f $(srcdir)/ChangeLog; then \ 293 if test -f $(srcdir)/ChangeLog; then \
316 dists="$$dists ChangeLog"; \ 294 dists="$$dists ChangeLog"; \
317 fi; \ 295 fi; \
@@ -323,9 +301,9 @@ dist2: stamp-po $(DISTFILES)
323 if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ 301 if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
324 for file in $$dists; do \ 302 for file in $$dists; do \
325 if test -f $$file; then \ 303 if test -f $$file; then \
326 cp -p $$file $(distdir) || exit 1; \ 304 cp -p $$file $(distdir); \
327 else \ 305 else \
328 cp -p $(srcdir)/$$file $(distdir) || exit 1; \ 306 cp -p $(srcdir)/$$file $(distdir); \
329 fi; \ 307 fi; \
330 done 308 done
331 309
@@ -334,13 +312,6 @@ update-po: Makefile
334 test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) 312 test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
335 $(MAKE) update-gmo 313 $(MAKE) update-gmo
336 314
337# General rule for creating PO files.
338
339.nop.po-create:
340 @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
341 echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
342 exit 1
343
344# General rule for updating PO files. 315# General rule for updating PO files.
345 316
346.nop.po-update: 317.nop.po-update:
@@ -372,7 +343,7 @@ $(DUMMYPOFILES):
372update-gmo: Makefile $(GMOFILES) 343update-gmo: Makefile $(GMOFILES)
373 @: 344 @:
374 345
375Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ 346Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@
376 cd $(top_builddir) \ 347 cd $(top_builddir) \
377 && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ 348 && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
378 $(SHELL) ./config.status 349 $(SHELL) ./config.status