view po/Makefile.mingw @ 21016:abd768f06e7b

Another patch from Andrew Gaul that plugs a leak: ==15182== 163 bytes in 5 blocks are definitely lost in loss record 116 of 231 ==15182== at 0x40054E5: malloc (vg_replace_malloc.c:149) ==15182== by 0xBFFC25: g_malloc (in /lib/libglib-2.0.so.0.1200.13) ==15182== by 0xC132B8: g_strdup (in /lib/libglib-2.0.so.0.1200.13) ==15182== by 0x40A7B9F: purple_url_parse (util.c:3460) ==15182== by 0x4C58C89: yahoo_fetch_aliases (yahoo_aliases.c:152)
author Ka-Hing Cheung <khc@hxbc.us>
date Fri, 26 Oct 2007 05:22:26 +0000
parents ded8da3de5f8
children aaaff38e144f
line wrap: on
line source

# Makefile.mingw
#
# Description: Makefile to generate mo files
#

PIDGIN_TREE_TOP := ..
include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak

PACKAGE = pidgin

.SUFFIXES:
.SUFFIXES: .po .gmo

##
## SOURCES, OBJECTS
##

CATALOGS = $(patsubst %.po,%.gmo,$(wildcard *.po))

##
## RULES
##

.po.gmo:
	rm -f $@ && $(GMSGFMT) --statistics -o $@ $<

##
## TARGETS
##

.PHONY: all install clean

all: $(CATALOGS)

install: all
	mkdir -p $(PURPLE_INSTALL_PO_DIR)
	@catalogs='$(CATALOGS)'; \
	for cat in $$catalogs; do \
	  cat=`basename $$cat`; \
	  lang=`echo $$cat | sed 's/\.gmo$$//'`; \
	  dir=$(PURPLE_INSTALL_PO_DIR)/$$lang/LC_MESSAGES; \
	  mkdir -p $$dir; \
	  if test -r $$cat; then \
	    cp $$cat $$dir/$(PACKAGE).mo; \
	    echo "installing $$cat as $$dir/$(PACKAGE).mo"; \
	  else \
	    cp $(PURPLE_PO_TOP)/$$cat $$dir/$(PACKAGE).mo; \
	    echo "installing $(PURPLE_PO_TOP)/$$cat as" \
		 "$$dir/$(PACKAGE).mo"; \
	  fi; \
	done

clean:
	rm -f *.gmo