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