ieee1275: split up grub_machine_get_bootlocation
[grub.git] / po / Rules-piglatin
1 # Special Makefile rules for Pig Latin message catalogs with quotation marks.
2
3 DISTFILES.common.extra3 = piglatin.sed en@piglatin.header insert-header.sin Rules-piglatin
4
5 .SUFFIXES: .insert-header .po-update-en-piglatin
6
7 en@piglatin.po-create:
8         $(MAKE) en@piglatin.po-update
9
10 en@piglatin.po-update: en@piglatin.po-update-en
11
12 .insert-header.po-update-en-piglatin:
13         @lang=`echo $@ | sed -e 's/\.po-update-en-piglatin$$//'`; \
14         if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
15         tmpdir=`pwd`; \
16         echo "$$lang:"; \
17         ll=`echo $$lang | sed -e 's/@.*//'`; \
18         LC_ALL=C; export LC_ALL; \
19         cd $(srcdir); \
20         if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
21           if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
22             rm -f $$tmpdir/$$lang.new.po; \
23           else \
24             if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
25               :; \
26             else \
27               echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
28               exit 1; \
29             fi; \
30           fi; \
31         else \
32           echo "creation of $$lang.po failed!" 1>&2; \
33           rm -f $$tmpdir/$$lang.new.po; \
34         fi
35
36 en@piglatin.insert-header: insert-header.sin
37         sed -e '/^#/d' -e 's/HEADER/en@piglatin.header/g' $(srcdir)/insert-header.sin > en@piglatin.insert-header
38
39 mostlyclean: mostlyclean-piglatin
40 mostlyclean-piglatin:
41         rm -f *.insert-header