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