Home | History | Annotate | Line # | Download | only in po
Rules-quot revision 1.1
      1  1.1  mrg # This file, Rules-quot, can be copied and used freely without restrictions.
      2  1.1  mrg # Special Makefile rules for English message catalogs with quotation marks.
      3  1.1  mrg 
      4  1.1  mrg DISTFILES.common.extra1 = quot.sed boldquot.sed en (a] quot.header en (a] boldquot.header insert-header.sin Rules-quot
      5  1.1  mrg 
      6  1.1  mrg .SUFFIXES: .insert-header .po-update-en
      7  1.1  mrg 
      8  1.1  mrg en (a] quot.po-create:
      9  1.1  mrg 	$(MAKE) en (a] quot.po-update
     10  1.1  mrg en (a] boldquot.po-create:
     11  1.1  mrg 	$(MAKE) en (a] boldquot.po-update
     12  1.1  mrg 
     13  1.1  mrg en (a] quot.po-update: en (a] quot.po-update-en
     14  1.1  mrg en (a] boldquot.po-update: en (a] boldquot.po-update-en
     15  1.1  mrg 
     16  1.1  mrg .insert-header.po-update-en:
     17  1.1  mrg 	@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
     18  1.1  mrg 	if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
     19  1.1  mrg 	tmpdir=`pwd`; \
     20  1.1  mrg 	echo "$$lang:"; \
     21  1.1  mrg 	ll=`echo $$lang | sed -e 's/@.*//'`; \
     22  1.1  mrg 	LC_ALL=C; export LC_ALL; \
     23  1.1  mrg 	cd $(srcdir); \
     24  1.1  mrg 	if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \
     25  1.1  mrg 	   | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \
     26  1.1  mrg 	   { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
     27  1.1  mrg 	     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \
     28  1.1  mrg 	       $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \
     29  1.1  mrg 	       ;; \
     30  1.1  mrg 	     *) \
     31  1.1  mrg 	       $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \
     32  1.1  mrg 	       ;; \
     33  1.1  mrg 	     esac } 2>/dev/null > $$tmpdir/$$lang.new.po \
     34  1.1  mrg 	     ; then \
     35  1.1  mrg 	  if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
     36  1.1  mrg 	    rm -f $$tmpdir/$$lang.new.po; \
     37  1.1  mrg 	  else \
     38  1.1  mrg 	    if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
     39  1.1  mrg 	      :; \
     40  1.1  mrg 	    else \
     41  1.1  mrg 	      echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
     42  1.1  mrg 	      exit 1; \
     43  1.1  mrg 	    fi; \
     44  1.1  mrg 	  fi; \
     45  1.1  mrg 	else \
     46  1.1  mrg 	  echo "creation of $$lang.po failed!" 1>&2; \
     47  1.1  mrg 	  rm -f $$tmpdir/$$lang.new.po; \
     48  1.1  mrg 	fi
     49  1.1  mrg 
     50  1.1  mrg en (a] quot.insert-header: insert-header.sin
     51  1.1  mrg 	sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en (a] quot.insert-header
     52  1.1  mrg 
     53  1.1  mrg en (a] boldquot.insert-header: insert-header.sin
     54  1.1  mrg 	sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en (a] boldquot.insert-header
     55  1.1  mrg 
     56  1.1  mrg mostlyclean: mostlyclean-quot
     57  1.1  mrg mostlyclean-quot:
     58  1.1  mrg 	rm -f *.insert-header
     59