summaryrefslogtreecommitdiffstats
path: root/po/Makefile
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2004-08-11 08:35:04 +0000
committerPablo Saratxaga <pablo@mandriva.com>2004-08-11 08:35:04 +0000
commit2dc841550649675162cef0939a477ad1a269bf0e (patch)
treedcacc017dec4f68ffdc43b075c905bdf401e32cf /po/Makefile
parenta0d6d11810ddab146462dba53c5639661f1563b0 (diff)
downloaddrakpxelinux-2dc841550649675162cef0939a477ad1a269bf0e.tar
drakpxelinux-2dc841550649675162cef0939a477ad1a269bf0e.tar.gz
drakpxelinux-2dc841550649675162cef0939a477ad1a269bf0e.tar.bz2
drakpxelinux-2dc841550649675162cef0939a477ad1a269bf0e.tar.xz
drakpxelinux-2dc841550649675162cef0939a477ad1a269bf0e.zip
some preliminary framework for i18n
Diffstat (limited to 'po/Makefile')
-rw-r--r--po/Makefile45
1 files changed, 45 insertions, 0 deletions
diff --git a/po/Makefile b/po/Makefile
new file mode 100644
index 0000000..7ead00c
--- /dev/null
+++ b/po/Makefile
@@ -0,0 +1,45 @@
+# Installation directories
+localedir = $(PREFIX)/usr/share/locale
+
+PGOAL = drakpxelinux
+
+# perl files to search translatable strings in
+PL_FILES = ../drakpxelinux.pl
+# C-like files to search translatable strings in
+#CFILES = ./placeholder.h
+
+POFILES = $(shell ls *.po)
+MOFILES = $(POFILES:%.po=%.mo)
+LANGS = $(POFILES:%.po=%)
+
+GOALS = $(PGOAL).pot $(MOFILES)
+
+
+all: $(GOALS)
+
+%.mo: %.po
+ msgfmt -o $@ $<
+
+placeholder.h:
+ ./create_placeholder
+
+merge: $(PGOAL).pot
+ @for n in $(POFILES); do \
+ echo "Merging $$n"; \
+ msgmerge "$$n" $< > "$$n"t; \
+ mv -f "$$n"t "$$n"; \
+ done
+
+$(PGOAL).pot: $(CFILES)
+ perl_checker -q --generate-pot $(PGOAL).pot $(PL_FILES)
+
+install: all
+ for l in $(LANGS); do \
+ install -d $(localedir)/$$l/LC_MESSAGES; \
+ install -m 644 $$l.mo $(localedir)/$$l/LC_MESSAGES/$(PGOAL).mo; \
+ done
+
+clean:
+ @rm -rf *~ *.mo $(MOFILES)
+
+