PACKAGE = rummikub
SRCS = rummikub.py drawing.py network.py $(PACKAGE).glade

all: messages.pot

po: ko.po

%.po: messages.pot
	msgmerge -U $@ $<
	touch $@

messages.pot: $(SRCS)
	xgettext -k_ -kN_ -o $@ $(SRCS)

install: all rummikub.png
	@for i in *.po; do \
		lang="$$(basename "$$i" .po)"; \
		mkdir -p "locale/$$lang/LC_MESSAGES"; \
		msgfmt "$$i" -o "locale/$$lang/LC_MESSAGES/$(PACKAGE).mo"; \
	done

rummikub.png: rummikub.svg
	inkscape -e $@ $<

uninstall:
	rm -rf locale rummikub.png
	
clean:
	rm -f *~ *.bak *.pyc *.pyo
