summaryrefslogtreecommitdiff
path: root/writerfilter/CustomTarget_source.mk
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-06-10 09:08:50 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-06-10 09:15:42 +0200
commitf3160a7effe70f10c669b085c840bfc77b8ef671 (patch)
tree73566cf4ab043e6eae0728674c2cbd6781e61b15 /writerfilter/CustomTarget_source.mk
parent32ac015be4d0f33120bc066e7f49e197c7405c45 (diff)
writerfilter: convert fasttokens to Python
It's shorter and f9bf15e19ec823a58ee32bf94da81f3bb1a147bc (writerfilter: initial strict DOCX support, 2014-03-07) shows it's a pain to do anything non-trivial with XSLT 1.0 -- in that case black magic was needed to do a simple unique sort. Change-Id: Icf4e7b580ce1db6826989500dbf4a012d79acdb9
Diffstat (limited to 'writerfilter/CustomTarget_source.mk')
-rw-r--r--writerfilter/CustomTarget_source.mk11
1 files changed, 6 insertions, 5 deletions
diff --git a/writerfilter/CustomTarget_source.mk b/writerfilter/CustomTarget_source.mk
index 98da398ceea1..c4ad0a4abefb 100644
--- a/writerfilter/CustomTarget_source.mk
+++ b/writerfilter/CustomTarget_source.mk
@@ -13,6 +13,7 @@ writerfilter_WORK := $(call gb_CustomTarget_get_workdir,writerfilter/source)
writerfilter_SRC := $(SRCDIR)/writerfilter/source
writerfilter_XSLTCOMMAND := $(call gb_ExternalExecutable_get_command,xsltproc)
+writerfilter_PYTHONCOMMAND := $(call gb_ExternalExecutable_get_command,python)
writerfilter_OOXMLNAMESPACES= \
dml-baseStylesheet \
@@ -75,7 +76,7 @@ writerfilter_SRC_model_NamespacePreprocess=$(writerfilter_SRC)/resourcemodel/nam
writerfilter_SRC_ooxml_Analyze_model_xsl=$(writerfilter_SRC)/ooxml/analyzemodel.xsl
writerfilter_SRC_ooxml_FactoryTools_xsl=$(writerfilter_SRC)/ooxml/factorytools.xsl
writerfilter_SRC_ooxml_FactoryValues_xsl=$(writerfilter_SRC)/ooxml/factory_values.xsl
-writerfilter_SRC_ooxml_FastTokens_xsl=$(writerfilter_SRC)/ooxml/fasttokens.xsl
+writerfilter_SRC_ooxml_FastTokens_py=$(writerfilter_SRC)/ooxml/fasttokens.py
writerfilter_SRC_ooxml_GperfFastTokenHandler_xsl=$(writerfilter_SRC)/ooxml/gperffasttokenhandler.xsl
writerfilter_SRC_ooxml_Model=$(writerfilter_SRC)/ooxml/model.xml
writerfilter_SRC_ooxml_NamespaceIds_xsl=$(writerfilter_SRC)/ooxml/namespaceids.xsl
@@ -95,9 +96,9 @@ $(writerfilter_GEN_ooxml_FactoryValues_hxx) : $(writerfilter_SRC_ooxml_FactoryVa
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,XSL,1)
$(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_ooxml_FactoryValues_xsl) $(writerfilter_GEN_ooxml_Model_processed)) > $@
-$(writerfilter_GEN_ooxml_FastTokens_hxx) : $(writerfilter_SRC_ooxml_FastTokens_xsl) $(writerfilter_GEN_ooxml_Token_xml) | $(writerfilter_WORK)/ooxml/.dir
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,XSL,1)
- $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_ooxml_FastTokens_xsl) $(writerfilter_GEN_ooxml_Token_xml)) > $@
+$(writerfilter_GEN_ooxml_FastTokens_hxx) : $(writerfilter_SRC_ooxml_FastTokens_py) $(writerfilter_GEN_ooxml_Token_xml) | $(writerfilter_WORK)/ooxml/.dir
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PY ,1)
+ $(call gb_Helper_abbreviate_dirs, $(writerfilter_PYTHONCOMMAND) $(writerfilter_SRC_ooxml_FastTokens_py) $(writerfilter_GEN_ooxml_Token_xml)) > $@
$(writerfilter_GEN_ooxml_GperfFastToken_hxx) : $(writerfilter_SRC_ooxml_GperfFastTokenHandler_xsl) $(writerfilter_GEN_ooxml_Token_xml)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,GPF,1)
@@ -149,6 +150,6 @@ $(writerfilter_WORK)/OOXMLFactory%.hxx : $(writerfilter_SRC)/ooxml/factory_ns.xs
$(call gb_CustomTarget_get_target,writerfilter/source) : $(writerfilter_ALL)
-$(writerfilter_ALL) :| $(call gb_ExternalExecutable_get_dependencies,xsltproc) $(writerfilter_WORK)/.dir
+$(writerfilter_ALL) :| $(call gb_ExternalExecutable_get_dependencies,xsltproc) $(call gb_ExternalExecutable_get_dependencies,python) $(writerfilter_WORK)/.dir
# vim: set noet sw=4 ts=4: