Remove building with NOCRYPTO option
[minix3.git] / external / bsd / flex / dist / po / Makefile
blob418d45d31b486adeb7f9bfa2b2882c4b715662c9
1 # Makefile for PO directory in any package using GNU gettext.
2 # Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
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
6 # License but which still want to provide support for the GNU gettext
7 # functionality.
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.
11 # Origin: gettext-0.18
12 GETTEXT_MACRO_VERSION = 0.18
14 PACKAGE = flex
15 VERSION = 2.5.39
16 PACKAGE_BUGREPORT = flex-help@lists.sourceforge.net
18 SHELL = /bin/sh
21 srcdir = .
22 top_srcdir = ..
25 prefix = /usr/local
26 exec_prefix = ${prefix}
27 datarootdir = ${prefix}/share
28 datadir = ${datarootdir}
29 localedir = ${datarootdir}/locale
30 gettextsrcdir = $(datadir)/gettext/po
32 INSTALL = /usr/bin/install -c
33 INSTALL_DATA = ${INSTALL} -m 644
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 # ${SHELL} /usr/src/external/bsd/flex/flex-2.5.39/install-sh does not start with $(SHELL), so we add it.
39 # In automake >= 1.10, $(top_builddir)/./install-sh -c -d 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) ${SHELL} /usr/src/external/bsd/flex/flex-2.5.39/install-sh -d
43 install_sh = $(SHELL) ${SHELL} /usr/src/external/bsd/flex/flex-2.5.39/install-sh
44 MKDIR_P = .././install-sh -c -d
45 mkdir_p = $(top_builddir)/./install-sh -c -d
47 GMSGFMT_ = /usr/pkg/bin/msgfmt
48 GMSGFMT_no = /usr/pkg/bin/msgfmt
49 GMSGFMT_yes = /usr/pkg/bin/msgfmt
50 GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
51 MSGFMT_ = /usr/pkg/bin/msgfmt
52 MSGFMT_no = /usr/pkg/bin/msgfmt
53 MSGFMT_yes = /usr/pkg/bin/msgfmt
54 MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
55 XGETTEXT_ = /usr/pkg/bin/xgettext
56 XGETTEXT_no = /usr/pkg/bin/xgettext
57 XGETTEXT_yes = /usr/pkg/bin/xgettext
58 XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
59 MSGMERGE = msgmerge
60 MSGMERGE_UPDATE = /usr/pkg/bin/msgmerge --update
61 MSGINIT = msginit
62 MSGCONV = msgconv
63 MSGFILTER = msgfilter
65 POFILES = ca.po da.po de.po en@quot.po en@boldquot.po eo.po es.po fi.po fr.po ga.po hr.po ko.po nl.po pl.po pt_BR.po ro.po ru.po sr.po sv.po tr.po vi.po zh_CN.po zh_TW.po
66 GMOFILES = ca.gmo da.gmo de.gmo en@quot.gmo en@boldquot.gmo eo.gmo es.gmo fi.gmo fr.gmo ga.gmo hr.gmo ko.gmo nl.gmo pl.gmo pt_BR.gmo ro.gmo ru.gmo sr.gmo sv.gmo tr.gmo vi.gmo zh_CN.gmo zh_TW.gmo
67 UPDATEPOFILES = ca.po-update da.po-update de.po-update en@quot.po-update en@boldquot.po-update eo.po-update es.po-update fi.po-update fr.po-update ga.po-update hr.po-update ko.po-update nl.po-update pl.po-update pt_BR.po-update ro.po-update ru.po-update sr.po-update sv.po-update tr.po-update vi.po-update zh_CN.po-update zh_TW.po-update
68 DUMMYPOFILES = ca.nop da.nop de.nop en@quot.nop en@boldquot.nop eo.nop es.nop fi.nop fr.nop ga.nop hr.nop ko.nop nl.nop pl.nop pt_BR.nop ro.nop ru.nop sr.nop sv.nop tr.nop vi.nop zh_CN.nop zh_TW.nop
69 DISTFILES.common = Makefile.in.in remove-potcdate.sin \
70 $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
71 DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
72 $(POFILES) $(GMOFILES) \
73 $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
75 POTFILES = \
76 ../buf.c \
77 ../ccl.c \
78 ../dfa.c \
79 ../ecs.c \
80 ../gen.c \
81 ../libmain.c \
82 ../libyywrap.c \
83 ../main.c \
84 ../misc.c \
85 ../nfa.c \
86 ../options.c \
87 ../parse.y \
88 ../scan.l \
89 ../scanopt.c \
90 ../skel.c \
91 ../sym.c \
92 ../tblcmp.c \
93 ../yylex.c
95 CATALOGS = ca.gmo da.gmo de.gmo en@quot.gmo en@boldquot.gmo eo.gmo es.gmo fi.gmo fr.gmo ga.gmo hr.gmo ko.gmo nl.gmo pl.gmo pt_BR.gmo ro.gmo ru.gmo sr.gmo sv.gmo tr.gmo vi.gmo zh_CN.gmo zh_TW.gmo
97 # Makevars gets inserted here. (Don't remove this line!)
98 # Makefile variables for PO directory in any package using GNU gettext.
100 # Usually the message domain is the same as the package name.
101 DOMAIN = $(PACKAGE)
103 # These two variables depend on the location of this directory.
104 subdir = po
105 top_builddir = ..
107 # These options get passed to xgettext.
108 XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
110 # This is the copyright holder that gets inserted into the header of the
111 # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
112 # package. (Note that the msgstr strings, extracted from the package's
113 # sources, belong to the copyright holder of the package.) Translators are
114 # expected to transfer the copyright for their translations to this person
115 # or entity, or to disclaim their copyright. The empty string stands for
116 # the public domain; in this case the translators are expected to disclaim
117 # their copyright.
118 COPYRIGHT_HOLDER =
120 # This is the email address or URL to which the translators shall report
121 # bugs in the untranslated strings:
122 # - Strings which are not entire sentences, see the maintainer guidelines
123 # in the GNU gettext documentation, section 'Preparing Strings'.
124 # - Strings which use unclear terms or require additional context to be
125 # understood.
126 # - Strings which make invalid assumptions about notation of date, time or
127 # money.
128 # - Pluralisation problems.
129 # - Incorrect English spelling.
130 # - Incorrect formatting.
131 # It can be your email address, or a mailing list address where translators
132 # can write to without being subscribed, or the URL of a web page through
133 # which the translators can contact you.
134 MSGID_BUGS_ADDRESS = flex-devel@lists.sourceforge.net
136 # This is the list of locale categories, beyond LC_MESSAGES, for which the
137 # message catalogs shall be used. It is usually empty.
138 EXTRA_LOCALE_CATEGORIES =
140 .SUFFIXES:
141 .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
143 .po.mo:
144 @echo "$(MSGFMT) -c -o $@ $<"; \
145 $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
147 .po.gmo:
148 @lang=`echo $* | sed -e 's,.*/,,'`; \
149 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
150 echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
151 cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
153 .sin.sed:
154 sed -e '/^#/d' $< > t-$@
155 mv t-$@ $@
158 all: check-macro-version all-no
160 all-yes: stamp-po
161 all-no:
163 # Ensure that the gettext macros and this Makefile.in.in are in sync.
164 check-macro-version:
165 @test "$(GETTEXT_MACRO_VERSION)" = "0.18" \
166 || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version 0.18" 1>&2; \
167 exit 1; \
170 # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
171 # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
172 # we don't want to bother translators with empty POT files). We assume that
173 # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
174 # In this case, stamp-po is a nop (i.e. a phony target).
176 # stamp-po is a timestamp denoting the last time at which the CATALOGS have
177 # been loosely updated. Its purpose is that when a developer or translator
178 # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
179 # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
180 # invocations of "make" will do nothing. This timestamp would not be necessary
181 # if updating the $(CATALOGS) would always touch them; however, the rule for
182 # $(POFILES) has been designed to not touch files that don't need to be
183 # changed.
184 stamp-po: $(srcdir)/$(DOMAIN).pot
185 test ! -f $(srcdir)/$(DOMAIN).pot || \
186 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
187 @test ! -f $(srcdir)/$(DOMAIN).pot || { \
188 echo "touch stamp-po" && \
189 echo timestamp > stamp-poT && \
190 mv stamp-poT stamp-po; \
193 # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
194 # otherwise packages like GCC can not be built if only parts of the source
195 # have been downloaded.
197 # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
198 # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
199 $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
200 if LC_ALL=C grep 'GNU flex' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
201 package_gnu='GNU '; \
202 else \
203 package_gnu=''; \
204 fi; \
205 if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
206 msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
207 else \
208 msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
209 fi; \
210 case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
211 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
212 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
213 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
214 --files-from=$(srcdir)/POTFILES.in \
215 --copyright-holder='$(COPYRIGHT_HOLDER)' \
216 --msgid-bugs-address="$$msgid_bugs_address" \
217 ;; \
218 *) \
219 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
220 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
221 --files-from=$(srcdir)/POTFILES.in \
222 --copyright-holder='$(COPYRIGHT_HOLDER)' \
223 --package-name="$${package_gnu}flex" \
224 --package-version='2.5.39' \
225 --msgid-bugs-address="$$msgid_bugs_address" \
226 ;; \
227 esac
228 test ! -f $(DOMAIN).po || { \
229 if test -f $(srcdir)/$(DOMAIN).pot; then \
230 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
231 sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
232 if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
233 rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
234 else \
235 rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
236 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
237 fi; \
238 else \
239 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
240 fi; \
243 # This rule has no dependencies: we don't need to update $(DOMAIN).pot at
244 # every "make" invocation, only create it when it is missing.
245 # Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
246 $(srcdir)/$(DOMAIN).pot:
247 $(MAKE) $(DOMAIN).pot-update
249 # This target rebuilds a PO file if $(DOMAIN).pot has changed.
250 # Note that a PO file is not touched if it doesn't need to be changed.
251 $(POFILES): $(srcdir)/$(DOMAIN).pot
252 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
253 if test -f "$(srcdir)/$${lang}.po"; then \
254 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
255 echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
256 cd $(srcdir) \
257 && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
258 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
259 $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
260 *) \
261 $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
262 esac; \
263 }; \
264 else \
265 $(MAKE) $${lang}.po-create; \
269 install: install-exec install-data
270 install-exec:
271 install-data: install-data-no
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 : ; \
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
325 install-strip: install
327 installdirs: installdirs-exec installdirs-data
328 installdirs-exec:
329 installdirs-data: installdirs-data-no
330 if test "$(PACKAGE)" = "gettext-tools"; then \
331 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
332 else \
333 : ; \
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
368 # Define this as empty until I found a useful application.
369 installcheck:
371 uninstall: uninstall-exec uninstall-data
372 uninstall-exec:
373 uninstall-data: uninstall-data-no
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 : ; \
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
392 check: all
394 info dvi ps pdf html tags TAGS ctags CTAGS ID:
396 mostlyclean:
397 rm -f remove-potcdate.sed
398 rm -f stamp-poT
399 rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
400 rm -fr *.o
402 clean: mostlyclean
404 distclean: clean
405 rm -f Makefile Makefile.in POTFILES *.mo
407 maintainer-clean: distclean
408 @echo "This command is intended for maintainers to use;"
409 @echo "it deletes files that may require special tools to rebuild."
410 rm -f stamp-po $(GMOFILES)
412 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
413 dist distdir:
414 $(MAKE) update-po
415 @$(MAKE) dist2
416 # This is a separate target because 'update-po' must be executed before.
417 dist2: stamp-po $(DISTFILES)
418 dists="$(DISTFILES)"; \
419 if test "$(PACKAGE)" = "gettext-tools"; then \
420 dists="$$dists Makevars.template"; \
421 fi; \
422 if test -f $(srcdir)/$(DOMAIN).pot; then \
423 dists="$$dists $(DOMAIN).pot stamp-po"; \
424 fi; \
425 if test -f $(srcdir)/ChangeLog; then \
426 dists="$$dists ChangeLog"; \
427 fi; \
428 for i in 0 1 2 3 4 5 6 7 8 9; do \
429 if test -f $(srcdir)/ChangeLog.$$i; then \
430 dists="$$dists ChangeLog.$$i"; \
431 fi; \
432 done; \
433 if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
434 for file in $$dists; do \
435 if test -f $$file; then \
436 cp -p $$file $(distdir) || exit 1; \
437 else \
438 cp -p $(srcdir)/$$file $(distdir) || exit 1; \
439 fi; \
440 done
442 update-po: Makefile
443 $(MAKE) $(DOMAIN).pot-update
444 test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
445 $(MAKE) update-gmo
447 # General rule for creating PO files.
449 .nop.po-create:
450 @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
451 echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
452 exit 1
454 # General rule for updating PO files.
456 .nop.po-update:
457 @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
458 if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
459 tmpdir=`pwd`; \
460 echo "$$lang:"; \
461 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
462 echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
463 cd $(srcdir); \
464 if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
465 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
466 $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
467 *) \
468 $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
469 esac; \
470 }; then \
471 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
472 rm -f $$tmpdir/$$lang.new.po; \
473 else \
474 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
475 :; \
476 else \
477 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
478 exit 1; \
479 fi; \
480 fi; \
481 else \
482 echo "msgmerge for $$lang.po failed!" 1>&2; \
483 rm -f $$tmpdir/$$lang.new.po; \
486 $(DUMMYPOFILES):
488 update-gmo: Makefile $(GMOFILES)
491 # Recreate Makefile by invoking config.status. Explicitly invoke the shell,
492 # because execution permission bits may not work on the current file system.
493 # Use /bin/sh, which is the shell determined by autoconf for the use by its
494 # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
495 Makefile: Makefile.in.in Makevars $(top_builddir)/config.status POTFILES.in LINGUAS
496 cd $(top_builddir) \
497 && /bin/sh ./config.status $(subdir)/$@.in po-directories
499 force:
501 # Tell versions [3.59,3.63) of GNU make not to export all variables.
502 # Otherwise a system limit (for SysV at least) may be exceeded.
503 .NOEXPORT:
504 # Special Makefile rules for English message catalogs with quotation marks.
506 DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
508 .SUFFIXES: .insert-header .po-update-en
510 en@quot.po-create:
511 $(MAKE) en@quot.po-update
512 en@boldquot.po-create:
513 $(MAKE) en@boldquot.po-update
515 en@quot.po-update: en@quot.po-update-en
516 en@boldquot.po-update: en@boldquot.po-update-en
518 .insert-header.po-update-en:
519 @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
520 if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
521 tmpdir=`pwd`; \
522 echo "$$lang:"; \
523 ll=`echo $$lang | sed -e 's/@.*//'`; \
524 LC_ALL=C; export LC_ALL; \
525 cd $(srcdir); \
526 if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
527 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
528 rm -f $$tmpdir/$$lang.new.po; \
529 else \
530 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
531 :; \
532 else \
533 echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
534 exit 1; \
535 fi; \
536 fi; \
537 else \
538 echo "creation of $$lang.po failed!" 1>&2; \
539 rm -f $$tmpdir/$$lang.new.po; \
542 en@quot.insert-header: insert-header.sin
543 sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
545 en@boldquot.insert-header: insert-header.sin
546 sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
548 mostlyclean: mostlyclean-quot
549 mostlyclean-quot:
550 rm -f *.insert-header