aboutsummaryrefslogtreecommitdiff
path: root/po/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'po/Makefile.in')
-rw-r--r--po/Makefile.in108
1 files changed, 78 insertions, 30 deletions
diff --git a/po/Makefile.in b/po/Makefile.in
index c7659930..0d77d391 100644
--- a/po/Makefile.in
+++ b/po/Makefile.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-2003 by Ulrich Drepper <drepper@gnu.ai.mit.edu> 2# Copyright (C) 1995-1997, 2000-2006 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,10 +8,11 @@
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.13 11# Origin: gettext-0.16
12 12
13PACKAGE = gnunet-gtk 13PACKAGE = gnunet-gtk
14VERSION = 0.7.1b 14VERSION = 0.7.1b
15PACKAGE_BUGREPORT = bug-gnunet@gnu.org
15 16
16SHELL = /bin/sh 17SHELL = /bin/sh
17 18
@@ -22,18 +23,38 @@ top_srcdir = ..
22 23
23prefix = /home/grothoff/ 24prefix = /home/grothoff/
24exec_prefix = ${prefix} 25exec_prefix = ${prefix}
26datarootdir = @datarootdir@
25datadir = ${prefix}/share 27datadir = ${prefix}/share
26localedir = $(datadir)/locale 28localedir = ${datadir}/locale
27gettextsrcdir = $(datadir)/gettext/po 29gettextsrcdir = $(datadir)/gettext/po
28 30
29INSTALL = /usr/bin/install -c 31INSTALL = /usr/bin/install -c
30INSTALL_DATA = ${INSTALL} -m 644 32INSTALL_DATA = ${INSTALL} -m 644
31MKINSTALLDIRS = $(top_builddir)/./mkinstalldirs
32mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
33 33
34GMSGFMT = /usr/bin/msgfmt 34# We use $(mkdir_p).
35MSGFMT = /usr/bin/msgfmt 35# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
36XGETTEXT = /usr/bin/xgettext 36# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
37# /home/grothoff/svn/gnunet-gtk/install-sh does not start with $(SHELL), so we add it.
38# In automake >= 1.10, mkdir -p -- is derived from ${MKDIR_P}, which is defined
39# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
40# versions, $(mkinstalldirs) and $(install_sh) are unused.
41mkinstalldirs = $(SHELL) /home/grothoff/svn/gnunet-gtk/install-sh -d
42install_sh = $(SHELL) /home/grothoff/svn/gnunet-gtk/install-sh
43MKDIR_P = @MKDIR_P@
44mkdir_p = mkdir -p --
45
46GMSGFMT_ = /usr/bin/msgfmt
47GMSGFMT_no = /usr/bin/msgfmt
48GMSGFMT_yes = /usr/bin/msgfmt
49GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
50MSGFMT_ = /usr/bin/msgfmt
51MSGFMT_no = /usr/bin/msgfmt
52MSGFMT_yes = /usr/bin/msgfmt
53MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
54XGETTEXT_ = /usr/bin/xgettext
55XGETTEXT_no = /usr/bin/xgettext
56XGETTEXT_yes = /usr/bin/xgettext
57XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
37MSGMERGE = msgmerge 58MSGMERGE = msgmerge
38MSGMERGE_UPDATE = /usr/bin/msgmerge --update 59MSGMERGE_UPDATE = /usr/bin/msgmerge --update
39MSGINIT = msginit 60MSGINIT = msginit
@@ -46,7 +67,7 @@ UPDATEPOFILES = @UPDATEPOFILES@
46DUMMYPOFILES = @DUMMYPOFILES@ 67DUMMYPOFILES = @DUMMYPOFILES@
47DISTFILES.common = Makefile.in.in remove-potcdate.sin \ 68DISTFILES.common = Makefile.in.in remove-potcdate.sin \
48$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) 69$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
49DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \ 70DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
50$(POFILES) $(GMOFILES) \ 71$(POFILES) $(GMOFILES) \
51$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) 72$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
52 73
@@ -57,7 +78,7 @@ CATALOGS = @CATALOGS@
57# Makevars gets inserted here. (Don't remove this line!) 78# Makevars gets inserted here. (Don't remove this line!)
58 79
59.SUFFIXES: 80.SUFFIXES:
60.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update 81.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
61 82
62.po.mo: 83.po.mo:
63 @echo "$(MSGFMT) -c -o $@ $<"; \ 84 @echo "$(MSGFMT) -c -o $@ $<"; \
@@ -79,6 +100,12 @@ all: all-yes
79all-yes: stamp-po 100all-yes: stamp-po
80all-no: 101all-no:
81 102
103# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
104# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
105# we don't want to bother translators with empty POT files). We assume that
106# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
107# In this case, stamp-po is a nop (i.e. a phony target).
108
82# stamp-po is a timestamp denoting the last time at which the CATALOGS have 109# stamp-po is a timestamp denoting the last time at which the CATALOGS have
83# been loosely updated. Its purpose is that when a developer or translator 110# been loosely updated. Its purpose is that when a developer or translator
84# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, 111# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
@@ -88,10 +115,13 @@ all-no:
88# $(POFILES) has been designed to not touch files that don't need to be 115# $(POFILES) has been designed to not touch files that don't need to be
89# changed. 116# changed.
90stamp-po: $(srcdir)/$(DOMAIN).pot 117stamp-po: $(srcdir)/$(DOMAIN).pot
91 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) 118 test ! -f $(srcdir)/$(DOMAIN).pot || \
92 @echo "touch stamp-po" 119 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
93 @echo timestamp > stamp-poT 120 @test ! -f $(srcdir)/$(DOMAIN).pot || { \
94 @mv stamp-poT stamp-po 121 echo "touch stamp-po" && \
122 echo timestamp > stamp-poT && \
123 mv stamp-poT stamp-po; \
124 }
95 125
96# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', 126# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
97# otherwise packages like GCC can not be built if only parts of the source 127# otherwise packages like GCC can not be built if only parts of the source
@@ -100,11 +130,16 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
100# This target rebuilds $(DOMAIN).pot; it is an expensive operation. 130# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
101# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. 131# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
102$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed 132$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
133 if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
134 msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
135 else \
136 msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
137 fi; \
103 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ 138 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
104 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ 139 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
105 --files-from=$(srcdir)/POTFILES.in \ 140 --files-from=$(srcdir)/POTFILES.in \
106 --copyright-holder='$(COPYRIGHT_HOLDER)' \ 141 --copyright-holder='$(COPYRIGHT_HOLDER)' \
107 --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)' 142 --msgid-bugs-address="$$msgid_bugs_address"
108 test ! -f $(DOMAIN).po || { \ 143 test ! -f $(DOMAIN).po || { \
109 if test -f $(srcdir)/$(DOMAIN).pot; then \ 144 if test -f $(srcdir)/$(DOMAIN).pot; then \
110 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ 145 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
@@ -130,16 +165,20 @@ $(srcdir)/$(DOMAIN).pot:
130# Note that a PO file is not touched if it doesn't need to be changed. 165# Note that a PO file is not touched if it doesn't need to be changed.
131$(POFILES): $(srcdir)/$(DOMAIN).pot 166$(POFILES): $(srcdir)/$(DOMAIN).pot
132 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ 167 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
133 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 168 if test -f "$(srcdir)/$${lang}.po"; then \
134 echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ 169 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
135 cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot 170 echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
171 cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
172 else \
173 $(MAKE) $${lang}.po-create; \
174 fi
136 175
137 176
138install: install-exec install-data 177install: install-exec install-data
139install-exec: 178install-exec:
140install-data: install-data-yes 179install-data: install-data-yes
141 if test "$(PACKAGE)" = "gettext-tools"; then \ 180 if test "$(PACKAGE)" = "gettext-tools"; then \
142 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ 181 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
143 for file in $(DISTFILES.common) Makevars.template; do \ 182 for file in $(DISTFILES.common) Makevars.template; do \
144 $(INSTALL_DATA) $(srcdir)/$$file \ 183 $(INSTALL_DATA) $(srcdir)/$$file \
145 $(DESTDIR)$(gettextsrcdir)/$$file; \ 184 $(DESTDIR)$(gettextsrcdir)/$$file; \
@@ -152,13 +191,13 @@ install-data: install-data-yes
152 fi 191 fi
153install-data-no: all 192install-data-no: all
154install-data-yes: all 193install-data-yes: all
155 $(mkinstalldirs) $(DESTDIR)$(datadir) 194 $(mkdir_p) $(DESTDIR)$(datadir)
156 @catalogs='$(CATALOGS)'; \ 195 @catalogs='$(CATALOGS)'; \
157 for cat in $$catalogs; do \ 196 for cat in $$catalogs; do \
158 cat=`basename $$cat`; \ 197 cat=`basename $$cat`; \
159 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ 198 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
160 dir=$(localedir)/$$lang/LC_MESSAGES; \ 199 dir=$(localedir)/$$lang/LC_MESSAGES; \
161 $(mkinstalldirs) $(DESTDIR)$$dir; \ 200 $(mkdir_p) $(DESTDIR)$$dir; \
162 if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ 201 if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
163 $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ 202 $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
164 echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ 203 echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
@@ -198,19 +237,19 @@ installdirs: installdirs-exec installdirs-data
198installdirs-exec: 237installdirs-exec:
199installdirs-data: installdirs-data-yes 238installdirs-data: installdirs-data-yes
200 if test "$(PACKAGE)" = "gettext-tools"; then \ 239 if test "$(PACKAGE)" = "gettext-tools"; then \
201 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ 240 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
202 else \ 241 else \
203 : ; \ 242 : ; \
204 fi 243 fi
205installdirs-data-no: 244installdirs-data-no:
206installdirs-data-yes: 245installdirs-data-yes:
207 $(mkinstalldirs) $(DESTDIR)$(datadir) 246 $(mkdir_p) $(DESTDIR)$(datadir)
208 @catalogs='$(CATALOGS)'; \ 247 @catalogs='$(CATALOGS)'; \
209 for cat in $$catalogs; do \ 248 for cat in $$catalogs; do \
210 cat=`basename $$cat`; \ 249 cat=`basename $$cat`; \
211 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ 250 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
212 dir=$(localedir)/$$lang/LC_MESSAGES; \ 251 dir=$(localedir)/$$lang/LC_MESSAGES; \
213 $(mkinstalldirs) $(DESTDIR)$$dir; \ 252 $(mkdir_p) $(DESTDIR)$$dir; \
214 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ 253 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
215 if test -n "$$lc"; then \ 254 if test -n "$$lc"; then \
216 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ 255 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
@@ -285,11 +324,14 @@ dist distdir:
285 $(MAKE) update-po 324 $(MAKE) update-po
286 @$(MAKE) dist2 325 @$(MAKE) dist2
287# This is a separate target because 'update-po' must be executed before. 326# This is a separate target because 'update-po' must be executed before.
288dist2: $(DISTFILES) 327dist2: stamp-po $(DISTFILES)
289 dists="$(DISTFILES)"; \ 328 dists="$(DISTFILES)"; \
290 if test "$(PACKAGE)" = "gettext-tools"; then \ 329 if test "$(PACKAGE)" = "gettext-tools"; then \
291 dists="$$dists Makevars.template"; \ 330 dists="$$dists Makevars.template"; \
292 fi; \ 331 fi; \
332 if test -f $(srcdir)/$(DOMAIN).pot; then \
333 dists="$$dists $(DOMAIN).pot stamp-po"; \
334 fi; \
293 if test -f $(srcdir)/ChangeLog; then \ 335 if test -f $(srcdir)/ChangeLog; then \
294 dists="$$dists ChangeLog"; \ 336 dists="$$dists ChangeLog"; \
295 fi; \ 337 fi; \
@@ -301,9 +343,9 @@ dist2: $(DISTFILES)
301 if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ 343 if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
302 for file in $$dists; do \ 344 for file in $$dists; do \
303 if test -f $$file; then \ 345 if test -f $$file; then \
304 cp -p $$file $(distdir); \ 346 cp -p $$file $(distdir) || exit 1; \
305 else \ 347 else \
306 cp -p $(srcdir)/$$file $(distdir); \ 348 cp -p $(srcdir)/$$file $(distdir) || exit 1; \
307 fi; \ 349 fi; \
308 done 350 done
309 351
@@ -312,6 +354,13 @@ update-po: Makefile
312 test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) 354 test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
313 $(MAKE) update-gmo 355 $(MAKE) update-gmo
314 356
357# General rule for creating PO files.
358
359.nop.po-create:
360 @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
361 echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
362 exit 1
363
315# General rule for updating PO files. 364# General rule for updating PO files.
316 365
317.nop.po-update: 366.nop.po-update:
@@ -343,10 +392,9 @@ $(DUMMYPOFILES):
343update-gmo: Makefile $(GMOFILES) 392update-gmo: Makefile $(GMOFILES)
344 @: 393 @:
345 394
346Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@ 395Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
347 cd $(top_builddir) \ 396 cd $(top_builddir) \
348 && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ 397 && $(SHELL) ./config.status $(subdir)/$@.in po-directories
349 $(SHELL) ./config.status
350 398
351force: 399force:
352 400