Kaydet (Commit) 8aab8292 authored tarafından Matúš Kukan's avatar Matúš Kukan

writerfilter: use CustomTarget makefile

üst d26e13bd
......@@ -30,6 +30,8 @@ $(eval $(call gb_Library_Library,msword))
$(eval $(call gb_Library_set_componentfile,msword,sw/util/msword))
$(eval $(call gb_Library_add_external_headers,msword,writerfilter_sprmids))
$(eval $(call gb_Library_set_include,msword,\
-I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/source/ui/inc \
......@@ -119,11 +121,4 @@ $(eval $(call gb_Library_add_exception_objects,msword,\
sw/source/filter/ww8/ww8toolbar \
))
# TODO: This should be really fixed in writerfilter so the header is
# delivered before compilation starts.
$(call gb_CxxObject_get_target,sw/source/filter/ww8/wrtw8nds) \
$(call gb_CxxObject_get_target,sw/source/filter/ww8/wrtww8gr) \
$(call gb_CxxObject_get_target,sw/source/filter/ww8/ww8atr) \
: $(OUTDIR)/inc/writerfilter/doctok/sprmids.hxx
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
......@@ -25,18 +26,16 @@
#
#*************************************************************************
WFDIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
$(eval $(call gb_CustomTarget_CustomTarget,writerfilter/source,new_style))
WFSG := $(call gb_CustomTarget_get_workdir,writerfilter/source)
WFDIR := $(SRCDIR)/writerfilter/source/
gb_PARTIALBUILD:=T
include $(WFDIR)generated.mk
include $(GBUILDDIR)/gbuild_simple.mk
# doctok
doctok :
mkdir doctok
wf_SRC_doctok_Model=$(WFDIR)doctok/resources.xmi
wf_SRC_doctok_Resources_xsl=$(WFDIR)doctok/resources.xsl
wf_SRC_doctok_ResourcesImpl_xsl=$(WFDIR)doctok/resourcesimpl.xsl
......@@ -44,32 +43,29 @@ wf_SRC_doctok_ResourceIds_xsl=$(WFDIR)doctok/resourceids.xsl
wf_SRC_doctok_SprmIds_xsl=$(WFDIR)doctok/sprmids.xsl
wf_SRC_doctok_ResourceTools_xsl=$(WFDIR)doctok/resourcetools.xsl
wf_GEN_doctok_SprmIds_hxx=doctok/sprmids.hxx
wf_GEN_doctok_ResourceIds_hxx=doctok/resourceids.hxx
wf_GEN_doctok_Resources_hxx=doctok/resources.hxx
wf_GEN_doctok_Resources_cxx=resources.cxx
wf_GEN_doctok_SprmIds_hxx := $(WFSG)/doctok/sprmids.hxx
wf_GEN_doctok_ResourceIds_hxx := $(WFSG)/doctok/resourceids.hxx
wf_GEN_doctok_Resources_hxx := $(WFSG)/doctok/resources.hxx
wf_GEN_doctok_Resources_cxx := $(WFSG)/resources.cxx
$(wf_GEN_doctok_SprmIds_hxx) : doctok $(wf_SRC_doctok_SprmIds_xsl) $(wf_SRC_doctok_Model)
$(wf_GEN_doctok_SprmIds_hxx) : $(wf_SRC_doctok_SprmIds_xsl) $(wf_SRC_doctok_Model) | $(WFSG)/doctok/.dir
$(call gb_Output_announce,$@,build,XSL,1)
$(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_SprmIds_xsl) $(wf_SRC_doctok_Model)) > $@
$(wf_GEN_doctok_ResourceIds_hxx) : doctok $(wf_SRC_doctok_ResourceIds_xsl) $(wf_SRC_doctok_Model)
$(wf_GEN_doctok_ResourceIds_hxx) : $(wf_SRC_doctok_ResourceIds_xsl) $(wf_SRC_doctok_Model) | $(WFSG)/doctok/.dir
$(call gb_Output_announce,$@,build,XSL,1)
$(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_ResourceIds_xsl) $(wf_SRC_doctok_Model)) > $@
$(wf_GEN_doctok_Resources_hxx) : doctok $(wf_SRC_doctok_Resources_xsl) $(wf_SRC_doctok_Model)
$(wf_GEN_doctok_Resources_hxx) : $(wf_SRC_doctok_Resources_xsl) $(wf_SRC_doctok_Model) | $(WFSG)/doctok/.dir
$(call gb_Output_announce,$@,build,XSL,1)
$(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_Resources_xsl) $(wf_SRC_doctok_Model)) > $@
$(wf_GEN_doctok_Resources_cxx) : doctok $(wf_SRC_doctok_ResourcesImpl_xsl) $(wf_SRC_doctok_Model) $(wf_SRC_doctok_ResourceTools_xsl)
$(wf_GEN_doctok_Resources_cxx) : $(wf_SRC_doctok_ResourcesImpl_xsl) $(wf_SRC_doctok_Model) $(wf_SRC_doctok_ResourceTools_xsl) | $(WFSG)/doctok/.dir
$(call gb_Output_announce,$@,build,XSL,1)
$(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_ResourcesImpl_xsl) $(wf_SRC_doctok_Model)) > $@
# ooxml
ooxml :
mkdir ooxml
wf_SRC_ooxml_Model=$(WFDIR)ooxml/model.xml
wf_SRC_ooxml_Preprocess_xsl=$(WFDIR)ooxml/modelpreprocess.xsl
wf_SRC_ooxml_FactoryTools_xsl=$(WFDIR)ooxml/factorytools.xsl
......@@ -80,20 +76,20 @@ wf_SRC_ooxml_FactoryValuesImpl_xsl=$(WFDIR)ooxml/factoryimpl_values.xsl
wf_SRC_ooxml_ResourceIds_xsl=$(WFDIR)ooxml/resourceids.xsl
wf_SRC_ooxml_GperfFastTokenHandler_xsl=$(WFDIR)ooxml/gperffasttokenhandler.xsl
wf_SRC_ooxml_Analyze_model_xsl=$(WFDIR)ooxml/analyzemodel.xsl
wf_GEN_ooxml_ResourceIds_hxx=ooxml/resourceids.hxx
wf_GEN_ooxml_ResourceIds_hxx=$(WFSG)/ooxml/resourceids.hxx
wf_GEN_ooxml_token_xml=token.xml
wf_GEN_ooxml_token_tmp=token.tmp
wf_GEN_ooxml_token_xml=$(WFSG)/token.xml
wf_GEN_ooxml_token_tmp=$(WFSG)/token.tmp
wf_GEN_ooxml_Factory_hxx=OOXMLFactory_generated.hxx
wf_GEN_ooxml_Factory_cxx=OOXMLFactory_generated.cxx
wf_GEN_ooxml_FastTokens_hxx=ooxml/OOXMLFastTokens.hxx
wf_GEN_ooxml_NamespaceIds_hxx=ooxml/OOXMLnamespaceids.hxx
wf_GEN_ooxml_FactoryValues_hxx=OOXMLFactory_values.hxx
wf_GEN_ooxml_FactoryValues_cxx=OOXMLFactory_values.cxx
wf_GEN_ooxml_GperfFastToken_hxx=gperffasttoken.hxx
wf_GEN_ooxml_Model_processed=model_preprocessed.xml
wf_GEN_ooxml_Model_analyzed=ooxml/model_analyzed.xml
wf_GEN_ooxml_Factory_hxx=$(WFSG)/OOXMLFactory_generated.hxx
wf_GEN_ooxml_Factory_cxx=$(WFSG)/OOXMLFactory_generated.cxx
wf_GEN_ooxml_FastTokens_hxx=$(WFSG)/ooxml/OOXMLFastTokens.hxx
wf_GEN_ooxml_NamespaceIds_hxx=$(WFSG)/ooxml/OOXMLnamespaceids.hxx
wf_GEN_ooxml_FactoryValues_hxx=$(WFSG)/OOXMLFactory_values.hxx
wf_GEN_ooxml_FactoryValues_cxx=$(WFSG)/OOXMLFactory_values.cxx
wf_GEN_ooxml_GperfFastToken_hxx=$(WFSG)/gperffasttoken.hxx
wf_GEN_ooxml_Model_processed=$(WFSG)/model_preprocessed.xml
wf_GEN_ooxml_Model_analyzed=$(WFSG)/ooxml/model_analyzed.xml
$(wf_GEN_ooxml_token_tmp) : $(OUTDIR)/inc/oox/tokens.txt
$(call gb_Output_announce,$@,build,CAT,1)
......@@ -116,11 +112,11 @@ $(wf_GEN_ooxml_Factory_cxx) : $(WFDIR)ooxml/factoryimpl.xsl $(wf_GEN_ooxml_Model
$(call gb_Output_announce,$@,build,XSL,1)
$(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $< $(wf_GEN_ooxml_Model_processed)) > $@
OOXMLFactory%.cxx : $(WFDIR)ooxml/factoryimpl_ns.xsl $(wf_GEN_ooxml_Model_processed)
$(WFSG)/OOXMLFactory%.cxx : $(WFDIR)ooxml/factoryimpl_ns.xsl $(wf_GEN_ooxml_Model_processed)
$(call gb_Output_announce,$@,build,XSL,1)
$(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) --stringparam file $@ $< $(wf_GEN_ooxml_Model_processed)) > $@
OOXMLFactory%.hxx : $(WFDIR)ooxml/factory_ns.xsl $(wf_GEN_ooxml_Model_processed)
$(WFSG)/OOXMLFactory%.hxx : $(WFDIR)ooxml/factory_ns.xsl $(wf_GEN_ooxml_Model_processed)
$(call gb_Output_announce,$@,build,XSL,1)
$(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) --stringparam file $@ $< $(wf_GEN_ooxml_Model_processed)) > $@
......@@ -132,7 +128,7 @@ $(wf_GEN_ooxml_FactoryValues_cxx) : $(wf_SRC_ooxml_FactoryValuesImpl_xsl) $(wf_G
$(call gb_Output_announce,$@,build,XSL,1)
$(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_FactoryValuesImpl_xsl) $(wf_GEN_ooxml_Model_processed)) > $@
$(wf_GEN_ooxml_ResourceIds_hxx) : ooxml $(wf_SRC_ooxml_ResourceIds_xsl) $(wf_GEN_ooxml_Model_processed)
$(wf_GEN_ooxml_ResourceIds_hxx) : $(wf_SRC_ooxml_ResourceIds_xsl) $(wf_GEN_ooxml_Model_processed) | $(WFSG)/ooxml/.dir
$(call gb_Output_announce,$@,build,XSL,1)
$(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_ResourceIds_xsl) $(wf_GEN_ooxml_Model_processed)) > $@
......@@ -154,7 +150,7 @@ $(wf_GEN_ooxml_Model_analyzed): $(wf_SRC_ooxml_Analyze_model_xsl) $(wf_SRC_ooxml
wf_SRC_rtftok_scanner_lex=$(WFDIR)rtftok/RTFScanner.lex
wf_SRC_rtftok_scanner_skl=$(WFDIR)rtftok/RTFScanner.skl
wf_GEN_rtftok_scanner_cxx=RTFScanner.cxx
wf_GEN_rtftok_scanner_cxx=$(WFSG)/RTFScanner.cxx
# does not build, currently unused
#$(wf_GEN_rtftok_scanner_cxx) : $(wf_SRC_rtftok_scanner_lex) $(wf_SRC_rtftok_scanner_skl)
......@@ -162,18 +158,18 @@ wf_GEN_rtftok_scanner_cxx=RTFScanner.cxx
# resourcemodel
wf_GEN_model_QNameToStr_cxx=qnametostr.cxx
wf_GEN_ooxml_QNameToStr_tmp=OOXMLqnameToStr.tmp
wf_GEN_model_SprmCodeToStr_cxx=sprmcodetostr.cxx
wf_GEN_model_SprmCodeToStr_tmp=sprmcodetostr.tmp
wf_GEN_doctok_QnameToStr_tmp=DOCTOKqnameToStr.tmp
wf_GEN_model_QNameToStr_cxx=$(WFSG)/qnametostr.cxx
wf_GEN_ooxml_QNameToStr_tmp=$(WFSG)/OOXMLqnameToStr.tmp
wf_GEN_model_SprmCodeToStr_cxx=$(WFSG)/sprmcodetostr.cxx
wf_GEN_model_SprmCodeToStr_tmp=$(WFSG)/sprmcodetostr.tmp
wf_GEN_doctok_QnameToStr_tmp=$(WFSG)/DOCTOKqnameToStr.tmp
wf_SRC_doctok_SprmCodeToStr_xsl=$(WFDIR)doctok/sprmcodetostr.xsl
wf_SRC_doctok_QNameToStr_xsl=$(WFDIR)doctok/qnametostr.xsl
wf_SRC_ooxml_QNameToStr_xsl=$(WFDIR)ooxml/qnametostr.xsl
wf_SRC_model_NamespacePreprocess=$(WFDIR)resourcemodel/namespace_preprocess.pl
wf_GEN_ooxml_Namespacesmap_xsl=namespacesmap.xsl
wf_DEP_ooxml_namespaces_txt=$(OUTDIR)/inc$(UPDMINOREXT)/oox/namespaces.txt
wf_GEN_ooxml_preprocess_xsl=modelpreprocess.xsl
wf_GEN_ooxml_Namespacesmap_xsl=$(WFSG)/namespacesmap.xsl
wf_DEP_ooxml_namespaces_txt=$(OUTDIR)/inc/oox/namespaces.txt
wf_GEN_ooxml_preprocess_xsl=$(WFSG)/modelpreprocess.xsl
$(wf_GEN_ooxml_QNameToStr_tmp): $(wf_SRC_ooxml_QNameToStr_xsl) $(wf_GEN_ooxml_Model_processed)
$(call gb_Output_announce,$@,build,XSL,1)
......@@ -209,9 +205,7 @@ $(wf_GEN_ooxml_Model_processed) : $(wf_GEN_ooxml_Namespacesmap_xsl) $(wf_GEN_oox
# all
.DEFAULT_GOAL:=all
.PHONY: all
all : \
wf_all := \
$(wf_GEN_doctok_SprmIds_hxx) \
$(wf_GEN_doctok_ResourceIds_hxx) \
$(wf_GEN_doctok_Resources_hxx) \
......@@ -226,6 +220,11 @@ all : \
$(wf_GEN_ooxml_NamespaceIds_hxx) \
$(wf_GEN_model_QNameToStr_cxx) \
$(wf_GEN_model_SprmCodeToStr_cxx) \
$(patsubst %,OOXMLFactory_%.hxx,$(WRITERFILTER_OOXMLNAMESPACES)) \
$(patsubst %,OOXMLFactory_%.cxx,$(WRITERFILTER_OOXMLNAMESPACES)) \
$(patsubst %,$(WFSG)/OOXMLFactory_%.hxx,$(WRITERFILTER_OOXMLNAMESPACES)) \
$(patsubst %,$(WFSG)/OOXMLFactory_%.cxx,$(WRITERFILTER_OOXMLNAMESPACES)) \
$(call gb_CustomTarget_get_target,writerfilter/source) : $(wf_all)
$(wf_all) :| $(gb_XSLTPROCTARGET) $(WFSG)/.dir
# vim: set noet sw=4 ts=4:
......@@ -27,12 +27,11 @@
$(eval $(call gb_Library_Library,resourcemodel))
$(eval $(call gb_Library_add_package_headers,resourcemodel,writerfilter_generated))
$(eval $(call gb_Library_add_custom_headers,resourcemodel,writerfilter/source))
$(eval $(call gb_Library_set_include,resourcemodel,\
$$(INCLUDE) \
-I$(SRCDIR)/writerfilter/inc \
-I$(WORKDIR)/CustomTarget/writerfilter/source \
))
include $(SRCDIR)/writerfilter/debug_setup.mk
......
......@@ -28,13 +28,14 @@
$(eval $(call gb_Module_Module,writerfilter))
$(eval $(call gb_Module_add_targets,writerfilter,\
CustomTarget_source \
Library_doctok \
Library_ooxml \
Library_resourcemodel \
Library_rtftok \
Library_writerfilter \
Library_writerfilter_uno \
Package_writerfilter_generated \
Package_sprmids \
))
$(eval $(call gb_Module_add_check_targets,writerfilter,\
......
......@@ -26,55 +26,8 @@
#
#*************************************************************************
$(eval $(call \
gb_Package_Package,writerfilter_generated,$(WORKDIR)/CustomTarget/writerfilter/source))
$(eval $(call gb_Package_Package,writerfilter_sprmids,$(call gb_CustomTarget_get_workdir,writerfilter/source)))
$(eval $(call \
gb_Package_add_customtarget,writerfilter_generated,writerfilter/source))
$(eval $(call \
gb_CustomTarget_add_outdir_dependencies,writerfilter/source,\
$(gb_XSLTPROCTARGET) \
$(OUTDIR)/inc/oox/tokens.txt \
$(OUTDIR)/inc/oox/namespaces.txt \
))
$(eval $(call \
gb_CustomTarget_add_dependencies,writerfilter/source,\
writerfilter/source/doctok/resources.xmi \
writerfilter/source/doctok/resources.xsl \
writerfilter/source/doctok/resourcesimpl.xsl \
writerfilter/source/doctok/resourceids.xsl \
writerfilter/source/doctok/sprmids.xsl \
writerfilter/source/doctok/resourcetools.xsl \
writerfilter/source/ooxml/model.xml \
writerfilter/source/ooxml/modelpreprocess.xsl \
writerfilter/source/ooxml/factorytools.xsl \
writerfilter/source/ooxml/fasttokens.xsl \
writerfilter/source/ooxml/namespaceids.xsl \
writerfilter/source/ooxml/factory_values.xsl \
writerfilter/source/ooxml/factoryimpl_values.xsl \
writerfilter/source/ooxml/resourceids.xsl \
writerfilter/source/ooxml/gperffasttokenhandler.xsl \
writerfilter/source/ooxml/gperffasttokenhandler.xsl \
writerfilter/source/ooxml/tokenxmlheader \
writerfilter/source/ooxml/tokenxmlfooter \
writerfilter/source/ooxml/factoryinc.xsl \
writerfilter/source/ooxml/factoryimpl.xsl \
writerfilter/source/ooxml/factoryimpl_ns.xsl \
writerfilter/source/ooxml/factory_ns.xsl \
writerfilter/source/doctok/sprmcodetostr.xsl \
writerfilter/source/doctok/qnametostr.xsl \
writerfilter/source/ooxml/qnametostr.xsl \
writerfilter/source/resourcemodel/namespace_preprocess.pl \
writerfilter/source/resourcemodel/qnametostrheader \
writerfilter/source/resourcemodel/qnametostrfooter \
writerfilter/source/resourcemodel/sprmcodetostrheader \
writerfilter/source/resourcemodel/sprmcodetostrfooter \
))
$(eval $(call gb_Package_add_file,writerfilter_generated,inc/writerfilter/doctok/sprmids.hxx,doctok/sprmids.hxx))
$(eval $(call gb_Package_add_file,writerfilter_generated,inc/writerfilter/doctok/resourceids.hxx,doctok/resourceids.hxx))
$(eval $(call gb_Package_add_file,writerfilter_generated,inc/writerfilter/ooxml/resourceids.hxx,ooxml/resourceids.hxx))
$(eval $(call gb_Package_add_file,writerfilter_sprmids,inc/writerfilter/doctok/sprmids.hxx,doctok/sprmids.hxx))
# vim: set noet sw=4 ts=4:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment