SConstruct (10106:b7e7533097b9) SConstruct (10135:7bbd1a21e566)
1# -*- mode:python -*-
2
3# Copyright (c) 2013 ARM Limited
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

--- 1043 unchanged lines hidden (view full) ---

1052Export('all_protocols')
1053protocol_dirs = []
1054Export('protocol_dirs')
1055slicc_includes = []
1056Export('slicc_includes')
1057
1058# Walk the tree and execute all SConsopts scripts that wil add to the
1059# above variables
1# -*- mode:python -*-
2
3# Copyright (c) 2013 ARM Limited
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

--- 1043 unchanged lines hidden (view full) ---

1052Export('all_protocols')
1053protocol_dirs = []
1054Export('protocol_dirs')
1055slicc_includes = []
1056Export('slicc_includes')
1057
1058# Walk the tree and execute all SConsopts scripts that wil add to the
1059# above variables
1060if not GetOption('verbose'):
1060if GetOption('verbose'):
1061 print "Reading SConsopts"
1062for bdir in [ base_dir ] + extras_dir_list:
1063 if not isdir(bdir):
1064 print "Error: directory '%s' does not exist" % bdir
1065 Exit(1)
1066 for root, dirs, files in os.walk(bdir):
1067 if 'SConsopts' in files:
1068 if GetOption('verbose'):

--- 120 unchanged lines hidden (view full) ---

1189
1190###################################################
1191#
1192# Define build environments for selected configurations.
1193#
1194###################################################
1195
1196for variant_path in variant_paths:
1061 print "Reading SConsopts"
1062for bdir in [ base_dir ] + extras_dir_list:
1063 if not isdir(bdir):
1064 print "Error: directory '%s' does not exist" % bdir
1065 Exit(1)
1066 for root, dirs, files in os.walk(bdir):
1067 if 'SConsopts' in files:
1068 if GetOption('verbose'):

--- 120 unchanged lines hidden (view full) ---

1189
1190###################################################
1191#
1192# Define build environments for selected configurations.
1193#
1194###################################################
1195
1196for variant_path in variant_paths:
1197 print "Building in", variant_path
1197 if not GetOption('silent'):
1198 print "Building in", variant_path
1198
1199 # Make a copy of the build-root environment to use for this config.
1200 env = main.Clone()
1201 env['BUILDDIR'] = variant_path
1202
1203 # variant_dir is the tail component of build path, and is used to
1204 # determine the build parameters (e.g., 'ALPHA_SE')
1205 (build_root, variant_dir) = splitpath(variant_path)
1206
1207 # Set env variables according to the build directory config.
1208 sticky_vars.files = []
1209 # Variables for $BUILD_ROOT/$VARIANT_DIR are stored in
1210 # $BUILD_ROOT/variables/$VARIANT_DIR so you can nuke
1211 # $BUILD_ROOT/$VARIANT_DIR without losing your variables settings.
1212 current_vars_file = joinpath(build_root, 'variables', variant_dir)
1213 if isfile(current_vars_file):
1214 sticky_vars.files.append(current_vars_file)
1199
1200 # Make a copy of the build-root environment to use for this config.
1201 env = main.Clone()
1202 env['BUILDDIR'] = variant_path
1203
1204 # variant_dir is the tail component of build path, and is used to
1205 # determine the build parameters (e.g., 'ALPHA_SE')
1206 (build_root, variant_dir) = splitpath(variant_path)
1207
1208 # Set env variables according to the build directory config.
1209 sticky_vars.files = []
1210 # Variables for $BUILD_ROOT/$VARIANT_DIR are stored in
1211 # $BUILD_ROOT/variables/$VARIANT_DIR so you can nuke
1212 # $BUILD_ROOT/$VARIANT_DIR without losing your variables settings.
1213 current_vars_file = joinpath(build_root, 'variables', variant_dir)
1214 if isfile(current_vars_file):
1215 sticky_vars.files.append(current_vars_file)
1215 print "Using saved variables file %s" % current_vars_file
1216 if not GetOption('silent'):
1217 print "Using saved variables file %s" % current_vars_file
1216 else:
1217 # Build dir-specific variables file doesn't exist.
1218
1219 # Make sure the directory is there so we can create it later
1220 opt_dir = dirname(current_vars_file)
1221 if not isdir(opt_dir):
1222 mkdir(opt_dir)
1223

--- 93 unchanged lines hidden ---
1218 else:
1219 # Build dir-specific variables file doesn't exist.
1220
1221 # Make sure the directory is there so we can create it later
1222 opt_dir = dirname(current_vars_file)
1223 if not isdir(opt_dir):
1224 mkdir(opt_dir)
1225

--- 93 unchanged lines hidden ---