summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-03-31 15:25:10 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2012-04-04 11:31:57 +0200
commit8aab8292fedb840238f654530df67b6e79ade537 (patch)
tree07a9e4be025534ffadc7a459779126729537876d /writerfilter
parentd26e13bd7a8693867ab86eabec50212c95d4f3f6 (diff)
writerfilter: use CustomTarget makefile
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/CustomTarget_source.mk (renamed from writerfilter/source/Makefile)91
-rw-r--r--writerfilter/Library_resourcemodel.mk3
-rw-r--r--writerfilter/Module_writerfilter.mk3
-rw-r--r--writerfilter/Package_sprmids.mk33
-rw-r--r--writerfilter/Package_writerfilter_generated.mk80
5 files changed, 81 insertions, 129 deletions
diff --git a/writerfilter/source/Makefile b/writerfilter/CustomTarget_source.mk
index 2b10ae972629..e0dda39b2e27 100644
--- a/writerfilter/source/Makefile
+++ b/writerfilter/CustomTarget_source.mk
@@ -1,3 +1,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:
diff --git a/writerfilter/Library_resourcemodel.mk b/writerfilter/Library_resourcemodel.mk
index 4cd6261090a0..4583db410704 100644
--- a/writerfilter/Library_resourcemodel.mk
+++ b/writerfilter/Library_resourcemodel.mk
@@ -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
diff --git a/writerfilter/Module_writerfilter.mk b/writerfilter/Module_writerfilter.mk
index a35daa90de82..a4711bfda61b 100644
--- a/writerfilter/Module_writerfilter.mk
+++ b/writerfilter/Module_writerfilter.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,\
diff --git a/writerfilter/Package_sprmids.mk b/writerfilter/Package_sprmids.mk
new file mode 100644
index 000000000000..2eaa53007f93
--- /dev/null
+++ b/writerfilter/Package_sprmids.mk
@@ -0,0 +1,33 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Package_Package,writerfilter_sprmids,$(call gb_CustomTarget_get_workdir,writerfilter/source)))
+
+$(eval $(call gb_Package_add_file,writerfilter_sprmids,inc/writerfilter/doctok/sprmids.hxx,doctok/sprmids.hxx))
+
+# vim: set noet sw=4 ts=4:
diff --git a/writerfilter/Package_writerfilter_generated.mk b/writerfilter/Package_writerfilter_generated.mk
deleted file mode 100644
index 3e036f14a507..000000000000
--- a/writerfilter/Package_writerfilter_generated.mk
+++ /dev/null
@@ -1,80 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2009 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-$(eval $(call \
- gb_Package_Package,writerfilter_generated,$(WORKDIR)/CustomTarget/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))
-
-# vim: set noet sw=4 ts=4: