提交 42d3a22e 编写于 作者: B bernard.xiong

add GetCurrentDir function to get a SConscript directory.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1544 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 294e34e1
...@@ -548,6 +548,13 @@ def DefineGroup(name, src, depend, **parameters): ...@@ -548,6 +548,13 @@ def DefineGroup(name, src, depend, **parameters):
return objs return objs
def GetCurrentDir():
conscript = File('SConscript')
fn = conscript.rfile()
name = fn.name
path = os.path.dirname(fn.abspath)
return path
def EndBuilding(target): def EndBuilding(target):
import rtconfig import rtconfig
Env.AddPostAction(target, rtconfig.POST_ACTION) Env.AddPostAction(target, rtconfig.POST_ACTION)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册