# HG changeset patch
# User tnmurphy@4GBL06592.nokia.com
# Date 1258656739 0
# Node ID ea23b18a2ff6dcf7543febac08fa6f256915f216
# Parent 34d87ffcc373cdd8976854ad2209ef218936c327
Initial implementation of noexport
diff -r 34d87ffcc373 -r ea23b18a2ff6 sbsv2/raptor/lib/flm/build.flm
--- a/sbsv2/raptor/lib/flm/build.flm Wed Nov 18 21:50:36 2009 +0000
+++ b/sbsv2/raptor/lib/flm/build.flm Thu Nov 19 18:52:19 2009 +0000
@@ -34,7 +34,7 @@
define doexports
PP_EXPORTS::
$(call startrule,makefile_generation_exports) \
- $(SBS) --pp=slave --toolcheck=off --export-only $(component_list) $(config_list) -f- -m $(MAKEFILE_PATH).exports $(CLI_OPTIONS) \
+ $(SBS) --toolcheck=off --export-only $(component_list) $(config_list) -f- -m $(MAKEFILE_PATH).exports $(CLI_OPTIONS) \
$(call endrule,makefile_generation_exports)
CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH).exports
@@ -46,9 +46,9 @@
ALL:: $(MAKEFILE_PATH)
-$(MAKEFILE_PATH): $(COMPONENT_PATHS) | PP_EXPORTS
+$(MAKEFILE_PATH): $(COMPONENT_PATHS) $(if $(DOEXPORT),| PP_EXPORTS )
$(call startrule,makefile_generation) \
- $(SBS) --pp=slave --toolcheck=off -n $(CLI_OPTIONS) $(component_list) $(config_list) -m $$@ -f- \
+ $(SBS) --noexport --toolcheck=off -n $(CLI_OPTIONS) $(component_list) $(config_list) -m $$@ -f- \
$(call endrule,makefile_generation)
CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH)
@@ -58,9 +58,13 @@
# Create config list for commands
config_list:=$(addprefix -c ,$(CONFIGS))
component_list:=$(addprefix -b ,$(COMPONENT_PATHS))
-$(info build.flm: configlist: $(config_list))
+
+$(if $(FLMDEBUG),$(info build.flm: configlist: $(config_list)))
-$(eval $(doexports))
+# Do exports only if asked. This doesn't work brilliantly in emake
+# since exports are often duplicated in some components - leads to conflicts
+# and rebuilds. Better to export before trying to do parallel parsing at all.
+$(if $(DOEXPORT),$(eval $(doexports)),$(if $(FLMDEBUG),$(info build.flm: Exports off )))
# Create the Makefiles
$(eval $(call generate_makefiles))
diff -r 34d87ffcc373 -r ea23b18a2ff6 sbsv2/raptor/lib/flm/build.xml
--- a/sbsv2/raptor/lib/flm/build.xml Wed Nov 18 21:50:36 2009 +0000
+++ b/sbsv2/raptor/lib/flm/build.xml Thu Nov 19 18:52:19 2009 +0000
@@ -9,6 +9,7 @@
+
diff -r 34d87ffcc373 -r ea23b18a2ff6 sbsv2/raptor/python/raptor.py
--- a/sbsv2/raptor/python/raptor.py Wed Nov 18 21:50:36 2009 +0000
+++ b/sbsv2/raptor/python/raptor.py Thu Nov 19 18:52:19 2009 +0000
@@ -274,7 +274,7 @@
# convert the list of bld.inf files into a specification
# hierarchy suitable for all the configurations we are using.
self.specs = list(build.generic_specs)
- self.specs.extend(metaReader.ReadBldInfFiles(self.children, build.doExportOnly))
+ self.specs.extend(metaReader.ReadBldInfFiles(self.children, doexport = build.doExport, dobuild = not build.doExportOnly))
except raptor_meta.MetaDataError, e:
build.Error(e.Text)
@@ -355,6 +355,14 @@
var.AddOperation(raptor_data.Set("MAKEFILE_PATH", makefile_path))
var.AddOperation(raptor_data.Set("CONFIGS", configList))
var.AddOperation(raptor_data.Set("CLI_OPTIONS", cli_options))
+
+
+ # Allow the flm to skip exports. Note: this parameter
+ doexport_str = '1'
+ if not build.doExport:
+ doexport_str = ''
+ var.AddOperation(raptor_data.Set("DOEXPORT", doexport_str ))
+
# Pass on '-n' (if specified) to the makefile-generating sbs calls
if build.noBuild:
var.AddOperation(raptor_data.Set("NO_BUILD", "1"))
@@ -467,6 +475,7 @@
self.maker = None
self.debugOutput = False
self.doExportOnly = False
+ self.doExport = True
self.noBuild = False
self.noDependInclude = False
self.projects = set()
@@ -568,6 +577,10 @@
self.doExportOnly = TrueOrFalse
return True
+ def SetNoExport(self, TrueOrFalse):
+ self.doExport = TrueOrFalse
+ return True
+
def SetNoBuild(self, TrueOrFalse):
self.noBuild = TrueOrFalse
return True
@@ -634,8 +647,6 @@
type = type.lower()
if type == "on":
self.doParallelParsing = True
- elif type == "slave":
- self.isParallelParsingSlave = True
elif type == "off":
self.doParallelParsing = False
else:
diff -r 34d87ffcc373 -r ea23b18a2ff6 sbsv2/raptor/python/raptor_cli.py
--- a/sbsv2/raptor/python/raptor_cli.py Wed Nov 18 21:50:36 2009 +0000
+++ b/sbsv2/raptor/python/raptor_cli.py Thu Nov 19 18:52:19 2009 +0000
@@ -87,6 +87,9 @@
parser.add_option("--export-only",action="store_true",dest="doExportOnly",
help="Generate exports only and do not create any make files.")
+parser.add_option("--noexport",action="store_false",dest="doExport",
+ help="Don't export any files - useful in some builds when you know exports have already been done.")
+
parser.add_option("-f","--logfile",action="store",dest="logfile",
help="Name of the log file, or '-' for stdout.")
@@ -148,7 +151,6 @@
help="""Controls how metadata (e.g. bld.infs) are parsed in Parallel.
Possible values are:
"on" - Parse bld.infs in parallel (should be faster on clusters/multicore machines)
- "slave" - used internally by Raptor
"off" - Parse bld.infs serially
""")
@@ -261,6 +263,7 @@
'quiet' : Raptor.RunQuietly,
'debugoutput' : Raptor.SetDebugOutput,
'doExportOnly' : Raptor.SetExportOnly,
+ 'doExport' : Raptor.SetNoExport,
'keepgoing': Raptor.SetKeepGoing,
'nobuild' : Raptor.SetNoBuild,
'make_engine': Raptor.SetMakeEngine,
diff -r 34d87ffcc373 -r ea23b18a2ff6 sbsv2/raptor/python/raptor_meta.py
--- a/sbsv2/raptor/python/raptor_meta.py Wed Nov 18 21:50:36 2009 +0000
+++ b/sbsv2/raptor/python/raptor_meta.py Thu Nov 19 18:52:19 2009 +0000
@@ -2502,7 +2502,7 @@
self.defaultPlatform = self.ExportPlatforms[0]
- def ReadBldInfFiles(self, aComponentList, doExportOnly):
+ def ReadBldInfFiles(self, aComponentList, doexport, dobuild = True):
"""Take a list of bld.inf files and return a list of build specs.
The returned specification nodes will be suitable for all the build
@@ -2582,20 +2582,21 @@
# before we can do anything else (because raptor itself must do
# some exports before the MMP files that include them can be
# processed).
- for i,p in enumerate(exportNodes):
- exportPlatform = self.ExportPlatforms[i]
- for s in p.GetChildSpecs():
- try:
- self.ProcessExports(s, exportPlatform)
-
- except MetaDataError, e:
- self.__Raptor.Error("%s",e.Text)
- if not self.__Raptor.keepGoing:
- return []
+ if doexport:
+ for i,p in enumerate(exportNodes):
+ exportPlatform = self.ExportPlatforms[i]
+ for s in p.GetChildSpecs():
+ try:
+ self.ProcessExports(s, exportPlatform)
+
+ except MetaDataError, e:
+ self.__Raptor.Error("%s",e.Text)
+ if not self.__Raptor.keepGoing:
+ return []
# this is a switch to return the function at this point if export
# only option is specified in the run
- if (self.__Raptor.doExportOnly):
+ if dobuild is not True:
self.__Raptor.Info("Processing Exports only")
return[]