summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/po/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone/po/Makefile')
-rw-r--r--perl-install/standalone/po/Makefile50
1 files changed, 50 insertions, 0 deletions
diff --git a/perl-install/standalone/po/Makefile b/perl-install/standalone/po/Makefile
new file mode 100644
index 000000000..88dd3c899
--- /dev/null
+++ b/perl-install/standalone/po/Makefile
@@ -0,0 +1,50 @@
+include ../../Makefile.config
+
+NAME = libDrakX-standalone
+LOCALEDIR = $(DATADIR)/locale
+PMSFILES = $(STANDALONEPMS_)
+PMSFILES_HERE = $(wildcard $(PMSFILES:%=../%))
+top_srcdir=..
+
+MAIN_PO_FILES = ../../share/po/libDrakX.pot
+
+POFILES = $(wildcard *.po)
+MOFILES = $(POFILES:%.po=%.mo)
+LANGS = $(POFILES:%.po=%)
+
+default: $(MOFILES)
+
+%.mo: %.po
+ msgfmt -o $@ $<
+
+update_n_merge: $(NAME).pot merge
+
+merge: $(NAME).pot
+ for n in $(POFILES); do \
+ echo "Merging $$n"; \
+ msgmerge $$n $(NAME).pot > "$$n"t ; \
+ mv -f "$$n"t $$n ; \
+ done
+
+$(NAME).pot: $(PMSFILES_HERE) POTFILES.in
+ intltool-update --gettext-package desktopstuff --pot
+ cd .. ; perl_checker -q --generate-pot po/.$@ $(PMSFILES)
+ xgettext $(MAIN_PO_FILES:%=-x %) -o ..$@ .$@
+ msgcat --use-first .$@ desktopstuff.pot > $@
+ rm -f desktopstuff.pot $(NAME)_tmp.pot .$@ ..$@
+
+install: $(MOFILES)
+ for l in $(LANGS); do \
+ install -d $(LOCALEDIR)/$$l/LC_MESSAGES; \
+ install -m 644 $$l.mo $(LOCALEDIR)/$$l/LC_MESSAGES/$(NAME).mo; \
+ done
+
+POTFILES.in:
+ (cd .. ; /bin/ls -1 menu/*.desktop.in polkit/*.policy.in; ) > POTFILES.in
+
+
+clean:
+ @rm -rf *.mo $(POFILES:%=%t) POTFILES.in
+
+check:
+ for i in *.po; do msgfmt -c $$i -o /dev/null; done