add GetCurrentDir function to get a SConscript directory.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1544 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
294e34e1e6
commit
42d3a22e90
|
@ -548,6 +548,13 @@ def DefineGroup(name, src, depend, **parameters):
|
|||
|
||||
return objs
|
||||
|
||||
def GetCurrentDir():
|
||||
conscript = File('SConscript')
|
||||
fn = conscript.rfile()
|
||||
name = fn.name
|
||||
path = os.path.dirname(fn.abspath)
|
||||
return path
|
||||
|
||||
def EndBuilding(target):
|
||||
import rtconfig
|
||||
Env.AddPostAction(target, rtconfig.POST_ACTION)
|
||||
|
|
Loading…
Reference in New Issue