2
0

Rules-quot 2.2 KB

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