Statistics
| Revision:

root / po / Rules-quot @ 2046

History | View | Annotate | Download (1.7 kB)

1 1 hiro
# Special Makefile rules for English message catalogs with quotation marks.
2 1 hiro
3 1 hiro
DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
4 1 hiro
5 1 hiro
.SUFFIXES: .insert-header .po-update-en
6 1 hiro
7 1 hiro
en@quot.po-create:
8 1 hiro
	$(MAKE) en@quot.po-update
9 1 hiro
en@boldquot.po-create:
10 1 hiro
	$(MAKE) en@boldquot.po-update
11 1 hiro
12 1 hiro
en@quot.po-update: en@quot.po-update-en
13 1 hiro
en@boldquot.po-update: en@boldquot.po-update-en
14 1 hiro
15 1 hiro
.insert-header.po-update-en:
16 1 hiro
	@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
17 1 hiro
	if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
18 1 hiro
	tmpdir=`pwd`; \
19 1 hiro
	echo "$$lang:"; \
20 1 hiro
	ll=`echo $$lang | sed -e 's/@.*//'`; \
21 1 hiro
	LC_ALL=C; export LC_ALL; \
22 1 hiro
	cd $(srcdir); \
23 1 hiro
	if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -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 \
24 1 hiro
	  if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
25 1 hiro
	    rm -f $$tmpdir/$$lang.new.po; \
26 1 hiro
	  else \
27 1 hiro
	    if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
28 1 hiro
	      :; \
29 1 hiro
	    else \
30 1 hiro
	      echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
31 1 hiro
	      exit 1; \
32 1 hiro
	    fi; \
33 1 hiro
	  fi; \
34 1 hiro
	else \
35 1 hiro
	  echo "creation of $$lang.po failed!" 1>&2; \
36 1 hiro
	  rm -f $$tmpdir/$$lang.new.po; \
37 1 hiro
	fi
38 1 hiro
39 1 hiro
en@quot.insert-header: insert-header.sin
40 1 hiro
	sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
41 1 hiro
42 1 hiro
en@boldquot.insert-header: insert-header.sin
43 1 hiro
	sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
44 1 hiro
45 1 hiro
mostlyclean: mostlyclean-quot
46 1 hiro
mostlyclean-quot:
47 1 hiro
	rm -f *.insert-header