aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2011-03-24 21:13:54 +0100
committerPetr Mladek <pmladek@suse.cz>2011-03-25 12:16:11 +0100
commit79ceda13920132cdefd5a0f60be790fcac7c0992 (patch)
treeab68323acfb4cde08ae91b7dd5f547ac6e3aedc6
parent9ae137824f3b25b795c27f8d735c73ab79b9fc47 (diff)
allow to use internal translate-toolkit
set optional build dependency and paths
-rw-r--r--translations/makefile.mk24
-rw-r--r--translations/prj/build.lst2
2 files changed, 23 insertions, 3 deletions
diff --git a/translations/makefile.mk b/translations/makefile.mk
index b98809c7a3c..876f2c3fea7 100644
--- a/translations/makefile.mk
+++ b/translations/makefile.mk
@@ -48,6 +48,26 @@ TARGET=translations_merge
.INCLUDE : target.mk
+.IF "$(SYSTEM_TRANSLATE_TOOLKIT)" != "YES"
+
+OO2PO=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(SOLARBINDIR)/oo2po
+PO2OO=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(SOLARBINDIR)/po2oo
+
+TRANSLATE_TOOLKIT_PYTHONPATH=$(SOLARLIBDIR)$/translate_toolkit
+.IF "$(SYSTEM_PYTHON)" == "YES"
+PYTHONPATH:=$(TRANSLATE_TOOLKIT_PYTHONPATH)
+.ELSE
+PYTHONPATH:=$(SOLARLIBDIR)/python:$(TRANSLATE_TOOLKIT_PYTHONPATH)
+.ENDIF
+.EXPORT: PYTHONPATH
+
+.ELSE # "$(SYSTEM_PYTHON)"!="YES"
+
+OO2PO=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) oo2po
+PO2OO=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) po2oo
+
+.ENDIF # "$(SYSTEM_PYTHON)"!="YES"
+
.IF "$(WITH_LANG)" == "ALL"
all_languages:=$(shell cd $(PRJ)/source && ls -1)
.ELSE
@@ -60,7 +80,7 @@ $(MISC)/sdf-template/en-US.sdf :
$(SOLARSRC)/solenv/bin/localize -e -l en-US -f $(SRC_ROOT)/$(PRJNAME)/$@
pot : $(MISC)/sdf-template/en-US.sdf
- oo2po -P -i $< -o $(MISC)/pot
+ $(OO2PO) -P -i $< -o $(MISC)/pot
$(MISC)/sdf-l10n/%.sdf : $(MISC)/sdf-template/en-US.sdf
.IF "$(WITH_LANG)" == "kid"
@@ -68,7 +88,7 @@ $(MISC)/sdf-l10n/%.sdf : $(MISC)/sdf-template/en-US.sdf
sed -e "s/\ten-US\t/\tkid\t/" < $@.tmp > $@
rm -f $@.tmp
.ELSE
- po2oo -i $(PRJ)/source/$(@:b) -t $(MISC)/sdf-template/en-US.sdf -o $@ -l $(@:b)
+ $(PO2OO) -i $(PRJ)/source/$(@:b) -t $(MISC)/sdf-template/en-US.sdf -o $@ -l $(@:b)
# FIXME: waiting for fix of http://bugs.locamotion.org/show_bug.cgi?id=1883
# po2oo --skipsource -i $(PRJ)/source/$(@:b) -t $(MISC)/sdf-template/en-US.sdf -o $@ -l $(@:b)
grep -v " en-US " $@ > $@.tmp
diff --git a/translations/prj/build.lst b/translations/prj/build.lst
index 4ec5b78d6be..4be8ec3db9a 100644
--- a/translations/prj/build.lst
+++ b/translations/prj/build.lst
@@ -1,2 +1,2 @@
-translations translations : l10ntools NULL
+translations translations : l10ntools TRANSLATE_TOOLKIT:translate_toolkit NULL
translations translations nmake - all translations_source NULL