env.Command(hdr, [], switch_hdr_action)
isa_target = Dir('.').up().name.lower().replace('_', '-')
- env['PHONY_BASE'] = '#'+isa_target
all_isa_deps[isa_target] = None
Export('make_switching_dir')
#
###################################################
+def variant_name(path):
+ return os.path.basename(path).lower().replace('_', '-')
+main['variant_name'] = variant_name
+main['VARIANT_NAME'] = '${variant_name(BUILDDIR)}'
+
for variant_path in variant_paths:
if not GetOption('silent'):
print "Building in", variant_path
Builder(action=MakeAction(makeEnvirons,
Transform("ENVIRONS", 1)))})
-isa_target = env['PHONY_BASE'] + '-deps'
-environs = env['PHONY_BASE'] + '-environs'
-env.Depends('#all-deps', isa_target)
+isa_target = '#${VARIANT_NAME}-deps'
+environs = '#${VARIANT_NAME}-environs'
+env.Depends('#all-deps', isa_target)
env.Depends('#all-environs', environs)
env.ScanISA(isa_target, File('arch/%s/generated/inc.d' % env['TARGET_ISA']))
envSetup = env.MakeEnvirons(environs, isa_target)