diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-11-23 09:42:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-11-23 10:06:16 +0000 |
commit | 4ee0ee4971119b0460fc3e7819a23acd34202dc4 (patch) | |
tree | 06ef11810ec8e64fc8d35b46aa95455fb41a4488 /writerfilter | |
parent | b5a89ad137d0750b65f0820ebc9fa4e13a84067b (diff) |
split qnametostr up to try and make .o's small enough for ppc64
i.e. relocation truncated to fix: R_PPC64_TOC16_DS
while I'm at it merge the standalone header/footer files into the .xslt and
simplify the makefile.
Change-Id: Iee0e9b5dd96868f49f1bed22fb5dc6d28c8cef81
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/CustomTarget_source.mk | 16 | ||||
-rw-r--r-- | writerfilter/Library_writerfilter.mk | 21 | ||||
-rw-r--r-- | writerfilter/source/doctok/qnametostr.xsl | 6 | ||||
-rw-r--r-- | writerfilter/source/ooxml/qnametostr.xsl | 8 | ||||
-rw-r--r-- | writerfilter/source/resourcemodel/qnametostrcore.cxx (renamed from writerfilter/source/resourcemodel/qnametostrheader) | 10 | ||||
-rw-r--r-- | writerfilter/source/resourcemodel/qnametostrfooter | 7 |
6 files changed, 29 insertions, 39 deletions
diff --git a/writerfilter/CustomTarget_source.mk b/writerfilter/CustomTarget_source.mk index fc297849ac14..5ee30418d987 100644 --- a/writerfilter/CustomTarget_source.mk +++ b/writerfilter/CustomTarget_source.mk @@ -42,8 +42,8 @@ writerfilter_ALL = \ $(writerfilter_GEN_doctok_ResourceIds_hxx) \ $(writerfilter_GEN_doctok_Resources_cxx) \ $(writerfilter_GEN_doctok_Resources_hxx) \ + $(writerfilter_GEN_doctok_QNameToStr_cxx) \ $(writerfilter_GEN_doctok_SprmIds_hxx) \ - $(writerfilter_GEN_model_QNameToStr_cxx) \ $(writerfilter_GEN_model_SprmCodeToStr_cxx) \ $(writerfilter_GEN_ooxml_Factory_cxx) \ $(writerfilter_GEN_ooxml_Factory_hxx) \ @@ -52,17 +52,17 @@ writerfilter_ALL = \ $(writerfilter_GEN_ooxml_FastTokens_hxx) \ $(writerfilter_GEN_ooxml_GperfFastToken_hxx) \ $(writerfilter_GEN_ooxml_NamespaceIds_hxx) \ + $(writerfilter_GEN_ooxml_QNameToStr_cxx) \ $(writerfilter_GEN_ooxml_ResourceIds_hxx) \ $(patsubst %,$(writerfilter_WORK)/OOXMLFactory_%.hxx,$(writerfilter_OOXMLNAMESPACES)) \ $(patsubst %,$(writerfilter_WORK)/OOXMLFactory_%.cxx,$(writerfilter_OOXMLNAMESPACES)) \ writerfilter_DEP_ooxml_Namespaces_txt=$(OUTDIR)/inc/oox/namespaces.txt -writerfilter_GEN_doctok_QnameToStr_tmp=$(writerfilter_WORK)/DOCTOKqnameToStr.tmp writerfilter_GEN_doctok_ResourceIds_hxx=$(writerfilter_WORK)/doctok/resourceids.hxx writerfilter_GEN_doctok_Resources_cxx=$(writerfilter_WORK)/resources.cxx writerfilter_GEN_doctok_Resources_hxx=$(writerfilter_WORK)/doctok/resources.hxx +writerfilter_GEN_doctok_QNameToStr_cxx=$(writerfilter_WORK)/doctok/qnametostr.cxx writerfilter_GEN_doctok_SprmIds_hxx=$(writerfilter_WORK)/doctok/sprmids.hxx -writerfilter_GEN_model_QNameToStr_cxx=$(writerfilter_WORK)/qnametostr.cxx writerfilter_GEN_model_SprmCodeToStr_cxx=$(writerfilter_WORK)/sprmcodetostr.cxx writerfilter_GEN_model_SprmCodeToStr_tmp=$(writerfilter_WORK)/sprmcodetostr.tmp writerfilter_GEN_ooxml_FactoryValues_cxx=$(writerfilter_WORK)/OOXMLFactory_values.cxx @@ -76,7 +76,7 @@ writerfilter_GEN_ooxml_Model_processed=$(writerfilter_WORK)/model_preprocessed.x writerfilter_GEN_ooxml_NamespaceIds_hxx=$(writerfilter_WORK)/ooxml/OOXMLnamespaceids.hxx writerfilter_GEN_ooxml_Namespacesmap_xsl=$(writerfilter_WORK)/namespacesmap.xsl writerfilter_GEN_ooxml_Preprocess_xsl=$(writerfilter_WORK)/modelpreprocess.xsl -writerfilter_GEN_ooxml_QNameToStr_tmp=$(writerfilter_WORK)/OOXMLqnameToStr.tmp +writerfilter_GEN_ooxml_QNameToStr_cxx=$(writerfilter_WORK)/ooxml/qnametostr.cxx writerfilter_GEN_ooxml_ResourceIds_hxx=$(writerfilter_WORK)/ooxml/resourceids.hxx writerfilter_GEN_ooxml_Token_tmp=$(writerfilter_WORK)/token.tmp writerfilter_GEN_ooxml_Token_xml=$(writerfilter_WORK)/token.xml @@ -101,7 +101,7 @@ writerfilter_SRC_ooxml_Preprocess_xsl=$(writerfilter_SRC)/ooxml/modelpreprocess. writerfilter_SRC_ooxml_QNameToStr_xsl=$(writerfilter_SRC)/ooxml/qnametostr.xsl writerfilter_SRC_ooxml_ResourceIds_xsl=$(writerfilter_SRC)/ooxml/resourceids.xsl -$(writerfilter_GEN_doctok_QnameToStr_tmp): $(writerfilter_SRC_doctok_QNameToStr_xsl) $(writerfilter_SRC_doctok_Model) | $(writerfilter_WORK)/.dir +$(writerfilter_GEN_doctok_QNameToStr_cxx): $(writerfilter_SRC_doctok_QNameToStr_xsl) $(writerfilter_SRC_doctok_Model) $(writerfilter_SRC_doctok_ResourceTools_xsl) | $(writerfilter_WORK)/.dir $(call gb_Output_announce,$@,build,XSL,1) $(call gb_Helper_abbreviate_dirs, $(gb_XSLTPROC) $(writerfilter_SRC_doctok_QNameToStr_xsl) $(writerfilter_SRC_doctok_Model)) > $@ @@ -121,10 +121,6 @@ $(writerfilter_GEN_doctok_SprmIds_hxx) : $(writerfilter_SRC_doctok_Model) $(writ $(call gb_Output_announce,$@,build,XSL,1) $(call gb_Helper_abbreviate_dirs, $(gb_XSLTPROC) $(writerfilter_SRC_doctok_SprmIds_xsl) $(writerfilter_SRC_doctok_Model)) > $@ -$(writerfilter_GEN_model_QNameToStr_cxx): $(writerfilter_GEN_ooxml_QNameToStr_tmp) $(writerfilter_GEN_doctok_QnameToStr_tmp) $(writerfilter_SRC)/resourcemodel/qnametostrheader $(writerfilter_SRC)/resourcemodel/qnametostrfooter $(writerfilter_SRC_ooxml_FactoryTools_xsl) $(writerfilter_SRC_doctok_ResourceTools_xsl) - $(call gb_Output_announce,$@,build,CAT,1) - cat $(writerfilter_SRC)/resourcemodel/qnametostrheader $(writerfilter_GEN_ooxml_QNameToStr_tmp) $(writerfilter_GEN_doctok_QnameToStr_tmp) $(writerfilter_SRC)/resourcemodel/qnametostrfooter > $@ - $(writerfilter_GEN_model_SprmCodeToStr_cxx): $(writerfilter_SRC)/resourcemodel/sprmcodetostrheader $(writerfilter_GEN_model_SprmCodeToStr_tmp) $(writerfilter_SRC)/resourcemodel/sprmcodetostrfooter $(call gb_Output_announce,$@,build,CAT,1) cat $^ > $@ @@ -179,7 +175,7 @@ $(writerfilter_GEN_ooxml_Preprocess_xsl) : $(writerfilter_SRC_ooxml_Preprocess_x $(call gb_Output_announce,$@,build,CPY,1) cp -f $(writerfilter_SRC_ooxml_Preprocess_xsl) $@ -$(writerfilter_GEN_ooxml_QNameToStr_tmp): $(writerfilter_SRC_ooxml_QNameToStr_xsl) $(writerfilter_GEN_ooxml_Model_processed) +$(writerfilter_GEN_ooxml_QNameToStr_cxx): $(writerfilter_SRC_ooxml_QNameToStr_xsl) $(writerfilter_SRC_ooxml_FactoryTools_xsl) $(writerfilter_GEN_ooxml_Model_processed) $(call gb_Output_announce,$@,build,XSL,1) $(call gb_Helper_abbreviate_dirs, $(gb_XSLTPROC) $(writerfilter_SRC_ooxml_QNameToStr_xsl) $(writerfilter_GEN_ooxml_Model_processed)) > $@ diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk index 1d7c66763a80..870732fb87eb 100644 --- a/writerfilter/Library_writerfilter.mk +++ b/writerfilter/Library_writerfilter.mk @@ -170,6 +170,7 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\ writerfilter/source/resourcemodel/TagLogger \ writerfilter/source/resourcemodel/WW8Analyzer \ writerfilter/source/resourcemodel/XPathLogger \ + writerfilter/source/resourcemodel/qnametostrcore \ writerfilter/source/resourcemodel/resourcemodel \ writerfilter/source/resourcemodel/util \ )) @@ -180,24 +181,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,writerfilter,\ CustomTarget/writerfilter/source/OOXMLFactory_generated \ CustomTarget/writerfilter/source/OOXMLFactory_values \ CustomTarget/writerfilter/source/sprmcodetostr \ + CustomTarget/writerfilter/source/doctok/qnametostr \ + CustomTarget/writerfilter/source/ooxml/qnametostr \ )) -ifneq ($(COM)-$(OS)-$(CPUNAME),GCC-LINUX-POWERPC64) -#Apparently some compilers, according to the original .mk this was converted -#from, require this to be noopt or they fail to compile it, probably good to -#revisit that and narrow this down to where it's necessary -$(eval $(call gb_Library_add_generated_cxxobjects,writerfilter,\ - CustomTarget/writerfilter/source/qnametostr \ - , $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \ -)) -else -#Ironically, on RHEL-6 PPC64 with no-opt the output is too large for the -#toolchain, "Error: operand out of range", but it build fine with -#normal flags -$(eval $(call gb_Library_add_generated_cxxobjects,writerfilter,\ - CustomTarget/writerfilter/source/qnametostr \ - , $(gb_LinkTarget_EXCEPTIONFLAGS) \ -)) -endif - # vim: set noet sw=4 ts=4: diff --git a/writerfilter/source/doctok/qnametostr.xsl b/writerfilter/source/doctok/qnametostr.xsl index a416512c8622..e3009c952cde 100644 --- a/writerfilter/source/doctok/qnametostr.xsl +++ b/writerfilter/source/doctok/qnametostr.xsl @@ -22,8 +22,14 @@ <xsl:include href="resourcetools.xsl"/> <xsl:template match="/"> +#include "doctok/resourceids.hxx" +#include "resourcemodel/QNameToString.hxx" + +namespace writerfilter +{ <xsl:apply-templates select=".//UML:Model" mode="qnametostr"/> <xsl:apply-templates select='.//UML:Model' mode='sprmidstoxml'/> <xsl:apply-templates select='.//UML:Model' mode='analyzerdoctokids'/> +} </xsl:template> </xsl:stylesheet> diff --git a/writerfilter/source/ooxml/qnametostr.xsl b/writerfilter/source/ooxml/qnametostr.xsl index 1dc689f7e3e2..a7a7d6c4aa93 100644 --- a/writerfilter/source/ooxml/qnametostr.xsl +++ b/writerfilter/source/ooxml/qnametostr.xsl @@ -113,8 +113,14 @@ void ooxmlidsToXML(::std::ostream & out) </xsl:template> <xsl:template match="/"> +#include "ooxml/resourceids.hxx" +#include "resourcemodel/QNameToString.hxx" + +namespace writerfilter +{ <xsl:call-template name="qnametostr"/> <xsl:call-template name="ooxmlidstoxml"/> +} </xsl:template> -</xsl:stylesheet>
\ No newline at end of file +</xsl:stylesheet> diff --git a/writerfilter/source/resourcemodel/qnametostrheader b/writerfilter/source/resourcemodel/qnametostrcore.cxx index c476ff0ae65e..81ed0f108823 100644 --- a/writerfilter/source/resourcemodel/qnametostrheader +++ b/writerfilter/source/resourcemodel/qnametostrcore.cxx @@ -16,10 +16,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> #include <resourcemodel/QNameToString.hxx> -#include <stdio.h> namespace writerfilter { @@ -46,3 +43,10 @@ string WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString::operator()(Id qName) return mMap[qName]; } +QNameToString::QNameToString() +{ + init_doctok(); + init_ooxml(); +} + +} diff --git a/writerfilter/source/resourcemodel/qnametostrfooter b/writerfilter/source/resourcemodel/qnametostrfooter deleted file mode 100644 index 3c79a48095d9..000000000000 --- a/writerfilter/source/resourcemodel/qnametostrfooter +++ /dev/null @@ -1,7 +0,0 @@ -QNameToString::QNameToString() -{ - init_doctok(); - init_ooxml(); -} - -} |