35 lines
929 B
Makefile
35 lines
929 B
Makefile
NAME = gajim
|
|
LANGS := fr pt el pl es ru bg de nb cs nl pt_BR sv it eu sk no zh_CN br eo
|
|
LANGS_PO:=$(foreach LANG, ${LANGS}, ${LANG}.po)
|
|
LANGS_MO:=$(foreach LANG, ${LANGS}, ${LANG}.mo)
|
|
DATADIR:=$(subst //,/,${DESTDIR}/${PREFIX}/share)
|
|
GLADESRC=$(wildcard ../data/glade/*.glade)
|
|
PYSRC=$(wildcard ../src/*py ../src/common/*py)
|
|
POTSRC:=../gajim.desktop.in $(foreach FILE, ${GLADESRC}, ${FILE}.h) $(PYSRC)
|
|
|
|
all: $(LANGS_MO)
|
|
|
|
%.mo: %.po
|
|
msgfmt $< -o $@
|
|
|
|
%.glade.h: %.glade
|
|
intltool-extract --type=gettext/glade $<
|
|
|
|
POTFILES.in: $(POTSRC)
|
|
echo -e "# generated by make POTFILES.in\n[encoding: UTF-8]" $(subst ../,\\n,$^) "\n" >POTFILES.in
|
|
|
|
gajim.pot: POTFILES.in
|
|
intltool-update --pot --gettext-package=$(NAME)
|
|
|
|
install:
|
|
for l in ${LANGS}; do\
|
|
dir=${DATADIR}/locale/$${l}/LC_MESSAGES;\
|
|
if test ! -d $${dir}; then\
|
|
install -m 755 -d $${dir};\
|
|
fi;\
|
|
install -m 644 $${l}.mo $${dir}/${NAME}.mo;\
|
|
done
|
|
|
|
clean:
|
|
rm -f *.mo
|