diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-09-05 16:45:56 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-09-05 18:17:00 +0200 |
commit | 267ddb1c291f391694f567874c9fe68fb0492931 (patch) | |
tree | 35521d160edb02eb976d494f9228c83d150fa573 | |
parent | 791a8b96f754798192875da287c84f8cfa4e533e (diff) |
fdo#68552: try different build-time replacement
Replace the offending variable at build time in pyAltFCFGMerge.
Change-Id: Ie96d780eed8325c6f8399e78025345c0f0369856
-rw-r--r-- | filter/Configuration_filter.mk | 5 | ||||
-rwxr-xr-x | filter/source/config/tools/merge/pyAltFCFGMerge | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk index 3f88b0ea82d5..b671626228fc 100644 --- a/filter/Configuration_filter.mk +++ b/filter/Configuration_filter.mk @@ -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}) diff --git a/filter/source/config/tools/merge/pyAltFCFGMerge b/filter/source/config/tools/merge/pyAltFCFGMerge index ca0e06457691..e6e982564c71 100755 --- a/filter/source/config/tools/merge/pyAltFCFGMerge +++ b/filter/source/config/tools/merge/pyAltFCFGMerge @@ -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 |