Migrate certificates, icons, logs to XDG dirs
[pidgin-git.git] / po / Makefile.mingw
blobed67ec02b77882a37a1ea1b09f4d84a7b3f145fd
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         @echo -e "  GEN\t$@"
26         @rm -f $@ && $(GMSGFMT) --statistics -o $@ $<
29 ## TARGETS
32 .PHONY: all install clean
34 all: $(CATALOGS)
36 install: all
37         mkdir -p $(PURPLE_INSTALL_PO_DIR)
38         @catalogs='$(CATALOGS)'; \
39         for cat in $$catalogs; do \
40           cat=`basename $$cat`; \
41           lang=`echo $$cat | sed 's/\.gmo$$//'`; \
42           dir=$(PURPLE_INSTALL_PO_DIR)/$$lang/LC_MESSAGES; \
43           mkdir -p $$dir; \
44           if test -r $$cat; then \
45             cp $$cat $$dir/$(PACKAGE).mo; \
46             echo "installing $$cat as $$dir/$(PACKAGE).mo"; \
47           else \
48             cp $(PURPLE_PO_TOP)/$$cat $$dir/$(PACKAGE).mo; \
49             echo "installing $(PURPLE_PO_TOP)/$$cat as" \
50                  "$$dir/$(PACKAGE).mo"; \
51           fi; \
52         done
54 clean:
55         rm -f *.gmo