Rules-quot 2.3 KB

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