--- a/sbsv2/raptor/lib/flm/build.flm Fri Nov 20 20:10:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/build.flm Fri Nov 20 21:17:53 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 <debug>build.flm: configlist: $(config_list)</debug>)
+
+$(if $(FLMDEBUG),$(info <debug>build.flm: configlist: $(config_list)</debug>))
-$(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 <debug>build.flm: Exports off </debug>)))
# Create the Makefiles
$(eval $(call generate_makefiles))
--- a/sbsv2/raptor/lib/flm/build.xml Fri Nov 20 20:10:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/build.xml Fri Nov 20 21:17:53 2009 +0000
@@ -9,6 +9,7 @@
<param name='CONFIGS' default=''/>
<param name='CLI_OPTIONS' default=''/>
<param name='NO_BUILD' default='' />
+ <param name='DOEXPORT' default='1' />
</interface>
</build>
--- a/sbsv2/raptor/python/raptor.py Fri Nov 20 20:10:58 2009 +0000
+++ b/sbsv2/raptor/python/raptor.py Fri Nov 20 21:17:53 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:
--- a/sbsv2/raptor/python/raptor_cli.py Fri Nov 20 20:10:58 2009 +0000
+++ b/sbsv2/raptor/python/raptor_cli.py Fri Nov 20 21:17:53 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,
--- a/sbsv2/raptor/python/raptor_meta.py Fri Nov 20 20:10:58 2009 +0000
+++ b/sbsv2/raptor/python/raptor_meta.py Fri Nov 20 21:17:53 2009 +0000
@@ -2513,7 +2513,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
@@ -2593,20 +2593,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[]