Version 4.0.2.1, tag libreoffice-4.0.2.1
[LibreOffice.git] / writerfilter / CustomTarget_source.mk
blob0ffd8d95d20f86e0d057c36dc58d85b48bdc9bec
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval $(call gb_CustomTarget_CustomTarget,writerfilter/source))
12 writerfilter_WORK := $(call gb_CustomTarget_get_workdir,writerfilter/source)
13 writerfilter_SRC := $(SRCDIR)/writerfilter/source
15 writerfilter_XSLTCOMMAND := $(call gb_ExternalExecutable_get_command,xsltproc)
17 writerfilter_OOXMLNAMESPACES= \
18 dml-baseStylesheet \
19 dml-baseTypes \
20 dml-chartDrawing \
21 dml-documentProperties \
22 dml-graphicalObject \
23 dml-shape3DCamera \
24 dml-shape3DLighting \
25 dml-shape3DScene \
26 dml-shape3DStyles \
27 dml-shapeEffects \
28 dml-shapeGeometry \
29 dml-shapeLineProperties \
30 dml-shapeProperties \
31 dml-styleDefaults \
32 dml-stylesheet \
33 dml-textCharacter \
34 dml-wordprocessingDrawing \
35 shared-math \
36 shared-relationshipReference \
37 sml-customXmlMappings \
38 vml-main \
39 vml-officeDrawing \
40 vml-wordprocessingDrawing \
41 wml
43 writerfilter_ALL = \
44 $(writerfilter_GEN_doctok_ResourceIds_hxx) \
45 $(writerfilter_GEN_doctok_Resources_cxx) \
46 $(writerfilter_GEN_doctok_Resources_hxx) \
47 $(writerfilter_GEN_doctok_QNameToStr_cxx) \
48 $(writerfilter_GEN_doctok_SprmIds_hxx) \
49 $(writerfilter_GEN_model_SprmCodeToStr_cxx) \
50 $(writerfilter_GEN_ooxml_Factory_cxx) \
51 $(writerfilter_GEN_ooxml_Factory_hxx) \
52 $(writerfilter_GEN_ooxml_FactoryValues_cxx) \
53 $(writerfilter_GEN_ooxml_FactoryValues_hxx) \
54 $(writerfilter_GEN_ooxml_FastTokens_hxx) \
55 $(writerfilter_GEN_ooxml_GperfFastToken_hxx) \
56 $(writerfilter_GEN_ooxml_NamespaceIds_hxx) \
57 $(writerfilter_GEN_ooxml_QNameToStr_cxx) \
58 $(writerfilter_GEN_ooxml_ResourceIds_hxx) \
59 $(patsubst %,$(writerfilter_WORK)/OOXMLFactory_%.hxx,$(writerfilter_OOXMLNAMESPACES)) \
60 $(patsubst %,$(writerfilter_WORK)/OOXMLFactory_%.cxx,$(writerfilter_OOXMLNAMESPACES)) \
62 writerfilter_DEP_ooxml_Namespaces_txt=$(OUTDIR)/inc/oox/namespaces.txt
63 writerfilter_GEN_doctok_ResourceIds_hxx=$(writerfilter_WORK)/doctok/resourceids.hxx
64 writerfilter_GEN_doctok_Resources_cxx=$(writerfilter_WORK)/resources.cxx
65 writerfilter_GEN_doctok_Resources_hxx=$(writerfilter_WORK)/doctok/resources.hxx
66 writerfilter_GEN_doctok_QNameToStr_cxx=$(writerfilter_WORK)/doctok/qnametostr.cxx
67 writerfilter_GEN_doctok_SprmIds_hxx=$(writerfilter_WORK)/doctok/sprmids.hxx
68 writerfilter_GEN_model_SprmCodeToStr_cxx=$(writerfilter_WORK)/sprmcodetostr.cxx
69 writerfilter_GEN_model_SprmCodeToStr_tmp=$(writerfilter_WORK)/sprmcodetostr.tmp
70 writerfilter_GEN_ooxml_FactoryValues_cxx=$(writerfilter_WORK)/OOXMLFactory_values.cxx
71 writerfilter_GEN_ooxml_FactoryValues_hxx=$(writerfilter_WORK)/OOXMLFactory_values.hxx
72 writerfilter_GEN_ooxml_Factory_cxx=$(writerfilter_WORK)/OOXMLFactory_generated.cxx
73 writerfilter_GEN_ooxml_Factory_hxx=$(writerfilter_WORK)/OOXMLFactory_generated.hxx
74 writerfilter_GEN_ooxml_FastTokens_hxx=$(writerfilter_WORK)/ooxml/OOXMLFastTokens.hxx
75 writerfilter_GEN_ooxml_GperfFastToken_hxx=$(writerfilter_WORK)/gperffasttoken.hxx
76 writerfilter_GEN_ooxml_Model_analyzed=$(writerfilter_WORK)/ooxml/model_analyzed.xml
77 writerfilter_GEN_ooxml_Model_processed=$(writerfilter_WORK)/model_preprocessed.xml
78 writerfilter_GEN_ooxml_NamespaceIds_hxx=$(writerfilter_WORK)/ooxml/OOXMLnamespaceids.hxx
79 writerfilter_GEN_ooxml_Namespacesmap_xsl=$(writerfilter_WORK)/namespacesmap.xsl
80 writerfilter_GEN_ooxml_Preprocess_xsl=$(writerfilter_WORK)/modelpreprocess.xsl
81 writerfilter_GEN_ooxml_QNameToStr_cxx=$(writerfilter_WORK)/ooxml/qnametostr.cxx
82 writerfilter_GEN_ooxml_ResourceIds_hxx=$(writerfilter_WORK)/ooxml/resourceids.hxx
83 writerfilter_GEN_ooxml_Token_tmp=$(writerfilter_WORK)/token.tmp
84 writerfilter_GEN_ooxml_Token_xml=$(writerfilter_WORK)/token.xml
85 writerfilter_SRC_doctok_Model=$(writerfilter_SRC)/doctok/resources.xmi
86 writerfilter_SRC_doctok_QNameToStr_xsl=$(writerfilter_SRC)/doctok/qnametostr.xsl
87 writerfilter_SRC_doctok_ResourceIds_xsl=$(writerfilter_SRC)/doctok/resourceids.xsl
88 writerfilter_SRC_doctok_ResourceTools_xsl=$(writerfilter_SRC)/doctok/resourcetools.xsl
89 writerfilter_SRC_doctok_ResourcesImpl_xsl=$(writerfilter_SRC)/doctok/resourcesimpl.xsl
90 writerfilter_SRC_doctok_Resources_xsl=$(writerfilter_SRC)/doctok/resources.xsl
91 writerfilter_SRC_doctok_SprmCodeToStr_xsl=$(writerfilter_SRC)/doctok/sprmcodetostr.xsl
92 writerfilter_SRC_doctok_SprmIds_xsl=$(writerfilter_SRC)/doctok/sprmids.xsl
93 writerfilter_SRC_model_NamespacePreprocess=$(writerfilter_SRC)/resourcemodel/namespace_preprocess.pl
94 writerfilter_SRC_ooxml_Analyze_model_xsl=$(writerfilter_SRC)/ooxml/analyzemodel.xsl
95 writerfilter_SRC_ooxml_FactoryTools_xsl=$(writerfilter_SRC)/ooxml/factorytools.xsl
96 writerfilter_SRC_ooxml_FactoryValuesImpl_xsl=$(writerfilter_SRC)/ooxml/factoryimpl_values.xsl
97 writerfilter_SRC_ooxml_FactoryValues_xsl=$(writerfilter_SRC)/ooxml/factory_values.xsl
98 writerfilter_SRC_ooxml_FastTokens_xsl=$(writerfilter_SRC)/ooxml/fasttokens.xsl
99 writerfilter_SRC_ooxml_GperfFastTokenHandler_xsl=$(writerfilter_SRC)/ooxml/gperffasttokenhandler.xsl
100 writerfilter_SRC_ooxml_Model=$(writerfilter_SRC)/ooxml/model.xml
101 writerfilter_SRC_ooxml_NamespaceIds_xsl=$(writerfilter_SRC)/ooxml/namespaceids.xsl
102 writerfilter_SRC_ooxml_Preprocess_xsl=$(writerfilter_SRC)/ooxml/modelpreprocess.xsl
103 writerfilter_SRC_ooxml_QNameToStr_xsl=$(writerfilter_SRC)/ooxml/qnametostr.xsl
104 writerfilter_SRC_ooxml_ResourceIds_xsl=$(writerfilter_SRC)/ooxml/resourceids.xsl
106 $(writerfilter_GEN_doctok_QNameToStr_cxx): $(writerfilter_SRC_doctok_QNameToStr_xsl) $(writerfilter_SRC_doctok_Model) $(writerfilter_SRC_doctok_ResourceTools_xsl) | $(writerfilter_WORK)/.dir
107 $(call gb_Output_announce,$@,build,XSL,1)
108 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_doctok_QNameToStr_xsl) $(writerfilter_SRC_doctok_Model)) > $@
110 $(writerfilter_GEN_doctok_ResourceIds_hxx) : $(writerfilter_SRC_doctok_Model) $(writerfilter_SRC_doctok_ResourceIds_xsl) | $(writerfilter_WORK)/doctok/.dir
111 $(call gb_Output_announce,$@,build,XSL,1)
112 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_doctok_ResourceIds_xsl) $(writerfilter_SRC_doctok_Model)) > $@
114 $(writerfilter_GEN_doctok_Resources_cxx) : $(writerfilter_SRC_doctok_Model) $(writerfilter_SRC_doctok_ResourcesImpl_xsl) $(writerfilter_SRC_doctok_ResourceTools_xsl) | $(writerfilter_WORK)/doctok/.dir
115 $(call gb_Output_announce,$@,build,XSL,1)
116 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_doctok_ResourcesImpl_xsl) $(writerfilter_SRC_doctok_Model)) > $@
118 $(writerfilter_GEN_doctok_Resources_hxx) : $(writerfilter_SRC_doctok_Model) $(writerfilter_SRC_doctok_Resources_xsl) | $(writerfilter_WORK)/doctok/.dir
119 $(call gb_Output_announce,$@,build,XSL,1)
120 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_doctok_Resources_xsl) $(writerfilter_SRC_doctok_Model)) > $@
122 $(writerfilter_GEN_doctok_SprmIds_hxx) : $(writerfilter_SRC_doctok_Model) $(writerfilter_SRC_doctok_SprmIds_xsl) | $(writerfilter_WORK)/doctok/.dir
123 $(call gb_Output_announce,$@,build,XSL,1)
124 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_doctok_SprmIds_xsl) $(writerfilter_SRC_doctok_Model)) > $@
126 $(writerfilter_GEN_model_SprmCodeToStr_cxx): $(writerfilter_SRC)/resourcemodel/sprmcodetostrheader $(writerfilter_GEN_model_SprmCodeToStr_tmp) $(writerfilter_SRC)/resourcemodel/sprmcodetostrfooter
127 $(call gb_Output_announce,$@,build,CAT,1)
128 cat $^ > $@
130 $(writerfilter_GEN_model_SprmCodeToStr_tmp) : $(writerfilter_SRC_doctok_SprmCodeToStr_xsl) $(writerfilter_SRC_doctok_Model) | $(writerfilter_WORK)/.dir
131 $(call gb_Output_announce,$@,build,XSL,1)
132 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_doctok_SprmCodeToStr_xsl) $(writerfilter_SRC_doctok_Model)) > $@
134 $(writerfilter_GEN_ooxml_Factory_cxx) : $(writerfilter_SRC)/ooxml/factoryimpl.xsl $(writerfilter_GEN_ooxml_Model_processed)
135 $(call gb_Output_announce,$@,build,XSL,1)
136 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $< $(writerfilter_GEN_ooxml_Model_processed)) > $@
138 $(writerfilter_GEN_ooxml_Factory_hxx) : $(writerfilter_SRC)/ooxml/factoryinc.xsl $(writerfilter_GEN_ooxml_Model_processed)
139 $(call gb_Output_announce,$@,build,XSL,1)
140 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $< $(writerfilter_GEN_ooxml_Model_processed)) > $@
142 $(writerfilter_GEN_ooxml_FactoryValues_cxx) : $(writerfilter_SRC_ooxml_FactoryValuesImpl_xsl) $(writerfilter_GEN_ooxml_Model_processed)
143 $(call gb_Output_announce,$@,build,XSL,1)
144 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_ooxml_FactoryValuesImpl_xsl) $(writerfilter_GEN_ooxml_Model_processed)) > $@
146 $(writerfilter_GEN_ooxml_FactoryValues_hxx) : $(writerfilter_SRC_ooxml_FactoryValues_xsl) $(writerfilter_GEN_ooxml_Model_processed)
147 $(call gb_Output_announce,$@,build,XSL,1)
148 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_ooxml_FactoryValues_xsl) $(writerfilter_GEN_ooxml_Model_processed)) > $@
150 $(writerfilter_GEN_ooxml_FastTokens_hxx) : $(writerfilter_SRC_ooxml_FastTokens_xsl) $(writerfilter_GEN_ooxml_Token_xml) | $(writerfilter_WORK)/ooxml/.dir
151 $(call gb_Output_announce,$@,build,XSL,1)
152 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_ooxml_FastTokens_xsl) $(writerfilter_GEN_ooxml_Token_xml)) > $@
154 $(writerfilter_GEN_ooxml_GperfFastToken_hxx) : $(writerfilter_SRC_ooxml_GperfFastTokenHandler_xsl) $(writerfilter_GEN_ooxml_Token_xml)
155 $(call gb_Output_announce,$@,build,GPF,1)
156 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_ooxml_GperfFastTokenHandler_xsl) $(writerfilter_GEN_ooxml_Token_xml)) \
157 | tr -d '\r' | $(GPERF) -c -E -G -I -LC++ -S1 -t > $@
159 $(writerfilter_GEN_ooxml_Model_analyzed) : $(writerfilter_SRC_ooxml_Analyze_model_xsl) $(writerfilter_SRC_ooxml_Model) | $(writerfilter_WORK)/ooxml/.dir
160 $(call gb_Output_announce,$@,build,XSL,1)
161 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $^) > $@
163 $(writerfilter_GEN_ooxml_Model_processed) : $(writerfilter_GEN_ooxml_Namespacesmap_xsl) $(writerfilter_GEN_ooxml_Preprocess_xsl) $(writerfilter_SRC_ooxml_Model)
164 $(call gb_Output_announce,$@,build,XSL,1)
165 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_GEN_ooxml_Namespacesmap_xsl) $(writerfilter_SRC_ooxml_Model)) > $@
167 $(writerfilter_GEN_ooxml_NamespaceIds_hxx) : $(writerfilter_SRC_ooxml_NamespaceIds_xsl) $(writerfilter_GEN_ooxml_Model_processed) | $(writerfilter_WORK)/ooxml/.dir
168 $(call gb_Output_announce,$@,build,XSL,1)
169 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_ooxml_NamespaceIds_xsl) $(writerfilter_GEN_ooxml_Model_processed)) > $@
171 $(writerfilter_GEN_ooxml_Namespacesmap_xsl) : $(writerfilter_SRC_ooxml_Model) $(writerfilter_DEP_ooxml_Namespaces_txt) \
172 $(writerfilter_SRC_model_NamespacePreprocess) | $(writerfilter_WORK)/.dir
173 $(call gb_Output_announce,$@,build,PRL,1)
174 $(PERL) $(writerfilter_SRC_model_NamespacePreprocess) $(writerfilter_DEP_ooxml_Namespaces_txt) > $@
176 $(writerfilter_GEN_ooxml_Preprocess_xsl) : $(writerfilter_SRC_ooxml_Preprocess_xsl) | $(writerfilter_WORK)/.dir
177 $(call gb_Output_announce,$@,build,CPY,1)
178 cp -f $(writerfilter_SRC_ooxml_Preprocess_xsl) $@
180 $(writerfilter_GEN_ooxml_QNameToStr_cxx): $(writerfilter_SRC_ooxml_QNameToStr_xsl) $(writerfilter_SRC_ooxml_FactoryTools_xsl) $(writerfilter_GEN_ooxml_Model_processed)
181 $(call gb_Output_announce,$@,build,XSL,1)
182 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_ooxml_QNameToStr_xsl) $(writerfilter_GEN_ooxml_Model_processed)) > $@
184 $(writerfilter_GEN_ooxml_ResourceIds_hxx) : $(writerfilter_SRC_ooxml_ResourceIds_xsl) $(writerfilter_GEN_ooxml_Model_processed) | $(writerfilter_WORK)/ooxml/.dir
185 $(call gb_Output_announce,$@,build,XSL,1)
186 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_ooxml_ResourceIds_xsl) $(writerfilter_GEN_ooxml_Model_processed)) > $@
188 $(writerfilter_GEN_ooxml_Token_tmp) : $(OUTDIR)/inc/oox/tokens.txt | $(writerfilter_WORK)/.dir
189 $(call gb_Output_announce,$@,build,CAT,1)
190 sed "s/\(.*\)/<fasttoken>\1<\/fasttoken>/" < $(OUTDIR)/inc/oox/tokens.txt > $@
192 $(writerfilter_GEN_ooxml_Token_xml) : $(writerfilter_SRC)/ooxml/tokenxmlheader $(writerfilter_GEN_ooxml_Token_tmp) $(writerfilter_SRC)/ooxml/tokenxmlfooter
193 $(call gb_Output_announce,$@,build,CAT,1)
194 cat $(writerfilter_SRC)/ooxml/tokenxmlheader $(writerfilter_GEN_ooxml_Token_tmp) $(writerfilter_SRC)/ooxml/tokenxmlfooter > $@
196 $(writerfilter_WORK)/OOXMLFactory%.cxx : $(writerfilter_SRC)/ooxml/factoryimpl_ns.xsl $(writerfilter_GEN_ooxml_Model_processed)
197 $(call gb_Output_announce,$@,build,XSL,1)
198 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) --stringparam file $@ $< $(writerfilter_GEN_ooxml_Model_processed)) > $@
200 $(writerfilter_WORK)/OOXMLFactory%.hxx : $(writerfilter_SRC)/ooxml/factory_ns.xsl $(writerfilter_GEN_ooxml_Model_processed)
201 $(call gb_Output_announce,$@,build,XSL,1)
202 $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) --stringparam file $@ $< $(writerfilter_GEN_ooxml_Model_processed)) > $@
205 $(call gb_CustomTarget_get_target,writerfilter/source) : $(writerfilter_ALL)
207 $(writerfilter_ALL) :| $(call gb_ExternalExecutable_get_dependencies,xsltproc) $(writerfilter_WORK)/.dir
209 # vim: set noet sw=4 ts=4: