Blame po/Rules-quot

Packit fc043f
# This file, Rules-quot, can be copied and used freely without restrictions.
Packit fc043f
# Special Makefile rules for English message catalogs with quotation marks.
Packit fc043f
Packit fc043f
DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
Packit fc043f
Packit fc043f
.SUFFIXES: .insert-header .po-update-en
Packit fc043f
Packit fc043f
en@quot.po-create:
Packit fc043f
	$(MAKE) en@quot.po-update
Packit fc043f
en@boldquot.po-create:
Packit fc043f
	$(MAKE) en@boldquot.po-update
Packit fc043f
Packit fc043f
en@quot.po-update: en@quot.po-update-en
Packit fc043f
en@boldquot.po-update: en@boldquot.po-update-en
Packit fc043f
Packit fc043f
.insert-header.po-update-en:
Packit fc043f
	@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
Packit fc043f
	if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
Packit fc043f
	tmpdir=`pwd`; \
Packit fc043f
	echo "$$lang:"; \
Packit fc043f
	ll=`echo $$lang | sed -e 's/@.*//'`; \
Packit fc043f
	LC_ALL=C; export LC_ALL; \
Packit fc043f
	cd $(srcdir); \
Packit fc043f
	if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \
Packit fc043f
	   | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \
Packit fc043f
	   { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
Packit fc043f
	     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \
Packit fc043f
	       $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \
Packit fc043f
	       ;; \
Packit fc043f
	     *) \
Packit fc043f
	       $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \
Packit fc043f
	       ;; \
Packit fc043f
	     esac } 2>/dev/null > $$tmpdir/$$lang.new.po \
Packit fc043f
	     ; then \
Packit fc043f
	  if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
Packit fc043f
	    rm -f $$tmpdir/$$lang.new.po; \
Packit fc043f
	  else \
Packit fc043f
	    if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
Packit fc043f
	      :; \
Packit fc043f
	    else \
Packit fc043f
	      echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
Packit fc043f
	      exit 1; \
Packit fc043f
	    fi; \
Packit fc043f
	  fi; \
Packit fc043f
	else \
Packit fc043f
	  echo "creation of $$lang.po failed!" 1>&2; \
Packit fc043f
	  rm -f $$tmpdir/$$lang.new.po; \
Packit fc043f
	fi
Packit fc043f
Packit fc043f
en@quot.insert-header: insert-header.sin
Packit fc043f
	sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
Packit fc043f
Packit fc043f
en@boldquot.insert-header: insert-header.sin
Packit fc043f
	sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
Packit fc043f
Packit fc043f
mostlyclean: mostlyclean-quot
Packit fc043f
mostlyclean-quot:
Packit fc043f
	rm -f *.insert-header