Kaydet (Commit) 267ddb1c authored tarafından Michael Stahl's avatar Michael Stahl

fdo#68552: try different build-time replacement

Replace the offending variable at build time in pyAltFCFGMerge.

Change-Id: Ie96d780eed8325c6f8399e78025345c0f0369856
üst 791a8b96
......@@ -43,6 +43,7 @@ $(call filter_XcuFilterTypesTarget_get_target,%) : $(filter_MERGE_TARGET)
echo "items=$(basename $(notdir $(filter %.xcu,$^)))" \
| sed "s/ /$(COMMA)/g" > $${RESPONSEFILE} && \
$(filter_MERGE) tempdir=$(TMPDIR) \
share_subdir_name=$(LIBO_SHARE_FOLDER) \
fragmentsdir=$(dir $(firstword $(filter %.xcu,$^))).. \
outdir=$(dir $@) pkg=$@ xmlpackage=Types tcfg=$${RESPONSEFILE} && \
rm -f $${RESPONSEFILE})
......@@ -91,6 +92,7 @@ $(call filter_XcuFilterFiltersTarget_get_target,%) : $(filter_MERGE_TARGET)
echo "items=$(basename $(notdir $(filter %.xcu,$^)))" \
| sed "s/ /$(COMMA)/g" > $${RESPONSEFILE} && \
$(filter_MERGE) tempdir=$(TMPDIR) \
share_subdir_name=$(LIBO_SHARE_FOLDER) \
fragmentsdir=$(dir $(firstword $(filter %.xcu,$^))).. \
outdir=$(dir $@) pkg=$@ xmlpackage=Filter fcfg=$${RESPONSEFILE} && \
rm -f $${RESPONSEFILE})
......@@ -127,6 +129,7 @@ $(call filter_XcuFilterOthersTarget_get_target,%) : $(filter_MERGE_TARGET)
echo "items=$(strip $(foreach xcu,$(filter %.xcu,$^),$(if $(filter contenthandlers,$(notdir $(patsubst %/,%,$(dir $(xcu))))),$(basename $(notdir $(xcu),)))))" \
| sed "s/ /$(COMMA)/g" > $${RESPONSEFILE2} && \
$(filter_MERGE) tempdir=$(TMPDIR) \
share_subdir_name=$(LIBO_SHARE_FOLDER) \
fragmentsdir=$(dir $(firstword $(filter %.xcu,$^))).. \
outdir=$(dir $@) pkg=$@ xmlpackage=Misc \
lcfg=$${RESPONSEFILE} ccfg=$${RESPONSEFILE2} && \
......@@ -162,6 +165,7 @@ $(call filter_XcuFilterInternalTarget_get_target,%) : $(filter_MERGE_TARGET)
echo "items=$(basename $(notdir $(filter %.xcu,$^)))" \
| sed "s/ /$(COMMA)/g" > $${RESPONSEFILE} && \
$(filter_MERGE) tempdir=$(TMPDIR) \
share_subdir_name=$(LIBO_SHARE_FOLDER) \
fragmentsdir=$(dir $(firstword $(filter %.xcu,$^))).. \
outdir=$(dir $@) pkg=$@ xmlpackage=GraphicFilter \
fcfg=$${RESPONSEFILE} subdir_filters=internalgraphicfilters && \
......@@ -208,6 +212,7 @@ $(filter_XcuFilterUiTarget) : $(filter_MERGE_TARGET)
echo "items=$(basename $(notdir $(filter %.xcu,$^)))" \
| sed "s/ /$(COMMA)/g" > $${RESPONSEFILE} && \
$(filter_MERGE) tempdir=$(TMPDIR) \
share_subdir_name=$(LIBO_SHARE_FOLDER) \
fragmentsdir=$(dir $(firstword $(filter %.xcu,$^))).. \
pkg=$@ xmlpackage=Filter fcfg=$${RESPONSEFILE} languagepack=true \
&& rm -f $${RESPONSEFILE})
......
......@@ -40,6 +40,7 @@ PROP_LCFG = "lcfg" # // <= cmdline
PROP_CCFG = "ccfg" # // <= cmdline
PROP_LANGUAGEPACK = "languagepack" # // <= cmdline
PROP_VERBOSE = "verbose" # // <= cmdline
PROP_SHARE_SUBDIR_NAME = "share_subdir_name" # // <= cmdline
PROP_ITEMS = "items" # // <= pkg cfg files!
#---begin java.util.Properties copy---#
......@@ -378,7 +379,7 @@ class ConfigHelper:
sArg = lCommandLineArgs[arg][pos + 1:]
self.props[sArg] = 1
continue
raise Exception("Invalid command line detected. The argument \"" + \
lCommandLineArgs[arg] + "\" use an unsupported format.")
......@@ -555,6 +556,9 @@ class Merger:
def getFragments(self, aDir, sSetName, lFragments, nPrettyTabs):
sBuffer = ''
sExtXcu = self.m_aCfg.getValue(PROP_EXTENSION_XCU);
sShareSubdirName = self.m_aCfg.getValue(PROP_SHARE_SUBDIR_NAME)
if len(sShareSubdirName) < 1:
raise Exception("no share subdir set")
if len(lFragments) < 1:
return sBuffer
......@@ -572,7 +576,9 @@ class Merger:
# handle simple files only and check for existence!
raise Exception("fragment \"" + sFragPath + "\" does not exists.")
printOut("merge fragment \"" + sFragPath + "\" ...")
sBuffer = sBuffer + aFragmentFile.read()
data = aFragmentFile.read()
data = data.replace("$(share_subdir_name)", sShareSubdirName)
sBuffer = sBuffer + data
sBuffer = sBuffer + "\n"
nPrettyTabs = nPrettyTabs - 1
......
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