Don't allow Source to accept multiple arguments, lists,
or automatically do Split(). It isn't used anywhere, and isn't very consistent with the python features that are about to be added. Do accept SCons.Node.FS.File arguments though. --HG-- extra : convert_revision : 0f3bb0e9e6806490330eea59a104013042b4dd49
This commit is contained in:
parent
e04208f046
commit
eefbda7f7c
1 changed files with 7 additions and 9 deletions
|
@ -33,21 +33,19 @@ import sys
|
|||
|
||||
from os.path import join as joinpath
|
||||
|
||||
import SCons
|
||||
|
||||
# This file defines how to build a particular configuration of M5
|
||||
# based on variable settings in the 'env' build environment.
|
||||
|
||||
Import('*')
|
||||
|
||||
sources = []
|
||||
def Source(*args):
|
||||
for arg in args:
|
||||
if isinstance(arg, (list, tuple)):
|
||||
# Recurse to load a list
|
||||
Source(*arg)
|
||||
elif isinstance(arg, str):
|
||||
sources.extend([ File(f) for f in Split(arg) ])
|
||||
def Source(source):
|
||||
if isinstance(source, SCons.Node.FS.File):
|
||||
sources.append(source)
|
||||
else:
|
||||
sources.append(File(arg))
|
||||
sources.append(File(source))
|
||||
|
||||
Export('env')
|
||||
Export('Source')
|
||||
|
|
Loading…
Reference in a new issue