Debian Codegraph @

debian/patches/01-update-autotools.diff

raw symbols SCIP
1 Description: Update autotools-related stuff.
2
3 --- a/configure.in
4 +++ b/configure.in
5 @@ -15,6 +15,7 @@
6
7 dnl Other
8 AC_CONFIG_AUX_DIR(scripts)
9 +AC_CONFIG_MACRO_DIR([m4])
10 AC_PROG_INSTALL
11
12 dnl check for libintl
13 @@ -34,6 +35,8 @@
14 CXXFLAGS="-O2"
15 fi
16
17 +AC_USE_SYSTEM_EXTENSIONS
18 +
19 dnl comment out this line to get extensive debugging output and asserts
20 dnl CXXFLAGS="-DNDEBUG $CXXFLAGS"
21
22 --- /dev/null
23 +++ b/po/Makevars
24 @@ -0,0 +1,5 @@
25 +DOMAIN = $(PACKAGE)
26 +
27 +subdir = po
28 +top_builddir = ..
29 +
30 --- a/po/Makefile.in.in
31 +++ b/po/Makefile.in.in
32 @@ -1,15 +1,19 @@
33 -# Makefile for program source directory in GNU NLS utilities package.
34 -# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <[email protected]>
35 +# Makefile for PO directory in any package using GNU gettext.
36 +# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <[email protected]>
37 #
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
45 +# functionality.
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.
48 +#
49 +# Origin: gettext-0.18
50 +GETTEXT_MACRO_VERSION = 0.18
51
52 PACKAGE = @PACKAGE@
53 VERSION = @VERSION@
54 -
55 -DESTDIR =
56 +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
57
58 SHELL = /bin/sh
59 @SET_MAKE@
60 @@ -18,232 +22,422 @@
61 top_srcdir = @top_srcdir@
62 VPATH = @srcdir@
63
64 -prefix = $(DESTDIR)@prefix@
65 +prefix = @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
71 -subdir = po
72 +datarootdir = @datarootdir@
73 +datadir = @datadir@
74 +localedir = @localedir@
75 +gettextsrcdir = $(datadir)/gettext/po
76
77 INSTALL = @INSTALL@
78 INSTALL_DATA = @INSTALL_DATA@
79 -MKINSTALLDIRS = ../scripts/mkinstalldirs
80 -
81 -CC = @CC@
82 -GENCAT = @GENCAT@
83 -GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
84 -MSGFMT = @MSGFMT@
85 -XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
86 -MSGMERGE = PATH=../src:$$PATH msgmerge
87 -
88 -DEFS = @DEFS@
89 -CFLAGS = @CFLAGS@
90 -CPPFLAGS = @CPPFLAGS@
91
92 -INCLUDES = -I.. -I$(top_srcdir)/intl
93 +# We use $(mkdir_p).
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@
102 +MKDIR_P = @MKDIR_P@
103 +mkdir_p = @mkdir_p@
104 +
105 +GMSGFMT_ = @GMSGFMT@
106 +GMSGFMT_no = @GMSGFMT@
107 +GMSGFMT_yes = @GMSGFMT_015@
108 +GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
109 +MSGFMT_ = @MSGFMT@
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))
117 +MSGMERGE = msgmerge
118 +MSGMERGE_UPDATE = @MSGMERGE@ --update
119 +MSGINIT = msginit
120 +MSGCONV = msgconv
121 +MSGFILTER = msgfilter
122
123 -COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
124 -
125 -SOURCES = cat-id-tbl.c
126 POFILES = @POFILES@
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)
137
138 POTFILES = \
139
140 CATALOGS = @CATALOGS@
141 -CATOBJEXT = @CATOBJEXT@
142 -INSTOBJEXT = @INSTOBJEXT@
143 -
144 -.SUFFIXES:
145 -.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
146
147 -.c.o:
148 - $(COMPILE) $<
149 +# Makevars gets inserted here. (Don't remove this line!)
150
151 -.po.pox:
152 - $(MAKE) $(PACKAGE).pot
153 - $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
154 +.SUFFIXES:
155 +.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
156
157 .po.mo:
158 - $(MSGFMT) -o $@ $<
159 + @echo "$(MSGFMT) -c -o $@ $<"; \
160 + $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
161
162 .po.gmo:
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
169
170 -.po.cat:
171 - sed -f ../intl/po2msg.sed < $< > $*.msg \
172 - && rm -f $@ && $(GENCAT) $@ $*.msg
173 +.sin.sed:
174 + sed -e '/^#/d' $< > t-$@
175 + mv t-$@ $@
176
177
178 -all: all-@USE_NLS@
179 +all: check-macro-version all-@USE_NLS@
180
181 -all-yes: cat-id-tbl.c $(CATALOGS)
182 +all-yes: stamp-po
183 all-no:
184
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 )
192 -
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; \
200 - else \
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; \
208 + exit 1; \
209 + }
210 +
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).
216 +
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
224 +# changed.
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; \
232 + }
233 +
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.
237 +
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 '; \
243 + else \
244 + package_gnu=''; \
245 + fi; \
246 + if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
247 + msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
248 + else \
249 + msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
250 + fi; \
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" \
258 + ;; \
259 + *) \
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" \
267 + ;; \
268 + esac
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; \
275 + else \
276 + rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
277 + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
278 + fi; \
279 + else \
280 + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
281 + fi; \
282 + }
283 +
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
289 +
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"; \
297 + cd $(srcdir) \
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;; \
301 + *) \
302 + $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
303 + esac; \
304 + }; \
305 + else \
306 + $(MAKE) $${lang}.po-create; \
307 fi
308 - cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
309
310
311 install: install-exec install-data
312 install-exec:
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; \
323 + done; \
324 + for file in Makevars; do \
325 + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
326 + done; \
327 else \
328 - $(SHELL) ../scripts/mkinstalldirs $(datadir); \
329 + : ; \
330 fi
331 +install-data-no: all
332 +install-data-yes: all
333 @catalogs='$(CATALOGS)'; \
334 for cat in $$catalogs; do \
335 cat=`basename $$cat`; \
336 - case "$$cat" in \
337 - *.gmo) destdir=$(gnulocaledir);; \
338 - *) destdir=$(localedir);; \
339 - esac; \
340 - lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
341 - dir=$$destdir/$$lang/LC_MESSAGES; \
342 - if test -r "$(MKINSTALLDIRS)"; then \
343 - $(MKINSTALLDIRS) $$dir; \
344 - else \
345 - $(SHELL) ../scripts/mkinstalldirs $$dir; \
346 - fi; \
347 - if test -r $$cat; then \
348 - $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
349 - echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
350 - else \
351 - $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
352 - echo "installing $(srcdir)/$$cat as" \
353 - "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
354 - fi; \
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"; \
358 - else \
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"; \
364 - else \
365 - true; \
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; \
382 + fi; \
383 + done); \
384 + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
385 + else \
386 + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
387 + :; \
388 + else \
389 + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
390 + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
391 + fi; \
392 + fi; \
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"; \
398 fi; \
399 - fi; \
400 + done; \
401 done
402 - if test "$(PACKAGE)" = "gettext"; then \
403 - if test -r "$(MKINSTALLDIRS)"; then \
404 - $(MKINSTALLDIRS) $(gettextsrcdir); \
405 - else \
406 - $(SHELL) ../scripts/mkinstalldirs $(gettextsrcdir); \
407 - fi; \
408 - $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
409 - $(gettextsrcdir)/Makefile.in.in; \
410 +
411 +install-strip: install
412 +
413 +installdirs: installdirs-exec installdirs-data
414 +installdirs-exec:
415 +installdirs-data: installdirs-data-@USE_NLS@
416 + if test "$(PACKAGE)" = "gettext-tools"; then \
417 + $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
418 else \
419 : ; \
420 fi
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; \
439 + fi; \
440 + done); \
441 + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
442 + else \
443 + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
444 + :; \
445 + else \
446 + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
447 + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
448 + fi; \
449 + fi; \
450 + fi; \
451 + done; \
452 + done
453
454 # Define this as empty until I found a useful application.
455 installcheck:
456
457 -uninstall:
458 +uninstall: uninstall-exec uninstall-data
459 +uninstall-exec:
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; \
464 + done; \
465 + else \
466 + : ; \
467 + fi
468 +uninstall-data-no:
469 +uninstall-data-yes:
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; \
481 + done; \
482 done
483 - rm -f $(gettextsrcdir)/po-Makefile.in.in
484
485 check: all
486
487 -cat-id-tbl.o: ../intl/libgettext.h
488 -
489 -dvi info tags TAGS ID:
490 +info dvi ps pdf html tags TAGS ctags CTAGS ID:
491
492 mostlyclean:
493 - rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
494 + rm -f remove-potcdate.sed
495 + rm -f stamp-poT
496 + rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
497 rm -fr *.o
498
499 clean: mostlyclean
500
501 distclean: clean
502 - rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
503 + rm -f Makefile Makefile.in POTFILES *.mo
504
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."
508 - rm -f $(GMOFILES)
509 + rm -f stamp-po $(GMOFILES)
510
511 -distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
512 -dist distdir: update-po $(DISTFILES)
513 +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
514 +dist distdir:
515 + $(MAKE) update-po
516 + @$(MAKE) dist2
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"; \
522 + fi; \
523 + if test -f $(srcdir)/$(DOMAIN).pot; then \
524 + dists="$$dists $(DOMAIN).pot stamp-po"; \
525 + fi; \
526 + if test -f $(srcdir)/ChangeLog; then \
527 + dists="$$dists ChangeLog"; \
528 + fi; \
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"; \
532 + fi; \
533 + done; \
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; \
540 + else \
541 + cp -p $(srcdir)/$$file $(distdir) || exit 1; \
542 + fi; \
543 done
544
545 update-po: Makefile
546 - $(MAKE) $(PACKAGE).pot
547 - PATH=`pwd`/../src:$$PATH; \
548 + $(MAKE) $(DOMAIN).pot-update
549 + test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
550 + $(MAKE) update-gmo
551 +
552 +# General rule for creating PO files.
553 +
554 +.nop.po-create:
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; \
557 + exit 1
558 +
559 +# General rule for updating PO files.
560 +
561 +.nop.po-update:
562 + @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
563 + if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
564 + tmpdir=`pwd`; \
565 + echo "$$lang:"; \
566 + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
567 + echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
568 cd $(srcdir); \
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; \
574 - echo "$$lang:"; \
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;; \
580 + *) \
581 + $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
582 + esac; \
583 + }; then \
584 + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
585 + rm -f $$tmpdir/$$lang.new.po; \
586 else \
587 - echo "msgmerge for $$cat failed!"; \
588 - rm -f $$lang.po; \
589 - mv $$lang.old.po $$lang.po; \
590 + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
591 + :; \
592 + else \
593 + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
594 + exit 1; \
595 + fi; \
596 fi; \
597 - done
598 + else \
599 + echo "msgmerge for $$lang.po failed!" 1>&2; \
600 + rm -f $$tmpdir/$$lang.new.po; \
601 + fi
602
603 -POTFILES: POTFILES.in
604 - ( if test 'x$(srcdir)' != 'x.'; then \
605 - posrcprefix='$(top_srcdir)/'; \
606 - else \
607 - posrcprefix="../"; \
608 - fi; \
609 - rm -f $@-t $@ \
610 - && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
611 - -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/[email protected] \
612 - | sed -e '$$s/\\$$//') > $@-t \
613 - && chmod a-w $@-t \
614 - && mv $@-t $@ )
615 -
616 -Makefile: Makefile.in.in ../config.status POTFILES
617 - cd .. \
618 - && CONFIG_FILES=$(subdir)/[email protected] CONFIG_HEADERS= \
619 - $(SHELL) ./config.status
620 +$(DUMMYPOFILES):
621 +
622 +update-gmo: Makefile $(GMOFILES)
623 + @:
624 +
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)/[email protected] po-directories
632 +
633 +force:
634
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.
637 --- a/Makefile.am
638 +++ b/Makefile.am
639 @@ -11,6 +11,8 @@
640 # * Created: 21.5.1999
641 # *************************************************************************
642
643 +ACLOCAL_AMFLAGS = -I m4
644 +
645 SUBDIRS_ = po gsmlib apps tests doc scripts win32 ext
646
647 EXTRA_DIST = gsmlib.spec