3 @MSGCAT
=$${MSGCAT
:-msgcat
}; \
4 MSGCAT_VERSION
=`$$MSGCAT --version | head -1 | awk '{print $$NF}'`; \
5 MSGCAT_VERSION
=`echo $$MSGCAT_VERSION | awk -F. '{ print $$1 * 1000 + $$2 * 100 + $$3; }'`; \
6 if
[ $$MSGCAT_VERSION -lt
1500 ] ; then \
7 MSGCAT
=/usr
/bin
/msgcat
; \
8 MSGCAT_VERSION
=`$$MSGCAT --version | head -1 | awk '{print $$NF}'`; \
9 MSGCAT_VERSION
=`echo $$MSGCAT_VERSION | awk -F. '{ print $$1 * 1000 + $$2 * 100 + $$3; }'`; \
10 if
[ $$MSGCAT_VERSION -lt
1500 ] ; then \
11 printf
"msgcat version 0.15 is required for msgctxt\n"; \
12 printf
"rf. http://live.gnome.org/GnomeGoals/MsgctxtMigration\n"; \
17 for po_sun in
$(POFILES
); do \
18 po
=$(PODIR
)/$$po_sun; \
19 if
test ! -f
$$po; then \
23 echo
"Merging $$po_sun ..."; \
25 header_community
=$${po_sun}.header
; \
30 is_comment
=`echo $$line | grep '^#' | grep -v '^#,'`; \
31 if
[ x
"$$is_comment" = x
] ; then \
37 if
[ $$I -ne
0 ] ; then \
38 sed
-ne
"1,$${I}p" $$po > $$header_community; \
41 po_sun_no_obs
=$$po_sun.no_obs
; \
42 sed
-e
"/^#~/d" $$po_sun > $$po_sun_no_obs; \
44 if
[ -f
$$header_community ] ; then \
45 $$MSGCAT --use-first
$$po_sun_no_obs $$po -o
$$po.
$$; \
46 cat
$$header_community $$po.
$$ > $$po; \
47 rm $$header_community $$po.
$$; \
49 $$MSGCAT --use-first
$$po_sun_no_obs $$po -o
$$po; \
54 PODIR
= $(top_builddir
)/po
55 POFILES
= $(wildcard *.po
)