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