PO-FILES=@POFILES@ LANGUAGES=$(PO-FILES:.po=) # Maybe this should be autogenerated by "configure". LOCALEDIR=@LOCALEDIR@ # If other files will be translated, they must be also here: CSOURCES=../ui/ui.c ../ui-hlp/menu.c \ ../ui-hlp/play.c ../ui-hlp/ui_helper.c \ ../engine/zoom.c ../engine/btrace.c \ ../ui/dialog.c ../ui/filesel.c ../ui-hlp/render.c \ ../ui/ui-drv/win32/ui_win32.c \ ../ui/ui-drv/cocoa/AppController.m \ ../ui/ui-drv/cocoa/CustomDialog.m MO-FILES = $(LANGUAGES:=.mo) all: $(MO-FILES) install: $(MO-FILES) @for i in $(LANGUAGES); do \ @INSTALL@ -d $(DESTDIR)$(LOCALEDIR)/$$i/LC_MESSAGES; \ @INSTALL@ -m 444 $$i.mo $(DESTDIR)$(LOCALEDIR)/$$i/LC_MESSAGES/xaos.mo; \ done install-win: $(MO-FILES) @for i in $(LANGUAGES); do \ @INSTALL@ -d $(DESTDIR)/locale/$$i/LC_MESSAGES; \ @INSTALL@ -m 444 $$i.mo $(DESTDIR)/locale/$$i/LC_MESSAGES/xaos.mo; \ done clean: rm -f $(MO-FILES) distclean: clean rm Makefile messages.pot: $(CSOURCES) @XGETTEXT@ -o messages.pot $(CSOURCES) $(PO-FILES): messages.pot test -e $@ @MSGMERGE@ $@ messages.pot > $@.new mv $@.new $@ $(MO-FILES): $(PO-FILES) @MSGFMT@ -o $@ -c -v --statistics $(@:.mo=.po) new-languages: Makefile @for i in $(LANGUAGES); do \ test -e $$i.po || cp messages.pot $$i.po; \ done