Kaydet (Commit) d595e5ec authored tarafından Jan Holesovsky's avatar Jan Holesovsky

writerfilter: Avoid a temporary file, sed can handle this by itself.

Change-Id: I7fde1b44809b1886730145f16878e0f1045b2555
üst e0057072
...@@ -70,7 +70,6 @@ writerfilter_GEN_ooxml_Namespacesmap_xsl=$(writerfilter_WORK)/namespacesmap.xsl ...@@ -70,7 +70,6 @@ writerfilter_GEN_ooxml_Namespacesmap_xsl=$(writerfilter_WORK)/namespacesmap.xsl
writerfilter_GEN_ooxml_Preprocess_xsl=$(writerfilter_WORK)/modelpreprocess.xsl writerfilter_GEN_ooxml_Preprocess_xsl=$(writerfilter_WORK)/modelpreprocess.xsl
writerfilter_GEN_ooxml_QNameToStr_cxx=$(writerfilter_WORK)/ooxml/qnametostr.cxx writerfilter_GEN_ooxml_QNameToStr_cxx=$(writerfilter_WORK)/ooxml/qnametostr.cxx
writerfilter_GEN_ooxml_ResourceIds_hxx=$(writerfilter_WORK)/ooxml/resourceids.hxx 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 writerfilter_GEN_ooxml_Token_xml=$(writerfilter_WORK)/token.xml
writerfilter_SRC_model_NamespacePreprocess=$(writerfilter_SRC)/resourcemodel/namespace_preprocess.pl writerfilter_SRC_model_NamespacePreprocess=$(writerfilter_SRC)/resourcemodel/namespace_preprocess.pl
writerfilter_SRC_ooxml_Analyze_model_xsl=$(writerfilter_SRC)/ooxml/analyzemodel.xsl writerfilter_SRC_ooxml_Analyze_model_xsl=$(writerfilter_SRC)/ooxml/analyzemodel.xsl
...@@ -134,15 +133,11 @@ $(writerfilter_GEN_ooxml_ResourceIds_hxx) : $(writerfilter_SRC_ooxml_ResourceIds ...@@ -134,15 +133,11 @@ $(writerfilter_GEN_ooxml_ResourceIds_hxx) : $(writerfilter_SRC_ooxml_ResourceIds
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,XSL,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,XSL,1)
$(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_ooxml_ResourceIds_xsl) $(writerfilter_GEN_ooxml_Model_processed)) > $@ $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_ooxml_ResourceIds_xsl) $(writerfilter_GEN_ooxml_Model_processed)) > $@
$(writerfilter_GEN_ooxml_Token_tmp) : $(SRCDIR)/oox/source/token/tokens.txt | $(writerfilter_WORK)/.dir $(writerfilter_GEN_ooxml_Token_xml) : $(SRCDIR)/oox/source/token/tokens.txt $(writerfilter_SRC)/ooxml/tokens-to-xml.sed | $(writerfilter_WORK)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,CAT,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,CAT,1)
sed "s/\(.*\)/<fasttoken>\1<\/fasttoken>/" \ sed -f $(writerfilter_SRC)/ooxml/tokens-to-xml.sed \
< $(SRCDIR)/oox/source/token/tokens.txt > $@ < $(SRCDIR)/oox/source/token/tokens.txt > $@
$(writerfilter_GEN_ooxml_Token_xml) : $(writerfilter_SRC)/ooxml/tokenxmlheader $(writerfilter_GEN_ooxml_Token_tmp) $(writerfilter_SRC)/ooxml/tokenxmlfooter
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,CAT,1)
cat $(writerfilter_SRC)/ooxml/tokenxmlheader $(writerfilter_GEN_ooxml_Token_tmp) $(writerfilter_SRC)/ooxml/tokenxmlfooter > $@
$(writerfilter_WORK)/OOXMLFactory%.cxx : $(writerfilter_SRC)/ooxml/factoryimpl_ns.xsl $(writerfilter_GEN_ooxml_Model_processed) $(writerfilter_WORK)/OOXMLFactory%.cxx : $(writerfilter_SRC)/ooxml/factoryimpl_ns.xsl $(writerfilter_GEN_ooxml_Model_processed)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,XSL,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,XSL,1)
$(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) --stringparam file $@ $< $(writerfilter_GEN_ooxml_Model_processed)) > $@ $(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) --stringparam file $@ $< $(writerfilter_GEN_ooxml_Model_processed)) > $@
......
#! /usr/bin/sed -f
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# first line - insert <model>
1,1i\
<model>
# last line - append </model>
$,$a\
</model>
# everywhere - replace the input line with <fasttoken>...</fasttoken>
s/\(.*\)/<fasttoken>\1<\/fasttoken>/
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