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