1
Description: Update autotools-related stuff.
8
AC_CONFIG_AUX_DIR(scripts)
9
+AC_CONFIG_MACRO_DIR([m4])
17
+AC_USE_SYSTEM_EXTENSIONS
19
dnl comment out this line to get extensive debugging output and asserts
20
dnl CXXFLAGS="-DNDEBUG $CXXFLAGS"
30
--- a/po/Makefile.in.in
31
+++ b/po/Makefile.in.in
33
-# Makefile for program source directory in GNU NLS utilities package.
34
-# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
35
+# Makefile for PO directory in any package using GNU gettext.
36
+# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
38
-# This file file be copied and used freely without restrictions. It can
39
-# be used in projects which are not available under the GNU Public License
40
-# but which still want to provide support for the GNU gettext functionality.
41
-# Please note that the actual code is *not* freely available.
42
+# This file can be copied and used freely without restrictions. It can
43
+# be used in projects which are not available under the GNU General Public
44
+# License but which still want to provide support for the GNU gettext
46
+# Please note that the actual code of GNU gettext is covered by the GNU
47
+# General Public License and is *not* in the public domain.
49
+# Origin: gettext-0.18
50
+GETTEXT_MACRO_VERSION = 0.18
56
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
61
top_srcdir = @top_srcdir@
64
-prefix = $(DESTDIR)@prefix@
66
exec_prefix = @exec_prefix@
67
-datadir = $(prefix)/@DATADIRNAME@
68
-localedir = $(datadir)/locale
69
-gnulocaledir = $(prefix)/share/locale
70
-gettextsrcdir = $(prefix)/share/gettext/po
72
+datarootdir = @datarootdir@
74
+localedir = @localedir@
75
+gettextsrcdir = $(datadir)/gettext/po
78
INSTALL_DATA = @INSTALL_DATA@
79
-MKINSTALLDIRS = ../scripts/mkinstalldirs
83
-GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
85
-XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
86
-MSGMERGE = PATH=../src:$$PATH msgmerge
90
-CPPFLAGS = @CPPFLAGS@
92
-INCLUDES = -I.. -I$(top_srcdir)/intl
94
+# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
95
+# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
96
+# @install_sh@ does not start with $(SHELL), so we add it.
97
+# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
98
+# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
99
+# versions, $(mkinstalldirs) and $(install_sh) are unused.
100
+mkinstalldirs = $(SHELL) @install_sh@ -d
101
+install_sh = $(SHELL) @install_sh@
105
+GMSGFMT_ = @GMSGFMT@
106
+GMSGFMT_no = @GMSGFMT@
107
+GMSGFMT_yes = @GMSGFMT_015@
108
+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
110
+MSGFMT_no = @MSGFMT@
111
+MSGFMT_yes = @MSGFMT_015@
112
+MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
113
+XGETTEXT_ = @XGETTEXT@
114
+XGETTEXT_no = @XGETTEXT@
115
+XGETTEXT_yes = @XGETTEXT_015@
116
+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
118
+MSGMERGE_UPDATE = @MSGMERGE@ --update
121
+MSGFILTER = msgfilter
123
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
125
-SOURCES = cat-id-tbl.c
127
GMOFILES = @GMOFILES@
128
-DISTFILES = Makefile.in.in POTFILES.in $(PACKAGE).pot \
129
-stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
130
+UPDATEPOFILES = @UPDATEPOFILES@
131
+DUMMYPOFILES = @DUMMYPOFILES@
132
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
133
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
134
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
135
+$(POFILES) $(GMOFILES) \
136
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
140
CATALOGS = @CATALOGS@
141
-CATOBJEXT = @CATOBJEXT@
142
-INSTOBJEXT = @INSTOBJEXT@
145
-.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
149
+# Makevars gets inserted here. (Don't remove this line!)
152
- $(MAKE) $(PACKAGE).pot
153
- $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
155
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
159
+ @echo "$(MSGFMT) -c -o $@ $<"; \
160
+ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
163
- file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
164
- && rm -f $$file && $(GMSGFMT) -o $$file $<
165
+ @lang=`echo $* | sed -e 's,.*/,,'`; \
166
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
167
+ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
168
+ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
171
- sed -f ../intl/po2msg.sed < $< > $*.msg \
172
- && rm -f $@ && $(GENCAT) $@ $*.msg
174
+ sed -e '/^#/d' $< > t-$@
179
+all: check-macro-version all-@USE_NLS@
181
-all-yes: cat-id-tbl.c $(CATALOGS)
185
-$(srcdir)/$(PACKAGE).pot: $(POTFILES)
186
- $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
187
- --add-comments --keyword=_ --keyword=N_ \
188
- --files-from=$(srcdir)/POTFILES.in \
189
- && test ! -f $(PACKAGE).po \
190
- || ( rm -f $(srcdir)/$(PACKAGE).pot \
191
- && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
193
-$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
194
-$(srcdir)/stamp-cat-id: $(PACKAGE).pot
195
- rm -f cat-id-tbl.tmp
196
- sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
197
- | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
198
- if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
199
- rm cat-id-tbl.tmp; \
201
- echo cat-id-tbl.c changed; \
202
- rm -f $(srcdir)/cat-id-tbl.c; \
203
- mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
204
+# Ensure that the gettext macros and this Makefile.in.in are in sync.
205
+check-macro-version:
206
+ @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
207
+ || { 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; \
211
+# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
212
+# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
213
+# we don't want to bother translators with empty POT files). We assume that
214
+# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
215
+# In this case, stamp-po is a nop (i.e. a phony target).
217
+# stamp-po is a timestamp denoting the last time at which the CATALOGS have
218
+# been loosely updated. Its purpose is that when a developer or translator
219
+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
220
+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
221
+# invocations of "make" will do nothing. This timestamp would not be necessary
222
+# if updating the $(CATALOGS) would always touch them; however, the rule for
223
+# $(POFILES) has been designed to not touch files that don't need to be
225
+stamp-po: $(srcdir)/$(DOMAIN).pot
226
+ test ! -f $(srcdir)/$(DOMAIN).pot || \
227
+ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
228
+ @test ! -f $(srcdir)/$(DOMAIN).pot || { \
229
+ echo "touch stamp-po" && \
230
+ echo timestamp > stamp-poT && \
231
+ mv stamp-poT stamp-po; \
234
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
235
+# otherwise packages like GCC can not be built if only parts of the source
236
+# have been downloaded.
238
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
239
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
240
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
241
+ if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
242
+ package_gnu='GNU '; \
246
+ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
247
+ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
249
+ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
251
+ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
252
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
253
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
254
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
255
+ --files-from=$(srcdir)/POTFILES.in \
256
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
257
+ --msgid-bugs-address="$$msgid_bugs_address" \
260
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
261
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
262
+ --files-from=$(srcdir)/POTFILES.in \
263
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
264
+ --package-name="$${package_gnu}@PACKAGE@" \
265
+ --package-version='@VERSION@' \
266
+ --msgid-bugs-address="$$msgid_bugs_address" \
269
+ test ! -f $(DOMAIN).po || { \
270
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
271
+ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
272
+ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
273
+ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
274
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
276
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
277
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
280
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
284
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
285
+# every "make" invocation, only create it when it is missing.
286
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
287
+$(srcdir)/$(DOMAIN).pot:
288
+ $(MAKE) $(DOMAIN).pot-update
290
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
291
+# Note that a PO file is not touched if it doesn't need to be changed.
292
+$(POFILES): $(srcdir)/$(DOMAIN).pot
293
+ @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
294
+ if test -f "$(srcdir)/$${lang}.po"; then \
295
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
296
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
298
+ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
299
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
300
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
302
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
306
+ $(MAKE) $${lang}.po-create; \
308
- cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
311
install: install-exec install-data
313
install-data: install-data-@USE_NLS@
314
-install-data-no: all
315
-install-data-yes: all
316
- if test -r "$(MKINSTALLDIRS)"; then \
317
- $(MKINSTALLDIRS) $(datadir); \
318
+ if test "$(PACKAGE)" = "gettext-tools"; then \
319
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
320
+ for file in $(DISTFILES.common) Makevars.template; do \
321
+ $(INSTALL_DATA) $(srcdir)/$$file \
322
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
324
+ for file in Makevars; do \
325
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
328
- $(SHELL) ../scripts/mkinstalldirs $(datadir); \
331
+install-data-no: all
332
+install-data-yes: all
333
@catalogs='$(CATALOGS)'; \
334
for cat in $$catalogs; do \
335
cat=`basename $$cat`; \
337
- *.gmo) destdir=$(gnulocaledir);; \
338
- *) destdir=$(localedir);; \
340
- lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
341
- dir=$$destdir/$$lang/LC_MESSAGES; \
342
- if test -r "$(MKINSTALLDIRS)"; then \
343
- $(MKINSTALLDIRS) $$dir; \
345
- $(SHELL) ../scripts/mkinstalldirs $$dir; \
347
- if test -r $$cat; then \
348
- $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
349
- echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
351
- $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
352
- echo "installing $(srcdir)/$$cat as" \
353
- "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
355
- if test -r $$cat.m; then \
356
- $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
357
- echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
359
- if test -r $(srcdir)/$$cat.m ; then \
360
- $(INSTALL_DATA) $(srcdir)/$$cat.m \
361
- $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
362
- echo "installing $(srcdir)/$$cat as" \
363
- "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
366
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
367
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
368
+ $(mkdir_p) $(DESTDIR)$$dir; \
369
+ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
370
+ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
371
+ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
372
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
373
+ if test -n "$$lc"; then \
374
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
375
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
376
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
377
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
378
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
379
+ for file in *; do \
380
+ if test -f $$file; then \
381
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
384
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
386
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
389
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
390
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
393
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
394
+ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
395
+ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
396
+ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
397
+ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
402
- if test "$(PACKAGE)" = "gettext"; then \
403
- if test -r "$(MKINSTALLDIRS)"; then \
404
- $(MKINSTALLDIRS) $(gettextsrcdir); \
406
- $(SHELL) ../scripts/mkinstalldirs $(gettextsrcdir); \
408
- $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
409
- $(gettextsrcdir)/Makefile.in.in; \
411
+install-strip: install
413
+installdirs: installdirs-exec installdirs-data
415
+installdirs-data: installdirs-data-@USE_NLS@
416
+ if test "$(PACKAGE)" = "gettext-tools"; then \
417
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
421
+installdirs-data-no:
422
+installdirs-data-yes:
423
+ @catalogs='$(CATALOGS)'; \
424
+ for cat in $$catalogs; do \
425
+ cat=`basename $$cat`; \
426
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
427
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
428
+ $(mkdir_p) $(DESTDIR)$$dir; \
429
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
430
+ if test -n "$$lc"; then \
431
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
432
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
433
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
434
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
435
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
436
+ for file in *; do \
437
+ if test -f $$file; then \
438
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
441
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
443
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
446
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
447
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
454
# Define this as empty until I found a useful application.
458
+uninstall: uninstall-exec uninstall-data
460
+uninstall-data: uninstall-data-@USE_NLS@
461
+ if test "$(PACKAGE)" = "gettext-tools"; then \
462
+ for file in $(DISTFILES.common) Makevars.template; do \
463
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
470
catalogs='$(CATALOGS)'; \
471
for cat in $$catalogs; do \
472
cat=`basename $$cat`; \
473
- lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
474
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
475
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
476
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
477
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
478
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
479
+ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
480
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
483
- rm -f $(gettextsrcdir)/po-Makefile.in.in
487
-cat-id-tbl.o: ../intl/libgettext.h
489
-dvi info tags TAGS ID:
490
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
493
- rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
494
+ rm -f remove-potcdate.sed
496
+ rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
502
- rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
503
+ rm -f Makefile Makefile.in POTFILES *.mo
505
maintainer-clean: distclean
506
@echo "This command is intended for maintainers to use;"
507
@echo "it deletes files that may require special tools to rebuild."
509
+ rm -f stamp-po $(GMOFILES)
511
-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
512
-dist distdir: update-po $(DISTFILES)
513
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
517
+# This is a separate target because 'update-po' must be executed before.
518
+dist2: stamp-po $(DISTFILES)
519
dists="$(DISTFILES)"; \
520
+ if test "$(PACKAGE)" = "gettext-tools"; then \
521
+ dists="$$dists Makevars.template"; \
523
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
524
+ dists="$$dists $(DOMAIN).pot stamp-po"; \
526
+ if test -f $(srcdir)/ChangeLog; then \
527
+ dists="$$dists ChangeLog"; \
529
+ for i in 0 1 2 3 4 5 6 7 8 9; do \
530
+ if test -f $(srcdir)/ChangeLog.$$i; then \
531
+ dists="$$dists ChangeLog.$$i"; \
534
+ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
535
for file in $$dists; do \
536
- ln $(srcdir)/$$file $(distdir) 2> /dev/null \
537
- || cp -p $(srcdir)/$$file $(distdir) || echo ignore; \
538
+ if test -f $$file; then \
539
+ cp -p $$file $(distdir) || exit 1; \
541
+ cp -p $(srcdir)/$$file $(distdir) || exit 1; \
546
- $(MAKE) $(PACKAGE).pot
547
- PATH=`pwd`/../src:$$PATH; \
548
+ $(MAKE) $(DOMAIN).pot-update
549
+ test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
552
+# General rule for creating PO files.
555
+ @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
556
+ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
559
+# General rule for updating PO files.
562
+ @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
563
+ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
566
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
567
+ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
569
- catalogs='$(CATALOGS)'; \
570
- for cat in $$catalogs; do \
571
- cat=`basename $$cat`; \
572
- lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
573
- mv $$lang.po $$lang.old.po; \
575
- if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
576
- rm -f $$lang.old.po; \
577
+ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
578
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
579
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
581
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
584
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
585
+ rm -f $$tmpdir/$$lang.new.po; \
587
- echo "msgmerge for $$cat failed!"; \
589
- mv $$lang.old.po $$lang.po; \
590
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
593
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
599
+ echo "msgmerge for $$lang.po failed!" 1>&2; \
600
+ rm -f $$tmpdir/$$lang.new.po; \
603
-POTFILES: POTFILES.in
604
- ( if test 'x$(srcdir)' != 'x.'; then \
605
- posrcprefix='$(top_srcdir)/'; \
607
- posrcprefix="../"; \
610
- && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
611
- -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
612
- | sed -e '$$s/\\$$//') > $@-t \
613
- && chmod a-w $@-t \
616
-Makefile: Makefile.in.in ../config.status POTFILES
618
- && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
619
- $(SHELL) ./config.status
622
+update-gmo: Makefile $(GMOFILES)
625
+# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
626
+# because execution permission bits may not work on the current file system.
627
+# Use @SHELL@, which is the shell determined by autoconf for the use by its
628
+# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
629
+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
630
+ cd $(top_builddir) \
631
+ && @SHELL@ ./config.status $(subdir)/$@.in po-directories
635
# Tell versions [3.59,3.63) of GNU make not to export all variables.
636
# Otherwise a system limit (for SysV at least) may be exceeded.
640
# * Created: 21.5.1999
641
# *************************************************************************
643
+ACLOCAL_AMFLAGS = -I m4
645
SUBDIRS_ = po gsmlib apps tests doc scripts win32 ext
647
EXTRA_DIST = gsmlib.spec