1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
2 #*************************************************************************
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 # Copyright 2009 by Sun Microsystems, Inc.
8 # OpenOffice.org - a multi-platform office productivity suite
10 # This file is part of OpenOffice.org.
12 # OpenOffice.org is free software: you can redistribute it and/or modify
13 # it under the terms of the GNU Lesser General Public License version 3
14 # only, as published by the Free Software Foundation.
16 # OpenOffice.org is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU Lesser General Public License version 3 for more details
20 # (a copy is included in the LICENSE file that accompanied this code).
22 # You should have received a copy of the GNU Lesser General Public License
23 # version 3 along with OpenOffice.org. If not, see
24 # <http://www.openoffice.org/license.html>
25 # for a copy of the LGPLv3 License.
27 #*************************************************************************
29 $(eval
$(call gb_CustomTarget_CustomTarget
,writerfilter
/source
))
31 writerfilter_WORK
:= $(call gb_CustomTarget_get_workdir
,writerfilter
/source
)
32 writerfilter_SRC
:= $(SRCDIR
)/writerfilter
/source
34 include $(writerfilter_SRC
)/generated.mk
38 wf_SRC_doctok_Model
=$(writerfilter_SRC
)/doctok
/resources.xmi
39 wf_SRC_doctok_Resources_xsl
=$(writerfilter_SRC
)/doctok
/resources.xsl
40 wf_SRC_doctok_ResourcesImpl_xsl
=$(writerfilter_SRC
)/doctok
/resourcesimpl.xsl
41 wf_SRC_doctok_ResourceIds_xsl
=$(writerfilter_SRC
)/doctok
/resourceids.xsl
42 wf_SRC_doctok_SprmIds_xsl
=$(writerfilter_SRC
)/doctok
/sprmids.xsl
43 wf_SRC_doctok_ResourceTools_xsl
=$(writerfilter_SRC
)/doctok
/resourcetools.xsl
45 wf_GEN_doctok_SprmIds_hxx
:= $(writerfilter_WORK
)/doctok
/sprmids.hxx
46 wf_GEN_doctok_ResourceIds_hxx
:= $(writerfilter_WORK
)/doctok
/resourceids.hxx
47 wf_GEN_doctok_Resources_hxx
:= $(writerfilter_WORK
)/doctok
/resources.hxx
48 wf_GEN_doctok_Resources_cxx
:= $(writerfilter_WORK
)/resources.
cxx
50 $(wf_GEN_doctok_SprmIds_hxx
) : $(wf_SRC_doctok_SprmIds_xsl
) $(wf_SRC_doctok_Model
) |
$(writerfilter_WORK
)/doctok
/.
dir
51 $(call gb_Output_announce
,$@
,build
,XSL
,1)
52 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $(wf_SRC_doctok_SprmIds_xsl
) $(wf_SRC_doctok_Model
)) > $@
54 $(wf_GEN_doctok_ResourceIds_hxx
) : $(wf_SRC_doctok_ResourceIds_xsl
) $(wf_SRC_doctok_Model
) |
$(writerfilter_WORK
)/doctok
/.
dir
55 $(call gb_Output_announce
,$@
,build
,XSL
,1)
56 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $(wf_SRC_doctok_ResourceIds_xsl
) $(wf_SRC_doctok_Model
)) > $@
58 $(wf_GEN_doctok_Resources_hxx
) : $(wf_SRC_doctok_Resources_xsl
) $(wf_SRC_doctok_Model
) |
$(writerfilter_WORK
)/doctok
/.
dir
59 $(call gb_Output_announce
,$@
,build
,XSL
,1)
60 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $(wf_SRC_doctok_Resources_xsl
) $(wf_SRC_doctok_Model
)) > $@
62 $(wf_GEN_doctok_Resources_cxx
) : $(wf_SRC_doctok_ResourcesImpl_xsl
) $(wf_SRC_doctok_Model
) $(wf_SRC_doctok_ResourceTools_xsl
) |
$(writerfilter_WORK
)/doctok
/.
dir
63 $(call gb_Output_announce
,$@
,build
,XSL
,1)
64 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $(wf_SRC_doctok_ResourcesImpl_xsl
) $(wf_SRC_doctok_Model
)) > $@
68 wf_SRC_ooxml_Model
=$(writerfilter_SRC
)/ooxml
/model.xml
69 wf_SRC_ooxml_Preprocess_xsl
=$(writerfilter_SRC
)/ooxml
/modelpreprocess.xsl
70 wf_SRC_ooxml_FactoryTools_xsl
=$(writerfilter_SRC
)/ooxml
/factorytools.xsl
71 wf_SRC_ooxml_FastTokens_xsl
=$(writerfilter_SRC
)/ooxml
/fasttokens.xsl
72 wf_SRC_ooxml_NamespaceIds_xsl
=$(writerfilter_SRC
)/ooxml
/namespaceids.xsl
73 wf_SRC_ooxml_FactoryValues_xsl
=$(writerfilter_SRC
)/ooxml
/factory_values.xsl
74 wf_SRC_ooxml_FactoryValuesImpl_xsl
=$(writerfilter_SRC
)/ooxml
/factoryimpl_values.xsl
75 wf_SRC_ooxml_ResourceIds_xsl
=$(writerfilter_SRC
)/ooxml
/resourceids.xsl
76 wf_SRC_ooxml_GperfFastTokenHandler_xsl
=$(writerfilter_SRC
)/ooxml
/gperffasttokenhandler.xsl
77 wf_SRC_ooxml_Analyze_model_xsl
=$(writerfilter_SRC
)/ooxml
/analyzemodel.xsl
78 wf_GEN_ooxml_ResourceIds_hxx
=$(writerfilter_WORK
)/ooxml
/resourceids.hxx
80 wf_GEN_ooxml_token_xml
=$(writerfilter_WORK
)/token.xml
81 wf_GEN_ooxml_token_tmp
=$(writerfilter_WORK
)/token.tmp
83 wf_GEN_ooxml_Factory_hxx
=$(writerfilter_WORK
)/OOXMLFactory_generated.hxx
84 wf_GEN_ooxml_Factory_cxx
=$(writerfilter_WORK
)/OOXMLFactory_generated.
cxx
85 wf_GEN_ooxml_FastTokens_hxx
=$(writerfilter_WORK
)/ooxml
/OOXMLFastTokens.hxx
86 wf_GEN_ooxml_NamespaceIds_hxx
=$(writerfilter_WORK
)/ooxml
/OOXMLnamespaceids.hxx
87 wf_GEN_ooxml_FactoryValues_hxx
=$(writerfilter_WORK
)/OOXMLFactory_values.hxx
88 wf_GEN_ooxml_FactoryValues_cxx
=$(writerfilter_WORK
)/OOXMLFactory_values.
cxx
89 wf_GEN_ooxml_GperfFastToken_hxx
=$(writerfilter_WORK
)/gperffasttoken.hxx
90 wf_GEN_ooxml_Model_processed
=$(writerfilter_WORK
)/model_preprocessed.xml
91 wf_GEN_ooxml_Model_analyzed
=$(writerfilter_WORK
)/ooxml
/model_analyzed.xml
93 $(wf_GEN_ooxml_token_tmp
) : $(OUTDIR
)/inc
/oox
/tokens.txt |
$(writerfilter_WORK
)/.
dir
94 $(call gb_Output_announce
,$@
,build
,CAT
,1)
95 cat
$(OUTDIR
)/inc
/oox
/tokens.txt \
96 | sed
"s#\(.*\)#<fasttoken>\1</fasttoken>#" > $@
98 $(wf_GEN_ooxml_token_xml
) : $(writerfilter_SRC
)/ooxml
/tokenxmlheader
$(wf_GEN_ooxml_token_tmp
) $(writerfilter_SRC
)/ooxml
/tokenxmlfooter
99 $(call gb_Output_announce
,$@
,build
,CAT
,1)
100 cat
$(writerfilter_SRC
)/ooxml
/tokenxmlheader
$(wf_GEN_ooxml_token_tmp
) $(writerfilter_SRC
)/ooxml
/tokenxmlfooter
> $@
102 $(wf_GEN_ooxml_FastTokens_hxx
) : $(wf_SRC_ooxml_FastTokens_xsl
) $(wf_GEN_ooxml_token_xml
)
103 $(call gb_Output_announce
,$@
,build
,XSL
,1)
104 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $(wf_SRC_ooxml_FastTokens_xsl
) $(wf_GEN_ooxml_token_xml
)) > $@
106 $(wf_GEN_ooxml_Factory_hxx
) : $(writerfilter_SRC
)/ooxml
/factoryinc.xsl
$(wf_GEN_ooxml_Model_processed
)
107 $(call gb_Output_announce
,$@
,build
,XSL
,1)
108 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $< $(wf_GEN_ooxml_Model_processed
)) > $@
110 $(wf_GEN_ooxml_Factory_cxx
) : $(writerfilter_SRC
)/ooxml
/factoryimpl.xsl
$(wf_GEN_ooxml_Model_processed
)
111 $(call gb_Output_announce
,$@
,build
,XSL
,1)
112 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $< $(wf_GEN_ooxml_Model_processed
)) > $@
114 $(writerfilter_WORK
)/OOXMLFactory
%.
cxx : $(writerfilter_SRC
)/ooxml
/factoryimpl_ns.xsl
$(wf_GEN_ooxml_Model_processed
)
115 $(call gb_Output_announce
,$@
,build
,XSL
,1)
116 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) --stringparam file
$@
$< $(wf_GEN_ooxml_Model_processed
)) > $@
118 $(writerfilter_WORK
)/OOXMLFactory
%.hxx
: $(writerfilter_SRC
)/ooxml
/factory_ns.xsl
$(wf_GEN_ooxml_Model_processed
)
119 $(call gb_Output_announce
,$@
,build
,XSL
,1)
120 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) --stringparam file
$@
$< $(wf_GEN_ooxml_Model_processed
)) > $@
122 $(wf_GEN_ooxml_FactoryValues_hxx
) : $(wf_SRC_ooxml_FactoryValues_xsl
) $(wf_GEN_ooxml_Model_processed
)
123 $(call gb_Output_announce
,$@
,build
,XSL
,1)
124 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $(wf_SRC_ooxml_FactoryValues_xsl
) $(wf_GEN_ooxml_Model_processed
)) > $@
126 $(wf_GEN_ooxml_FactoryValues_cxx
) : $(wf_SRC_ooxml_FactoryValuesImpl_xsl
) $(wf_GEN_ooxml_Model_processed
)
127 $(call gb_Output_announce
,$@
,build
,XSL
,1)
128 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $(wf_SRC_ooxml_FactoryValuesImpl_xsl
) $(wf_GEN_ooxml_Model_processed
)) > $@
130 $(wf_GEN_ooxml_ResourceIds_hxx
) : $(wf_SRC_ooxml_ResourceIds_xsl
) $(wf_GEN_ooxml_Model_processed
) |
$(writerfilter_WORK
)/ooxml
/.
dir
131 $(call gb_Output_announce
,$@
,build
,XSL
,1)
132 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $(wf_SRC_ooxml_ResourceIds_xsl
) $(wf_GEN_ooxml_Model_processed
)) > $@
134 $(wf_GEN_ooxml_NamespaceIds_hxx
) : $(wf_SRC_ooxml_NamespaceIds_xsl
) $(wf_GEN_ooxml_Model_processed
)
135 $(call gb_Output_announce
,$@
,build
,XSL
,1)
136 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $(wf_SRC_ooxml_NamespaceIds_xsl
) $(wf_GEN_ooxml_Model_processed
)) > $@
138 $(wf_GEN_ooxml_GperfFastToken_hxx
) : $(wf_SRC_ooxml_GperfFastTokenHandler_xsl
) $(wf_GEN_ooxml_token_xml
)
139 $(call gb_Output_announce
,$@
,build
,GPF
,1)
140 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $(wf_SRC_ooxml_GperfFastTokenHandler_xsl
) $(wf_GEN_ooxml_token_xml
)) \
141 | tr
-d
'\r' |
$(GPERF
) -I
-t
-E
-S1
-c
-G
-LC
++ > $@
143 $(wf_GEN_ooxml_Model_analyzed
) : $(wf_SRC_ooxml_Analyze_model_xsl
) $(wf_SRC_ooxml_Model
) |
$(writerfilter_WORK
)/ooxml
/.
dir
144 $(call gb_Output_announce
,$@
,build
,XSL
,1)
145 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $^
) > $@
149 wf_SRC_rtftok_scanner_lex
=$(writerfilter_SRC
)/rtftok
/RTFScanner.
lex
150 wf_SRC_rtftok_scanner_skl
=$(writerfilter_SRC
)/rtftok
/RTFScanner.skl
152 wf_GEN_rtftok_scanner_cxx
=$(writerfilter_WORK
)/RTFScanner.
cxx
154 # does not build, currently unused
155 #$(wf_GEN_rtftok_scanner_cxx) : $(wf_SRC_rtftok_scanner_lex) $(wf_SRC_rtftok_scanner_skl)
156 # flex -+ -S$(wf_SRC_rtftok_scanner_skl) -o$@ $(wf_SRC_rtftok_scanner_lex)
160 wf_GEN_model_QNameToStr_cxx
=$(writerfilter_WORK
)/qnametostr.
cxx
161 wf_GEN_ooxml_QNameToStr_tmp
=$(writerfilter_WORK
)/OOXMLqnameToStr.tmp
162 wf_GEN_model_SprmCodeToStr_cxx
=$(writerfilter_WORK
)/sprmcodetostr.
cxx
163 wf_GEN_model_SprmCodeToStr_tmp
=$(writerfilter_WORK
)/sprmcodetostr.tmp
164 wf_GEN_doctok_QnameToStr_tmp
=$(writerfilter_WORK
)/DOCTOKqnameToStr.tmp
165 wf_SRC_doctok_SprmCodeToStr_xsl
=$(writerfilter_SRC
)/doctok
/sprmcodetostr.xsl
166 wf_SRC_doctok_QNameToStr_xsl
=$(writerfilter_SRC
)/doctok
/qnametostr.xsl
167 wf_SRC_ooxml_QNameToStr_xsl
=$(writerfilter_SRC
)/ooxml
/qnametostr.xsl
168 wf_SRC_model_NamespacePreprocess
=$(writerfilter_SRC
)/resourcemodel
/namespace_preprocess.pl
169 wf_GEN_ooxml_Namespacesmap_xsl
=$(writerfilter_WORK
)/namespacesmap.xsl
170 wf_DEP_ooxml_namespaces_txt
=$(OUTDIR
)/inc
/oox
/namespaces.txt
171 wf_GEN_ooxml_preprocess_xsl
=$(writerfilter_WORK
)/modelpreprocess.xsl
173 $(wf_GEN_ooxml_QNameToStr_tmp
): $(wf_SRC_ooxml_QNameToStr_xsl
) $(wf_GEN_ooxml_Model_processed
)
174 $(call gb_Output_announce
,$@
,build
,XSL
,1)
175 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $(wf_SRC_ooxml_QNameToStr_xsl
) $(wf_GEN_ooxml_Model_processed
)) > $@
177 $(wf_GEN_doctok_QnameToStr_tmp
): $(wf_SRC_doctok_QNameToStr_xsl
) $(wf_SRC_doctok_Model
) |
$(writerfilter_WORK
)/.
dir
178 $(call gb_Output_announce
,$@
,build
,XSL
,1)
179 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $(wf_SRC_doctok_QNameToStr_xsl
) $(wf_SRC_doctok_Model
)) > $@
181 $(wf_GEN_model_QNameToStr_cxx
): $(wf_GEN_ooxml_QNameToStr_tmp
) $(wf_GEN_doctok_QnameToStr_tmp
) $(writerfilter_SRC
)/resourcemodel
/qnametostrheader
$(writerfilter_SRC
)/resourcemodel
/qnametostrfooter
$(wf_SRC_ooxml_FactoryTools_xsl
) $(wf_SRC_doctok_ResourceTools_xsl
)
182 $(call gb_Output_announce
,$@
,build
,CAT
,1)
183 cat
$(writerfilter_SRC
)/resourcemodel
/qnametostrheader
$(wf_GEN_ooxml_QNameToStr_tmp
) $(wf_GEN_doctok_QnameToStr_tmp
) $(writerfilter_SRC
)/resourcemodel
/qnametostrfooter
> $@
185 $(wf_GEN_model_SprmCodeToStr_tmp
) : $(wf_SRC_doctok_SprmCodeToStr_xsl
) $(wf_SRC_doctok_Model
) |
$(writerfilter_WORK
)/.
dir
186 $(call gb_Output_announce
,$@
,build
,XSL
,1)
187 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $(wf_SRC_doctok_SprmCodeToStr_xsl
) $(wf_SRC_doctok_Model
)) > $@
189 $(wf_GEN_model_SprmCodeToStr_cxx
): $(writerfilter_SRC
)/resourcemodel
/sprmcodetostrheader
$(wf_GEN_model_SprmCodeToStr_tmp
) $(writerfilter_SRC
)/resourcemodel
/sprmcodetostrfooter
190 $(call gb_Output_announce
,$@
,build
,CAT
,1)
193 $(wf_GEN_ooxml_Namespacesmap_xsl
) : $(wf_SRC_ooxml_Model
) $(wf_DEP_ooxml_namespaces_txt
) \
194 $(wf_SRC_model_NamespacePreprocess
) |
$(writerfilter_WORK
)/.
dir
195 $(call gb_Output_announce
,$@
,build
,PRL
,1)
196 $(PERL
) $(wf_SRC_model_NamespacePreprocess
) $(wf_DEP_ooxml_namespaces_txt
) > $@
198 $(wf_GEN_ooxml_preprocess_xsl
) : $(wf_SRC_ooxml_Preprocess_xsl
) |
$(writerfilter_WORK
)/.
dir
199 $(call gb_Output_announce
,$@
,build
,CPY
,1)
200 cp
-f
$(wf_SRC_ooxml_Preprocess_xsl
) $@
202 $(wf_GEN_ooxml_Model_processed
) : $(wf_GEN_ooxml_Namespacesmap_xsl
) $(wf_GEN_ooxml_preprocess_xsl
) $(wf_SRC_ooxml_Model
)
203 $(call gb_Output_announce
,$@
,build
,XSL
,1)
204 $(call gb_Helper_abbreviate_dirs
, $(gb_XSLTPROC
) $(wf_GEN_ooxml_Namespacesmap_xsl
) $(wf_SRC_ooxml_Model
)) > $@
209 $(wf_GEN_doctok_SprmIds_hxx
) \
210 $(wf_GEN_doctok_ResourceIds_hxx
) \
211 $(wf_GEN_doctok_Resources_hxx
) \
212 $(wf_GEN_doctok_Resources_cxx
) \
213 $(wf_GEN_ooxml_ResourceIds_hxx
) \
214 $(wf_GEN_ooxml_Factory_hxx
) \
215 $(wf_GEN_ooxml_Factory_cxx
) \
216 $(wf_GEN_ooxml_FactoryValues_hxx
) \
217 $(wf_GEN_ooxml_FactoryValues_cxx
) \
218 $(wf_GEN_ooxml_FastTokens_hxx
) \
219 $(wf_GEN_ooxml_GperfFastToken_hxx
) \
220 $(wf_GEN_ooxml_NamespaceIds_hxx
) \
221 $(wf_GEN_model_QNameToStr_cxx
) \
222 $(wf_GEN_model_SprmCodeToStr_cxx
) \
223 $(patsubst %,$(writerfilter_WORK
)/OOXMLFactory_
%.hxx
,$(WRITERFILTER_OOXMLNAMESPACES
)) \
224 $(patsubst %,$(writerfilter_WORK
)/OOXMLFactory_
%.
cxx,$(WRITERFILTER_OOXMLNAMESPACES
)) \
226 $(call gb_CustomTarget_get_target
,writerfilter
/source
) : $(wf_all
)
228 $(wf_all
) :|
$(gb_XSLTPROCTARGET
) $(writerfilter_WORK
)/.
dir
230 # vim: set noet sw=4 ts=4: