2
# Makefile for the PO files (translation) catalog
4
# $Id: Makefile,v 1.6 2005/05/06 11:58:48 nphilipp Exp $
8
# What is this package?
9
NLSPACKAGE = system-config-samba
10
POTFILE = $(NLSPACKAGE).pot
11
INSTALL = /usr/bin/install -c
12
INSTALL_DATA = $(INSTALL) -m 644
13
INSTALL_DIR = /usr/bin/install -d
15
# destination directory
16
INSTALL_NLS_DIR = $(DESTDIR)/usr/share/locale
19
MSGMERGE = msgmerge -v
20
XGETTEXT = xgettext --default-domain=$(NLSPACKAGE) \
22
MSGFMT = msgfmt --statistics --verbose
24
# What do we need to do
25
POFILES = $(wildcard *.po)
26
MOFILES = $(patsubst %.po,%.mo,$(POFILES))
27
PYSRC = $(wildcard ../src/*.py)
28
SRCFILES = $(PYSRC) system-config-samba.gladestrings ../system-config-samba.desktop.in.h
32
all:: update-po $(MOFILES)
34
$(POTFILE): $(SRCFILES)
35
$(XGETTEXT) --keyword=_ --keyword=N_ $(SRCFILES)
36
@if cmp -s $(NLSPACKAGE).po $(POTFILE); then \
37
rm -f $(NLSPACKAGE).po; \
39
mv -f $(NLSPACKAGE).po $(POTFILE); \
42
update-po: Makefile $(POTFILE) refresh-po
45
for cat in $(POFILES); do \
46
lang=`basename $$cat .po`; \
47
if $(MSGMERGE) $$lang.po $(POTFILE) > $$lang.pot ; then \
48
mv -f $$lang.pot $$lang.po ; \
49
echo "$(MSGMERGE) of $$lang succeeded" ; \
51
echo "$(MSGMERGE) of $$lang failed" ; \
57
@rm -fv *mo *~ .depend
60
@for n in $(MOFILES); do \
61
l=`basename $$n .mo`; \
62
$(INSTALL_DIR) $(INSTALL_NLS_DIR)/$$l/LC_MESSAGES; \
63
$(INSTALL_DATA) --verbose $$n $(INSTALL_NLS_DIR)/$$l/LC_MESSAGES/$(NLSPACKAGE).mo; \
69
.PHONY: missing depend