5 # System-specific configuration is in system.mk
7 include $(TOPDIR)/build/system-inc.mk
14 LXGETTEXT = lua-xgettext
16 TRANSLATIONS := fi cs fr
17 MO_FILES := $(patsubst %,%.mo, $(TRANSLATIONS))
18 PO_FILES := $(patsubst %,%.po, $(TRANSLATIONS))
34 EXTRA_POTFILES_LUA=../build/mkman.lua
41 LOCALEDIR := $(PREFIX)/share/locale
44 ######################################
46 include $(TOPDIR)/build/rules.mk
48 ######################################
50 potfiles: potdirs_potfiles
51 (for i in $(POTDIRS); do cat $$i/potfiles_c|sed "s:\w\+:$$i/&:"; done) > potfiles_c
52 (for i in $(POTDIRS); do cat $$i/potfiles_lua|sed "s:\w\+:$$i/&:"; done; \
53 for i in $(EXTRA_POTFILES_LUA); do echo $$i; done) > potfiles_lua
56 for i in $(POTDIRS); do make -C $$i _potfiles; done
60 $(POTFILE)_c: potfiles
61 $(XGETTEXT) -kTR -kDUMMY_TR -o $@ -f potfiles_c
63 $(POTFILE)_lua: potfiles
64 $(LXGETTEXT) -k TR -k bdoc -k submenu -k menuentry -o $@ \
67 $(POTFILE): $(POTFILE)_c $(POTFILE)_lua
69 # GNU gettext sucks bigtime, and refuses to work on POT
70 # files without encoding set. Therefore we'll just have to
71 # use plain old cat and hope that there aren't dupes.
81 for i in $(TRANSLATIONS); do \
82 $(INSTALLDIR) $(LOCALEDIR)/$$i/LC_MESSAGES ; \
83 $(INSTALL) -m $(DATA_MODE) $$i.mo $(LOCALEDIR)/$$i/LC_MESSAGES/ion3.mo ; \
87 $(MSGMERGE) -U fi.po $(POTFILE)
90 $(MSGMERGE) -U cs.po $(POTFILE)
93 $(MSGMERGE) -U fr.po $(POTFILE)