# Makefile INSTALL = install MSGFMT = msgfmt EXES = all .PHONY : all install update update_pot all: LANGS = ru fr bg cl_kernel_%.mo: cl_kernel_%.po ${MSGFMT} -o $@ $(subst .mo,.po,$@) cl_lxc_%.mo: cl_lxc_%.po ${MSGFMT} -o $@ $(subst .mo,.po,$@) MOFILE = $(subst install_,,$@) LOCALEMO = $(subst .mo,,$(subst install_cl_lxc_,,$(subst install_cl_kernel_,,$@))) install_cl_kernel_%.mo: cl_kernel_%.mo ${INSTALL} -D -m 0644 $(MOFILE) ${DESTDIR}/usr/share/locale/$(LOCALEMO)/LC_MESSAGES/cl_kernel.mo install_cl_lxc_%.mo: cl_lxc_%.mo ${INSTALL} -D -m 0644 $(MOFILE) ${DESTDIR}/usr/share/locale/$(LOCALEMO)/LC_MESSAGES/cl_lxc.mo update_pot: FORCE bash --dump-po-strings ../cl-kernel | msguniq >cl_kernel.pot bash --dump-po-strings ../cl-lxc | msguniq >cl_lxc.pot POFILE = $(subst update_,,$@) update_cl_kernel_%.po: cl_kernel.pot msgmerge --update $(POFILE) cl_kernel.pot update_cl_lxc_%.po: cl_lxc.pot msgmerge --update $(POFILE) cl_lxc.pot update_kernel: $(addsuffix .po,$(addprefix update_cl_kernel_,$(LANGS))) update_lxc: $(addsuffix .po,$(addprefix update_cl_lxc_,ru)) update: update_kernel update_lxc install: all $(addsuffix .mo,$(addprefix install_cl_kernel_,$(LANGS))) $(addsuffix .mo,$(addprefix install_cl_lxc_,ru)) #install_cl_kernel_ru.mo install_cl_kernel_fr.mo FORCE: