diff options
author | Steven Knight <knight@baldmt.com> | 2003-04-18 03:39:08 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-04-18 03:39:08 (GMT) |
commit | e6b7921406394594c23f907469e923ccf028adcc (patch) | |
tree | ba5443defdb983af0347909b063e31a3670ee439 /src/engine | |
parent | 61441924d40157f2744aa74049db3b1c1f73e6c9 (diff) | |
download | SCons-e6b7921406394594c23f907469e923ccf028adcc.zip SCons-e6b7921406394594c23f907469e923ccf028adcc.tar.gz SCons-e6b7921406394594c23f907469e923ccf028adcc.tar.bz2 |
Add Alias() global function. (Anthony Roach)
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/SCons/Script/SConscript.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py index 7c20732..1c9d2b2 100644 --- a/src/engine/SCons/Script/SConscript.py +++ b/src/engine/SCons/Script/SConscript.py @@ -43,6 +43,7 @@ import SCons.Tool import SCons.Util import SCons.Options import SCons +import SCons.Node.Alias import os import os.path @@ -461,6 +462,13 @@ def AddPostAction(files, action): def Exit(value=0): sys.exit(value) + +def Alias(name): + alias = SCons.Node.Alias.default_ans.lookup(name) + if alias is None: + alias = SCons.Node.Alias.default_ans.Alias(name) + return alias + def BuildDefaultGlobals(): """ Create a dictionary containing all the default globals for @@ -519,4 +527,5 @@ def BuildDefaultGlobals(): globals['TargetSignatures'] = TargetSignatures globals['Tool'] = SCons.Tool.Tool globals['WhereIs'] = SCons.Util.WhereIs + globals['Alias'] = Alias return globals |