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
,sw
/source
/writerfilter
))
12 writerfilter_WORK
:= $(call gb_CustomTarget_get_workdir
,sw
/source
/writerfilter
)
13 writerfilter_SRC
:= $(SRCDIR
)/sw
/source
/writerfilter
15 writerfilter_PYTHONCOMMAND
:= $(call gb_ExternalExecutable_get_command
,python
)
16 writerfilter_XMLLINTCOMMAND
:= $(call gb_ExternalExecutable_get_command
,xmllint
)
18 writerfilter_OOXMLNAMESPACES
= \
22 dml-documentProperties \
30 dml-shapeLineProperties \
35 dml-wordprocessingDrawing \
37 shared-relationshipReference \
38 sml-customXmlMappings \
41 vml-wordprocessingDrawing \
49 $(writerfilter_GEN_ooxml_Factory_cxx
) \
50 $(writerfilter_GEN_ooxml_Factory_hxx
) \
51 $(writerfilter_GEN_ooxml_FactoryValues_hxx
) \
52 $(writerfilter_GEN_ooxml_QNameToStr_cxx
) \
53 $(writerfilter_GEN_ooxml_ResourceIds_hxx
) \
54 $(writerfilter_GEN_ooxml_Model_validated
) \
55 $(writerfilter_GEN_ooxml_Model_processed
) \
56 $(patsubst %,$(writerfilter_WORK
)/ooxml
/OOXMLFactory_
%.hxx
,$(writerfilter_OOXMLNAMESPACES
)) \
57 $(patsubst %,$(writerfilter_WORK
)/ooxml
/OOXMLFactory_
%.
cxx,$(writerfilter_OOXMLNAMESPACES
)) \
59 writerfilter_DEP_ooxml_Namespaces_txt
=$(call gb_CustomTarget_get_workdir
,oox
/generated
)/misc
/namespaces.txt
60 writerfilter_GEN_ooxml_FactoryValues_hxx
=$(writerfilter_WORK
)/ooxml
/OOXMLFactory_values.hxx
61 writerfilter_GEN_ooxml_Factory_cxx
=$(writerfilter_WORK
)/ooxml
/OOXMLFactory_generated.
cxx
62 writerfilter_GEN_ooxml_Factory_hxx
=$(writerfilter_WORK
)/ooxml
/OOXMLFactory_generated.hxx
63 writerfilter_GEN_ooxml_Model_validated
=$(writerfilter_WORK
)/ooxml
/model.validated
64 writerfilter_GEN_ooxml_Model_processed
=$(writerfilter_WORK
)/ooxml
/model_preprocessed.xml
65 writerfilter_GEN_ooxml_QNameToStr_cxx
=$(writerfilter_WORK
)/ooxml
/qnametostr.
cxx
66 writerfilter_GEN_ooxml_ResourceIds_hxx
=$(writerfilter_WORK
)/ooxml
/resourceids.hxx
67 writerfilter_SRC_ooxml_Model
=$(writerfilter_SRC
)/ooxml
/model.xml
68 writerfilter_SRC_ooxml_Preprocess_py
=$(writerfilter_SRC
)/ooxml
/modelpreprocess.py
69 writerfilter_SRC_ooxml_QNameToStr_py
=$(writerfilter_SRC
)/ooxml
/qnametostr.py
70 writerfilter_SRC_ooxml_ResourceIds_py
=$(writerfilter_SRC
)/ooxml
/resourceids.py
72 $(writerfilter_GEN_ooxml_Factory_cxx
) : $(writerfilter_SRC
)/ooxml
/factoryimpl.py
$(writerfilter_DEP_ooxml_Namespaces_txt
) $(writerfilter_GEN_ooxml_Model_processed
)
73 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
74 $(call gb_Helper_abbreviate_dirs
, $(writerfilter_PYTHONCOMMAND
) $< $(writerfilter_DEP_ooxml_Namespaces_txt
) $(writerfilter_GEN_ooxml_Model_processed
)) > $@
76 $(writerfilter_GEN_ooxml_Factory_hxx
) : $(writerfilter_SRC
)/ooxml
/factoryinc.py
$(writerfilter_GEN_ooxml_Model_processed
)
77 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
78 $(call gb_Helper_abbreviate_dirs
, $(writerfilter_PYTHONCOMMAND
) $< $(writerfilter_GEN_ooxml_Model_processed
)) > $@
80 $(writerfilter_GEN_ooxml_Model_validated
) : $(SRCDIR
)/sw
/documentation
/writerfilter
/ooxml
/model.rng
$(writerfilter_SRC_ooxml_Model
)
81 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,VAL
,1)
82 $(call gb_Helper_abbreviate_dirs
,\
83 $(writerfilter_XMLLINTCOMMAND
) --noout
--relaxng
$(SRCDIR
)/sw
//documentation
/writerfilter
/ooxml
/model.rng
$(writerfilter_SRC_ooxml_Model
) > $@
2>&1 \
86 $(writerfilter_GEN_ooxml_Model_processed
) : $(writerfilter_SRC_ooxml_Preprocess_py
) $(writerfilter_DEP_ooxml_Namespaces_txt
) $(writerfilter_GEN_ooxml_Model_validated
)
87 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
88 $(call gb_Helper_abbreviate_dirs
, $(writerfilter_PYTHONCOMMAND
) $(writerfilter_SRC_ooxml_Preprocess_py
) $(writerfilter_DEP_ooxml_Namespaces_txt
) $(writerfilter_SRC_ooxml_Model
)) > $@
90 $(writerfilter_GEN_ooxml_QNameToStr_cxx
): $(writerfilter_SRC_ooxml_QNameToStr_py
) $(writerfilter_GEN_ooxml_Model_processed
)
91 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
92 $(call gb_Helper_abbreviate_dirs
, $(writerfilter_PYTHONCOMMAND
) $(writerfilter_SRC_ooxml_QNameToStr_py
) $(writerfilter_GEN_ooxml_Model_processed
)) > $@
94 $(writerfilter_GEN_ooxml_ResourceIds_hxx
) : $(writerfilter_SRC_ooxml_ResourceIds_py
) $(writerfilter_GEN_ooxml_Model_processed
) |
$(writerfilter_WORK
)/ooxml
/.
dir
95 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
96 $(call gb_Helper_abbreviate_dirs
, $(writerfilter_PYTHONCOMMAND
) $(writerfilter_SRC_ooxml_ResourceIds_py
) $(writerfilter_GEN_ooxml_Model_processed
)) > $@
98 $(writerfilter_WORK
)/ooxml
/OOXMLFactory
%.
cxx : $(writerfilter_SRC
)/ooxml
/factoryimpl_ns.py
$(writerfilter_GEN_ooxml_Model_processed
)
99 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
100 $(call gb_Helper_abbreviate_dirs
, $(writerfilter_PYTHONCOMMAND
) $< $(writerfilter_GEN_ooxml_Model_processed
) $@
) > $@
102 $(writerfilter_WORK
)/ooxml
/OOXMLFactory
%.hxx
: $(writerfilter_SRC
)/ooxml
/factory_ns.py
$(writerfilter_GEN_ooxml_Model_processed
)
103 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
104 $(call gb_Helper_abbreviate_dirs
, $(writerfilter_PYTHONCOMMAND
) $< $(writerfilter_GEN_ooxml_Model_processed
) $@
) > $@
107 $(call gb_CustomTarget_get_target
,sw
/source
/writerfilter
) : $(writerfilter_ALL
)
109 $(writerfilter_ALL
) :|
$(call gb_ExternalExecutable_get_dependencies
,python
) $(call gb_ExternalExecutable_get_dependencies
,xmllint
) $(writerfilter_WORK
)/ooxml
/.
dir
111 # vim: set noet sw=4 ts=4: