Rules-quot (2483B)
1 # Special Makefile rules for English message catalogs with quotation marks. 2 # 3 # Copyright (C) 2001-2024 Free Software Foundation, Inc. 4 # This file is free software; the Free Software Foundation 5 # gives unlimited permission to copy and/or distribute it, 6 # with or without modifications, as long as this notice is preserved. 7 # This file is offered as-is, without any warranty. 8 # 9 # Written by Bruno Haible <bruno@clisp.org>, 2001. 10 11 DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sed Rules-quot 12 13 .SUFFIXES: .insert-header .po-update-en 14 15 en@quot.po-create: 16 $(MAKE) en@quot.po-update 17 en@boldquot.po-create: 18 $(MAKE) en@boldquot.po-update 19 20 en@quot.po-update: en@quot.po-update-en 21 en@boldquot.po-update: en@boldquot.po-update-en 22 23 .insert-header.po-update-en: 24 @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ 25 if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ 26 tmpdir=`pwd`; \ 27 echo "$$lang:"; \ 28 ll=`echo $$lang | sed -e 's/@.*//'`; \ 29 LC_ALL=C; export LC_ALL; \ 30 cd $(srcdir); \ 31 if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \ 32 | $(SED) -f $$tmpdir/$$lang.insert-header | $(SED) -e '/^%%/d' \ 33 | $(MSGCONV) -t UTF-8 | \ 34 { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ 35 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \ 36 $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \ 37 ;; \ 38 *) \ 39 $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \ 40 ;; \ 41 esac } 2>/dev/null > $$tmpdir/$$lang.new.po \ 42 ; then \ 43 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 44 rm -f $$tmpdir/$$lang.new.po; \ 45 else \ 46 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ 47 :; \ 48 else \ 49 echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ 50 exit 1; \ 51 fi; \ 52 fi; \ 53 else \ 54 echo "creation of $$lang.po failed!" 1>&2; \ 55 rm -f $$tmpdir/$$lang.new.po; \ 56 fi 57 58 en@quot.insert-header: insert-header.sed 59 sed -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sed > en@quot.insert-header 60 61 en@boldquot.insert-header: insert-header.sed 62 sed -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sed > en@boldquot.insert-header 63 64 mostlyclean: mostlyclean-quot 65 mostlyclean-quot: 66 rm -f *.insert-header