summaryrefslogtreecommitdiff
path: root/makefiles/gmake
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-03-18 13:00:45 +0100
committerAndreas Baumann <abaumann@yahoo.com>2009-03-18 13:00:45 +0100
commitda1b50e2830452d08649c7c71ce07367b9ad75e6 (patch)
treef3138a1a667bfa1ae52146a8780da64727405f45 /makefiles/gmake
parent6ce34263d161c066e3f3347cb83626b13753818b (diff)
downloadwolfbones-da1b50e2830452d08649c7c71ce07367b9ad75e6.tar.gz
wolfbones-da1b50e2830452d08649c7c71ce07367b9ad75e6.tar.bz2
fixed more gettext stuff (installation, generation), also fixed src/GNUMakefile (LIBS)
Diffstat (limited to 'makefiles/gmake')
-rw-r--r--makefiles/gmake/i18n.mk29
-rw-r--r--makefiles/gmake/install.mk2
-rw-r--r--makefiles/gmake/sub.mk2
3 files changed, 18 insertions, 15 deletions
diff --git a/makefiles/gmake/i18n.mk b/makefiles/gmake/i18n.mk
index 46dd829..013f5bd 100644
--- a/makefiles/gmake/i18n.mk
+++ b/makefiles/gmake/i18n.mk
@@ -26,23 +26,31 @@ MO_FILES = $(addprefix po/, $(addsuffix .mo, $(GETTEXT_LANGUAGES)))
%.mo : %.po
$(MSGFMT) -c -o $@ $<
-all-po: $(MO_FILES)
-
-init-po: po/$(CATALOG_NAME).pot
-
po/$(CATALOG_NAME).pot: $(GETTEXT_FILES)
$(XGETTEXT) -n -F -d $(CATALOG_NAME) -o $@ \
$(addprefix -k, $(GETTEXT_TRIGGERS)) --flag=_:1:pass-c-format \
-d $(CATALOG_NAME) -n -F $(GETTEXT_FILES)
+init-po: po/$(CATALOG_NAME).pot
+
clean_po:
- echo "Removing po files.."
+ @-rm -f $(MO_FILES)
+ @-rm -f po/$(CATALOG_NAME).pot
+
+# hooks for the standard targets handling gettext stuff
+
+all_po: $(MO_FILES)
+
+install_po:
+ @test -z "$(GETTEXT_LANGUAGES)" || \
+ for lang in $(GETTEXT_LANGUAGES)""; do ( \
+ echo "install po/$$lang.mo to $(localedir)/$$lang/LC_MESSAGES.." && \
+ $(INSTALL) -d -m 755 $(localedir)/$$lang/LC_MESSAGES && \
+ $(INSTALL) -m 644 po/$$lang.mo $(localedir)/$$lang/LC_MESSAGES/$(CATALOG_NAME).mo || exit 1 \
+ ) done
# TODO: sort out below
-# initial creation of the translation table:
-# msginit -l de_CH -o test_gettext_de_CH.po -i test_gettext.pot
-#
# merge the changes into the translation tables keeping existing
# translations
# msgmerge -s -U test_gettext_de_CH.po test_gettext.pot
@@ -50,11 +58,6 @@ clean_po:
# compile message files into binary format:
# msgfmt -c -v -o test_gettext_de.mo test_gettext_de.po
-# a potfile is a set of files, we can't just do this!
-#%.pot: %.c
-# xgettext -k_ --flag=_:1:pass-c-format -d test_gettext -s -o $@ $<
-# touch $@
-
#test_gettext_de.po: test_gettext.pot
# msgmerge -s -U $@ -i $<
# touch $@
diff --git a/makefiles/gmake/install.mk b/makefiles/gmake/install.mk
index 4f1e1e5..225c999 100644
--- a/makefiles/gmake/install.mk
+++ b/makefiles/gmake/install.mk
@@ -27,4 +27,4 @@ install_recursive:
@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
(set -e; $(MAKE) -C $$d install || exit 1); done)
-install: install_recursive local_install
+install: install_recursive local_install install_po
diff --git a/makefiles/gmake/sub.mk b/makefiles/gmake/sub.mk
index 89c6bbb..71a08c7 100644
--- a/makefiles/gmake/sub.mk
+++ b/makefiles/gmake/sub.mk
@@ -12,7 +12,7 @@
-include $(TOPDIR)/makefiles/gmake/compiler.mk
.PHONY: all $(SUBDIRS) local_all
-all: $(OBJS) $(CPPOBJS) $(BIN_OBJS) $(CPP_BIN_OBJS) $(BINS) $(CPP_BINS) $(CMODULES) $(CPPMODULES) local_all
+all: $(OBJS) $(CPPOBJS) $(BIN_OBJS) $(CPP_BIN_OBJS) $(BINS) $(CPP_BINS) $(CMODULES) $(CPPMODULES) local_all all_po
@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
(set -e; $(MAKE) -C $$d all || exit 1); done)