Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/gettext/po/Makefile.in.in @ 68:5028fdace37b
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 16:23:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 68:5028fdace37b |
---|---|
1 # Makefile for PO directory in any package using GNU gettext. | |
2 # Copyright (C) 1995-2000 Ulrich Drepper <drepper@gnu.ai.mit.edu> | |
3 # Copyright (C) 2000-2023 Free Software Foundation, Inc. | |
4 # | |
5 # Copying and distribution of this file, with or without modification, | |
6 # are permitted in any medium without royalty provided the copyright | |
7 # notice and this notice are preserved. This file is offered as-is, | |
8 # without any warranty. | |
9 # | |
10 # Origin: gettext-0.22 | |
11 GETTEXT_MACRO_VERSION = 0.20 | |
12 | |
13 PACKAGE = @PACKAGE@ | |
14 VERSION = @VERSION@ | |
15 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | |
16 | |
17 SED = @SED@ | |
18 SHELL = /bin/sh | |
19 @SET_MAKE@ | |
20 | |
21 srcdir = @srcdir@ | |
22 top_srcdir = @top_srcdir@ | |
23 VPATH = @srcdir@ | |
24 | |
25 prefix = @prefix@ | |
26 exec_prefix = @exec_prefix@ | |
27 datarootdir = @datarootdir@ | |
28 datadir = @datadir@ | |
29 localedir = @localedir@ | |
30 gettextsrcdir = $(datadir)/gettext/po | |
31 | |
32 INSTALL = @INSTALL@ | |
33 INSTALL_DATA = @INSTALL_DATA@ | |
34 | |
35 # We use $(mkdir_p). | |
36 # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as | |
37 # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, | |
38 # @install_sh@ does not start with $(SHELL), so we add it. | |
39 # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined | |
40 # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake | |
41 # versions, $(mkinstalldirs) and $(install_sh) are unused. | |
42 mkinstalldirs = $(SHELL) @install_sh@ -d | |
43 install_sh = $(SHELL) @install_sh@ | |
44 MKDIR_P = @MKDIR_P@ | |
45 mkdir_p = @mkdir_p@ | |
46 | |
47 # When building gettext-tools, we prefer to use the built programs | |
48 # rather than installed programs. However, we can't do that when we | |
49 # are cross compiling. | |
50 CROSS_COMPILING = @CROSS_COMPILING@ | |
51 | |
52 GMSGFMT_ = @GMSGFMT@ | |
53 GMSGFMT_no = @GMSGFMT@ | |
54 GMSGFMT_yes = @GMSGFMT_015@ | |
55 GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) | |
56 XGETTEXT_ = @XGETTEXT@ | |
57 XGETTEXT_no = @XGETTEXT@ | |
58 XGETTEXT_yes = @XGETTEXT_015@ | |
59 XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) | |
60 MSGMERGE = @MSGMERGE@ | |
61 MSGMERGE_UPDATE = @MSGMERGE@ --update | |
62 MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ | |
63 MSGINIT = msginit | |
64 MSGCONV = msgconv | |
65 MSGFILTER = msgfilter | |
66 | |
67 POFILES = @POFILES@ | |
68 GMOFILES = @GMOFILES@ | |
69 UPDATEPOFILES = @UPDATEPOFILES@ | |
70 DUMMYPOFILES = @DUMMYPOFILES@ | |
71 DISTFILES.common = Makefile.in.in remove-potcdate.sin \ | |
72 $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) | |
73 DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ | |
74 $(POFILES) $(GMOFILES) \ | |
75 $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) | |
76 | |
77 POTFILES = \ | |
78 | |
79 CATALOGS = @CATALOGS@ | |
80 | |
81 POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot | |
82 POFILESDEPS_yes = $(POFILESDEPS_) | |
83 POFILESDEPS_no = | |
84 POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT)) | |
85 | |
86 DISTFILESDEPS_ = update-po | |
87 DISTFILESDEPS_yes = $(DISTFILESDEPS_) | |
88 DISTFILESDEPS_no = | |
89 DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) | |
90 | |
91 # Makevars gets inserted here. (Don't remove this line!) | |
92 | |
93 all: all-@USE_NLS@ | |
94 | |
95 | |
96 .SUFFIXES: | |
97 .SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update | |
98 | |
99 # The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. | |
100 # The GNU Coding Standards say in | |
101 # <https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html>: | |
102 # "GNU distributions usually contain some files which are not source files | |
103 # ... . Since these files normally appear in the source directory, they | |
104 # should always appear in the source directory, not in the build directory. | |
105 # So Makefile rules to update them should put the updated files in the | |
106 # source directory." | |
107 # Therefore we put these files in the source directory, not the build directory. | |
108 | |
109 # During .po -> .gmo conversion, take into account the most recent changes to | |
110 # the .pot file. This eliminates the need to update the .po files when the | |
111 # .pot file has changed, which would be troublesome if the .po files are put | |
112 # under version control. | |
113 $(GMOFILES): $(srcdir)/$(DOMAIN).pot | |
114 .po.gmo: | |
115 @lang=`echo $* | sed -e 's,.*/,,'`; \ | |
116 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | |
117 echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \ | |
118 cd $(srcdir) && \ | |
119 rm -f $${lang}.gmo && \ | |
120 $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ | |
121 $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ | |
122 mv t-$${lang}.gmo $${lang}.gmo && \ | |
123 rm -f $${lang}.1po | |
124 | |
125 .sin.sed: | |
126 sed -e '/^#/d' $< > t-$@ | |
127 mv t-$@ $@ | |
128 | |
129 | |
130 all-yes: $(srcdir)/stamp-po | |
131 all-no: | |
132 | |
133 # Ensure that the gettext macros and this Makefile.in.in are in sync. | |
134 CHECK_MACRO_VERSION = \ | |
135 test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ | |
136 || { 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; \ | |
137 exit 1; \ | |
138 } | |
139 | |
140 # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no | |
141 # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because | |
142 # we don't want to bother translators with empty POT files). We assume that | |
143 # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. | |
144 # In this case, $(srcdir)/stamp-po is a nop (i.e. a phony target). | |
145 | |
146 # $(srcdir)/stamp-po is a timestamp denoting the last time at which the CATALOGS | |
147 # have been loosely updated. Its purpose is that when a developer or translator | |
148 # checks out the package from a version control system, and the $(DOMAIN).pot | |
149 # file is not under version control, "make" will update the $(DOMAIN).pot and | |
150 # the $(CATALOGS), but subsequent invocations of "make" will do nothing. This | |
151 # timestamp would not be necessary if updating the $(CATALOGS) would always | |
152 # touch them; however, the rule for $(POFILES) has been designed to not touch | |
153 # files that don't need to be changed. | |
154 $(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot | |
155 @$(CHECK_MACRO_VERSION) | |
156 test ! -f $(srcdir)/$(DOMAIN).pot || \ | |
157 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) | |
158 @test ! -f $(srcdir)/$(DOMAIN).pot || { \ | |
159 echo "touch $(srcdir)/stamp-po" && \ | |
160 echo timestamp > $(srcdir)/stamp-poT && \ | |
161 mv $(srcdir)/stamp-poT $(srcdir)/stamp-po; \ | |
162 } | |
163 | |
164 # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', | |
165 # otherwise packages like GCC can not be built if only parts of the source | |
166 # have been downloaded. | |
167 | |
168 # This target rebuilds $(DOMAIN).pot; it is an expensive operation. | |
169 # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. | |
170 # The determination of whether the package xyz is a GNU one is based on the | |
171 # heuristic whether some file in the top level directory mentions "GNU xyz". | |
172 # If GNU 'find' is available, we avoid grepping through monster files. | |
173 $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed | |
174 package_gnu="$(PACKAGE_GNU)"; \ | |
175 test -n "$$package_gnu" || { \ | |
176 if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ | |
177 LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \ | |
178 else \ | |
179 LC_ALL=C grep -i 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ | |
180 fi; \ | |
181 } | grep -v 'libtool:' >/dev/null; then \ | |
182 package_gnu=yes; \ | |
183 else \ | |
184 package_gnu=no; \ | |
185 fi; \ | |
186 }; \ | |
187 if test "$$package_gnu" = "yes"; then \ | |
188 package_prefix='GNU '; \ | |
189 else \ | |
190 package_prefix=''; \ | |
191 fi; \ | |
192 if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ | |
193 msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ | |
194 else \ | |
195 msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ | |
196 fi; \ | |
197 case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ | |
198 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ | |
199 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ | |
200 --add-comments=TRANSLATORS: \ | |
201 --files-from=$(srcdir)/POTFILES.in \ | |
202 --copyright-holder='$(COPYRIGHT_HOLDER)' \ | |
203 --msgid-bugs-address="$$msgid_bugs_address" \ | |
204 $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ | |
205 ;; \ | |
206 *) \ | |
207 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ | |
208 --add-comments=TRANSLATORS: \ | |
209 --files-from=$(srcdir)/POTFILES.in \ | |
210 --copyright-holder='$(COPYRIGHT_HOLDER)' \ | |
211 --package-name="$${package_prefix}@PACKAGE@" \ | |
212 --package-version='@VERSION@' \ | |
213 --msgid-bugs-address="$$msgid_bugs_address" \ | |
214 $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ | |
215 ;; \ | |
216 esac | |
217 test ! -f $(DOMAIN).po || { \ | |
218 if test -f $(srcdir)/$(DOMAIN).pot-header; then \ | |
219 sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \ | |
220 cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \ | |
221 rm -f $(DOMAIN).1po \ | |
222 || exit 1; \ | |
223 fi; \ | |
224 if test -f $(srcdir)/$(DOMAIN).pot; then \ | |
225 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ | |
226 sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ | |
227 if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ | |
228 rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ | |
229 else \ | |
230 rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ | |
231 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ | |
232 fi; \ | |
233 else \ | |
234 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ | |
235 fi; \ | |
236 } | |
237 | |
238 # This rule has no dependencies: we don't need to update $(DOMAIN).pot at | |
239 # every "make" invocation, only create it when it is missing. | |
240 # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. | |
241 $(srcdir)/$(DOMAIN).pot: | |
242 $(MAKE) $(DOMAIN).pot-update | |
243 | |
244 # This target rebuilds a PO file if $(DOMAIN).pot has changed. | |
245 # Note that a PO file is not touched if it doesn't need to be changed. | |
246 $(POFILES): $(POFILESDEPS) | |
247 @test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot | |
248 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ | |
249 if test -f "$(srcdir)/$${lang}.po"; then \ | |
250 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | |
251 echo "$${cdcmd}$(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \ | |
252 cd $(srcdir) \ | |
253 && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ | |
254 '' | 0.[0-9] | 0.[0-9].* | 0.10 | 0.10.*) \ | |
255 $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ | |
256 0.1[1-5] | 0.1[1-5].*) \ | |
257 $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ | |
258 0.1[6-7] | 0.1[6-7].*) \ | |
259 $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \ | |
260 *) \ | |
261 $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \ | |
262 esac; \ | |
263 }; \ | |
264 else \ | |
265 $(MAKE) $${lang}.po-create; \ | |
266 fi | |
267 | |
268 | |
269 install: install-exec install-data | |
270 install-exec: | |
271 install-data: install-data-@USE_NLS@ | |
272 if test "$(PACKAGE)" = "gettext-tools"; then \ | |
273 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ | |
274 for file in $(DISTFILES.common) Makevars.template; do \ | |
275 $(INSTALL_DATA) $(srcdir)/$$file \ | |
276 $(DESTDIR)$(gettextsrcdir)/$$file; \ | |
277 done; \ | |
278 for file in Makevars; do \ | |
279 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ | |
280 done; \ | |
281 else \ | |
282 : ; \ | |
283 fi | |
284 install-data-no: all | |
285 install-data-yes: all | |
286 @catalogs='$(CATALOGS)'; \ | |
287 for cat in $$catalogs; do \ | |
288 cat=`basename $$cat`; \ | |
289 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ | |
290 dir=$(localedir)/$$lang/LC_MESSAGES; \ | |
291 $(mkdir_p) $(DESTDIR)$$dir; \ | |
292 if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ | |
293 $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ | |
294 echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ | |
295 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ | |
296 if test -n "$$lc"; then \ | |
297 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ | |
298 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ | |
299 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ | |
300 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ | |
301 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ | |
302 for file in *; do \ | |
303 if test -f $$file; then \ | |
304 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ | |
305 fi; \ | |
306 done); \ | |
307 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ | |
308 else \ | |
309 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ | |
310 :; \ | |
311 else \ | |
312 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ | |
313 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ | |
314 fi; \ | |
315 fi; \ | |
316 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ | |
317 ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ | |
318 ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ | |
319 cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ | |
320 echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ | |
321 fi; \ | |
322 done; \ | |
323 done | |
324 | |
325 install-strip: install | |
326 | |
327 installdirs: installdirs-exec installdirs-data | |
328 installdirs-exec: | |
329 installdirs-data: installdirs-data-@USE_NLS@ | |
330 if test "$(PACKAGE)" = "gettext-tools"; then \ | |
331 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ | |
332 else \ | |
333 : ; \ | |
334 fi | |
335 installdirs-data-no: | |
336 installdirs-data-yes: | |
337 @catalogs='$(CATALOGS)'; \ | |
338 for cat in $$catalogs; do \ | |
339 cat=`basename $$cat`; \ | |
340 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ | |
341 dir=$(localedir)/$$lang/LC_MESSAGES; \ | |
342 $(mkdir_p) $(DESTDIR)$$dir; \ | |
343 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ | |
344 if test -n "$$lc"; then \ | |
345 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ | |
346 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ | |
347 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ | |
348 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ | |
349 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ | |
350 for file in *; do \ | |
351 if test -f $$file; then \ | |
352 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ | |
353 fi; \ | |
354 done); \ | |
355 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ | |
356 else \ | |
357 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ | |
358 :; \ | |
359 else \ | |
360 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ | |
361 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ | |
362 fi; \ | |
363 fi; \ | |
364 fi; \ | |
365 done; \ | |
366 done | |
367 | |
368 # Define this as empty until I found a useful application. | |
369 installcheck: | |
370 | |
371 uninstall: uninstall-exec uninstall-data | |
372 uninstall-exec: | |
373 uninstall-data: uninstall-data-@USE_NLS@ | |
374 if test "$(PACKAGE)" = "gettext-tools"; then \ | |
375 for file in $(DISTFILES.common) Makevars.template; do \ | |
376 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ | |
377 done; \ | |
378 else \ | |
379 : ; \ | |
380 fi | |
381 uninstall-data-no: | |
382 uninstall-data-yes: | |
383 catalogs='$(CATALOGS)'; \ | |
384 for cat in $$catalogs; do \ | |
385 cat=`basename $$cat`; \ | |
386 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ | |
387 for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ | |
388 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ | |
389 done; \ | |
390 done | |
391 | |
392 check: all | |
393 | |
394 info dvi ps pdf html tags TAGS ctags CTAGS ID: | |
395 | |
396 install-dvi install-ps install-pdf install-html: | |
397 | |
398 mostlyclean: | |
399 rm -f remove-potcdate.sed | |
400 rm -f $(srcdir)/stamp-poT | |
401 rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po | |
402 rm -fr *.o | |
403 | |
404 clean: mostlyclean | |
405 | |
406 distclean: clean | |
407 rm -f Makefile Makefile.in POTFILES | |
408 | |
409 maintainer-clean: distclean | |
410 @echo "This command is intended for maintainers to use;" | |
411 @echo "it deletes files that may require special tools to rebuild." | |
412 rm -f $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES) | |
413 | |
414 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) | |
415 dist distdir: | |
416 test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) | |
417 @$(MAKE) dist2 | |
418 # This is a separate target because 'update-po' must be executed before. | |
419 dist2: $(srcdir)/stamp-po $(DISTFILES) | |
420 @dists="$(DISTFILES)"; \ | |
421 if test "$(PACKAGE)" = "gettext-tools"; then \ | |
422 dists="$$dists Makevars.template"; \ | |
423 fi; \ | |
424 if test -f $(srcdir)/$(DOMAIN).pot; then \ | |
425 dists="$$dists $(DOMAIN).pot stamp-po"; \ | |
426 else \ | |
427 case $(XGETTEXT) in \ | |
428 :) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because a suitable 'xgettext' program was not found in PATH." 1>&2;; \ | |
429 *) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because 'xgettext' found no strings to extract. Check the contents of the POTFILES.in file and the XGETTEXT_OPTIONS in the Makevars file." 1>&2;; \ | |
430 esac; \ | |
431 fi; \ | |
432 if test -f $(srcdir)/ChangeLog; then \ | |
433 dists="$$dists ChangeLog"; \ | |
434 fi; \ | |
435 for i in 0 1 2 3 4 5 6 7 8 9; do \ | |
436 if test -f $(srcdir)/ChangeLog.$$i; then \ | |
437 dists="$$dists ChangeLog.$$i"; \ | |
438 fi; \ | |
439 done; \ | |
440 if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ | |
441 for file in $$dists; do \ | |
442 if test -f $$file; then \ | |
443 cp -p $$file $(distdir) || exit 1; \ | |
444 else \ | |
445 cp -p $(srcdir)/$$file $(distdir) || exit 1; \ | |
446 fi; \ | |
447 done | |
448 | |
449 update-po: Makefile | |
450 $(MAKE) $(DOMAIN).pot-update | |
451 test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) | |
452 $(MAKE) update-gmo | |
453 | |
454 # General rule for creating PO files. | |
455 | |
456 .nop.po-create: | |
457 @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ | |
458 echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ | |
459 exit 1 | |
460 | |
461 # General rule for updating PO files. | |
462 | |
463 .nop.po-update: | |
464 @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ | |
465 if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ | |
466 tmpdir=`pwd`; \ | |
467 echo "$$lang:"; \ | |
468 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ | |
469 echo "$${cdcmd}$(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ | |
470 cd $(srcdir); \ | |
471 if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ | |
472 '' | 0.[0-9] | 0.[0-9].* | 0.10 | 0.10.*) \ | |
473 $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ | |
474 0.1[1-5] | 0.1[1-5].*) \ | |
475 $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ | |
476 0.1[6-7] | 0.1[6-7].*) \ | |
477 $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ | |
478 *) \ | |
479 $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ | |
480 esac; \ | |
481 }; then \ | |
482 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ | |
483 rm -f $$tmpdir/$$lang.new.po; \ | |
484 else \ | |
485 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ | |
486 :; \ | |
487 else \ | |
488 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ | |
489 exit 1; \ | |
490 fi; \ | |
491 fi; \ | |
492 else \ | |
493 echo "msgmerge for $$lang.po failed!" 1>&2; \ | |
494 rm -f $$tmpdir/$$lang.new.po; \ | |
495 fi | |
496 | |
497 $(DUMMYPOFILES): | |
498 | |
499 update-gmo: Makefile $(GMOFILES) | |
500 @: | |
501 | |
502 # Recreate Makefile by invoking config.status. Explicitly invoke the shell, | |
503 # because execution permission bits may not work on the current file system. | |
504 # Use @SHELL@, which is the shell determined by autoconf for the use by its | |
505 # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. | |
506 Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ | |
507 cd $(top_builddir) \ | |
508 && @SHELL@ ./config.status $(subdir)/$@.in po-directories | |
509 | |
510 force: | |
511 | |
512 # Tell versions [3.59,3.63) of GNU make not to export all variables. | |
513 # Otherwise a system limit (for SysV at least) may be exceeded. | |
514 .NOEXPORT: |