merge of '9c23321e1b689003d3b54e1b879b816dd97e0adc'
[pidgin-git.git] / po / Makefile.mingw
blob2ffada376b325a231f6b54ba6c9a10d63f16c75e
1 # Makefile.mingw
3 # Description: Makefile to generate mo files
6 PIDGIN_TREE_TOP := ..
7 include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
9 PACKAGE = pidgin
11 .SUFFIXES:
12 .SUFFIXES: .po .gmo
15 ## SOURCES, OBJECTS
18 CATALOGS = $(patsubst %.po,%.gmo,$(wildcard *.po))
21 ## RULES
24 .po.gmo:
25         rm -f $@ && $(GMSGFMT) --statistics -o $@ $<
28 ## TARGETS
31 .PHONY: all install clean
33 all: $(CATALOGS)
35 install: 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
53 clean:
54         rm -f *.gmo