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_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 \
48 $(writerfilter_GEN_ooxml_Factory_cxx
) \
49 $(writerfilter_GEN_ooxml_Factory_hxx
) \
50 $(writerfilter_GEN_ooxml_FactoryValues_hxx
) \
51 $(writerfilter_GEN_ooxml_QNameToStr_cxx
) \
52 $(writerfilter_GEN_ooxml_ResourceIds_hxx
) \
53 $(writerfilter_GEN_ooxml_Model_validated
) \
54 $(writerfilter_GEN_ooxml_Model_processed
) \
55 $(patsubst %,$(writerfilter_WORK
)/ooxml
/OOXMLFactory_
%.hxx
,$(writerfilter_OOXMLNAMESPACES
)) \
56 $(patsubst %,$(writerfilter_WORK
)/ooxml
/OOXMLFactory_
%.
cxx,$(writerfilter_OOXMLNAMESPACES
)) \
58 writerfilter_DEP_ooxml_Namespaces_txt
=$(call gb_CustomTarget_get_workdir
,oox
/generated
)/misc
/namespaces.txt
59 writerfilter_GEN_ooxml_FactoryValues_hxx
=$(writerfilter_WORK
)/ooxml
/OOXMLFactory_values.hxx
60 writerfilter_GEN_ooxml_Factory_cxx
=$(writerfilter_WORK
)/ooxml
/OOXMLFactory_generated.
cxx
61 writerfilter_GEN_ooxml_Factory_hxx
=$(writerfilter_WORK
)/ooxml
/OOXMLFactory_generated.hxx
62 writerfilter_GEN_ooxml_Model_validated
=$(writerfilter_WORK
)/ooxml
/model.validated
63 writerfilter_GEN_ooxml_Model_processed
=$(writerfilter_WORK
)/ooxml
/model_preprocessed.xml
64 writerfilter_GEN_ooxml_QNameToStr_cxx
=$(writerfilter_WORK
)/ooxml
/qnametostr.
cxx
65 writerfilter_GEN_ooxml_ResourceIds_hxx
=$(writerfilter_WORK
)/ooxml
/resourceids.hxx
66 writerfilter_SRC_ooxml_Model
=$(writerfilter_SRC
)/ooxml
/model.xml
67 writerfilter_SRC_ooxml_Preprocess_py
=$(writerfilter_SRC
)/ooxml
/modelpreprocess.py
68 writerfilter_SRC_ooxml_QNameToStr_py
=$(writerfilter_SRC
)/ooxml
/qnametostr.py
69 writerfilter_SRC_ooxml_ResourceIds_py
=$(writerfilter_SRC
)/ooxml
/resourceids.py
71 $(writerfilter_GEN_ooxml_Factory_cxx
) : $(writerfilter_SRC
)/ooxml
/factoryimpl.py
$(writerfilter_DEP_ooxml_Namespaces_txt
) $(writerfilter_GEN_ooxml_Model_processed
)
72 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
73 $(call gb_Helper_abbreviate_dirs
, $(writerfilter_PYTHONCOMMAND
) $< $(writerfilter_DEP_ooxml_Namespaces_txt
) $(writerfilter_GEN_ooxml_Model_processed
)) > $@
75 $(writerfilter_GEN_ooxml_Factory_hxx
) : $(writerfilter_SRC
)/ooxml
/factoryinc.py
$(writerfilter_GEN_ooxml_Model_processed
)
76 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
77 $(call gb_Helper_abbreviate_dirs
, $(writerfilter_PYTHONCOMMAND
) $< $(writerfilter_GEN_ooxml_Model_processed
)) > $@
79 $(writerfilter_GEN_ooxml_Model_validated
) : $(writerfilter_SRC
)/..
/documentation
/ooxml
/model.rng
$(writerfilter_SRC_ooxml_Model
)
80 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,VAL
,1)
81 $(call gb_Helper_abbreviate_dirs
,\
82 $(writerfilter_XMLLINTCOMMAND
) --noout
--relaxng
$(writerfilter_SRC
)/..
/documentation
/ooxml
/model.rng
$(writerfilter_SRC_ooxml_Model
) > $@
2>&1 \
85 $(writerfilter_GEN_ooxml_Model_processed
) : $(writerfilter_SRC_ooxml_Preprocess_py
) $(writerfilter_DEP_ooxml_Namespaces_txt
) $(writerfilter_GEN_ooxml_Model_validated
)
86 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
87 $(call gb_Helper_abbreviate_dirs
, $(writerfilter_PYTHONCOMMAND
) $(writerfilter_SRC_ooxml_Preprocess_py
) $(writerfilter_DEP_ooxml_Namespaces_txt
) $(writerfilter_SRC_ooxml_Model
)) > $@
89 $(writerfilter_GEN_ooxml_QNameToStr_cxx
): $(writerfilter_SRC_ooxml_QNameToStr_py
) $(writerfilter_GEN_ooxml_Model_processed
)
90 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
91 $(call gb_Helper_abbreviate_dirs
, $(writerfilter_PYTHONCOMMAND
) $(writerfilter_SRC_ooxml_QNameToStr_py
) $(writerfilter_GEN_ooxml_Model_processed
)) > $@
93 $(writerfilter_GEN_ooxml_ResourceIds_hxx
) : $(writerfilter_SRC_ooxml_ResourceIds_py
) $(writerfilter_GEN_ooxml_Model_processed
) |
$(writerfilter_WORK
)/ooxml
/.
dir
94 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
95 $(call gb_Helper_abbreviate_dirs
, $(writerfilter_PYTHONCOMMAND
) $(writerfilter_SRC_ooxml_ResourceIds_py
) $(writerfilter_GEN_ooxml_Model_processed
)) > $@
97 $(writerfilter_WORK
)/ooxml
/OOXMLFactory
%.
cxx : $(writerfilter_SRC
)/ooxml
/factoryimpl_ns.py
$(writerfilter_GEN_ooxml_Model_processed
)
98 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
99 $(call gb_Helper_abbreviate_dirs
, $(writerfilter_PYTHONCOMMAND
) $< $(writerfilter_GEN_ooxml_Model_processed
) $@
) > $@
101 $(writerfilter_WORK
)/ooxml
/OOXMLFactory
%.hxx
: $(writerfilter_SRC
)/ooxml
/factory_ns.py
$(writerfilter_GEN_ooxml_Model_processed
)
102 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),build
,PY
,1)
103 $(call gb_Helper_abbreviate_dirs
, $(writerfilter_PYTHONCOMMAND
) $< $(writerfilter_GEN_ooxml_Model_processed
) $@
) > $@
106 $(call gb_CustomTarget_get_target
,writerfilter
/source
) : $(writerfilter_ALL
)
108 $(writerfilter_ALL
) :|
$(call gb_ExternalExecutable_get_dependencies
,python
) $(call gb_ExternalExecutable_get_dependencies
,xmllint
) $(writerfilter_WORK
)/ooxml
/.
dir
110 # vim: set noet sw=4 ts=4: