Makefile.template revision 14287
9725N/A
9725N/Aall:
14287N/A @MSGCAT=$${MSGCAT:-msgcat}; \
14287N/A MSGCAT_VERSION=`$$MSGCAT --version | head -1 | awk '{print $$NF}'`; \
14287N/A MSGCAT_VERSION=`echo $$MSGCAT_VERSION | awk -F. '{ print $$1 * 1000 + $$2 * 100 + $$3; }'`; \
14287N/A if [ $$MSGCAT_VERSION -lt 1500 ] ; then \
14287N/A MSGCAT=/usr/bin/msgcat; \
14287N/A MSGCAT_VERSION=`$$MSGCAT --version | head -1 | awk '{print $$NF}'`; \
14287N/A MSGCAT_VERSION=`echo $$MSGCAT_VERSION | awk -F. '{ print $$1 * 1000 + $$2 * 100 + $$3; }'`; \
14287N/A if [ $$MSGCAT_VERSION -lt 1500 ] ; then \
14287N/A printf "msgcat version 0.15 is required for msgctxt\n"; \
14287N/A printf "rf. http://live.gnome.org/GnomeGoals/MsgctxtMigration\n"; \
14287N/A exit 1; \
14287N/A fi; \
14287N/A fi; \
14287N/A \
14287N/A for po_sun in $(POFILES); do \
14287N/A po=$(PODIR)/$$po_sun; \
14287N/A if test ! -f $$po; then \
14287N/A continue; \
14287N/A fi; \
14287N/A \
14287N/A echo "Merging $$po_sun ..."; \
14287N/A \
14287N/A header_community=$${po_sun}.header; \
14287N/A I=0; \
14287N/A exec < $$po; \
14287N/A while read line; \
14287N/A do \
14287N/A is_comment=`echo $$line | grep '^#' | grep -v '^#,'`; \
14287N/A if [ x"$$is_comment" = x ] ; then \
14287N/A break; \
14287N/A fi; \
14287N/A I=`expr $$I + 1`; \
14287N/A done; \
14287N/A exec <&-; \
14287N/A if [ $$I -ne 0 ] ; then \
14287N/A sed -ne "1,$${I}p" $$po > $$header_community; \
14287N/A fi; \
14287N/A \
14287N/A if [ -f $$header_community ] ; then \
14287N/A $$MSGCAT --use-first $$po_sun $$po -o $$po.$$; \
14287N/A cat $$header_community $$po.$$ > $$po; \
14287N/A rm $$header_community $$po.$$; \
14287N/A else \
14287N/A $$MSGCAT --use-first $$po_sun $$po -o $$po; \
14287N/A fi; \
9725N/A done
9725N/A
9725N/Atop_builddir = ..
9725N/APODIR = $(top_builddir)/po
9725N/APOFILES = $(wildcard *.po)
9725N/A