From 52fdfa1bf8b0527fbb52b92a41864a379e28e26b Mon Sep 17 00:00:00 2001 From: wuyangyong Date: Sun, 9 Sep 2012 04:10:14 +0000 Subject: [PATCH] add GetConfigValue() by Grissiom. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2284 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- tools/building.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/building.py b/tools/building.py index f59d856bd4..247cf0c9ff 100644 --- a/tools/building.py +++ b/tools/building.py @@ -136,6 +136,13 @@ def PrepareModuleBuilding(env, root_directory): # add program path env.PrependENVPath('PATH', rtconfig.EXEC_PATH) +def GetConfigValue(name): + assert type(name) == str, 'GetConfigValue: only string parameter is valid' + try: + return BuildOptions[name] + except: + return '' + def GetDepend(depend): building = True if type(depend) == type('str'):