1# Makefile.mingw 2# 3# Description: Makefile to generate mo files 4# 5 6PIDGIN_TREE_TOP := .. 7include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak 8 9PACKAGE = pidgin 10 11.SUFFIXES: 12.SUFFIXES: .po .gmo 13 14## 15## SOURCES, OBJECTS 16## 17 18CATALOGS = $(patsubst %.po,%.gmo,$(wildcard *.po)) 19 20## 21## RULES 22## 23 24.po.gmo: 25 rm -f $@ && $(GMSGFMT) --statistics -o $@ $< 26 27## 28## TARGETS 29## 30 31.PHONY: all install clean 32 33all: $(CATALOGS) 34 35install: all 36 mkdir -p $(PURPLE_INSTALL_PO_DIR) 37 @catalogs='$(CATALOGS)'; \ 38 for cat in $$catalogs; do \ 39 cat=`basename $$cat`; \ 40 lang=`echo $$cat | sed 's/\.gmo$$//'`; \ 41 dir=$(PURPLE_INSTALL_PO_DIR)/$$lang/LC_MESSAGES; \ 42 mkdir -p $$dir; \ 43 if test -r $$cat; then \ 44 cp $$cat $$dir/$(PACKAGE).mo; \ 45 echo "installing $$cat as $$dir/$(PACKAGE).mo"; \ 46 else \ 47 cp $(PURPLE_PO_TOP)/$$cat $$dir/$(PACKAGE).mo; \ 48 echo "installing $(PURPLE_PO_TOP)/$$cat as" \ 49 "$$dir/$(PACKAGE).mo"; \ 50 fi; \ 51 done 52 53clean: 54 rm -f *.gmo 55