Rules-quot 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 [email protected] [email protected] insert-header.sin Rules-quot
  8. .SUFFIXES: .insert-header .po-update-en
  9. [email protected]:
  10. $(MAKE) [email protected]
  11. [email protected]:
  12. $(MAKE) [email protected]
  13. [email protected]: [email protected]
  14. [email protected]: [email protected]
  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. [email protected]: insert-header.sin
  49. sed -e '/^#/d' -e 's/HEADER/[email protected]/g' $(srcdir)/insert-header.sin > [email protected]
  50. [email protected]: insert-header.sin
  51. sed -e '/^#/d' -e 's/HEADER/[email protected]/g' $(srcdir)/insert-header.sin > [email protected]
  52. mostlyclean: mostlyclean-quot
  53. mostlyclean-quot:
  54. rm -f *.insert-header