summaryrefslogtreecommitdiff
path: root/tools/ua.py
diff options
context:
space:
mode:
authorbernard <[email protected]>2015-01-04 12:26:01 +0800
committerbernard <[email protected]>2015-01-04 12:26:01 +0800
commit09602fd9d856fe19fc7cff85ead0b5a3846b136c (patch)
tree003392150fc3dcec905c62fcc6576c1f85714c3e /tools/ua.py
parenta6251a439e7385f531cf0567082f3a778f2f43e9 (diff)
If there is no CPPDEFINES, generate an empty GetCPPDEFINES function.
Diffstat (limited to 'tools/ua.py')
-rw-r--r--tools/ua.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/ua.py b/tools/ua.py
index ac3ea9061c..19384c5eba 100644
--- a/tools/ua.py
+++ b/tools/ua.py
@@ -59,6 +59,10 @@ def PrepareUA(project, RTT_ROOT, BSP_ROOT):
ua.write('\t\t%s\n' % path)
ua.write('\t]\n\n')
ua.write('\treturn CPPPATH\n\n')
+ else:
+ ua.write('def GetCPPPATH(BSP_ROOT, RTT_ROOT):\n')
+ ua.write('\tCPPPATH=[]\n\n')
+ ua.write('\treturn CPPPATH\n\n')
if len(CPPDEFINES):
CPPDEFINES = [i for i in set(CPPDEFINES)]
@@ -66,5 +70,8 @@ def PrepareUA(project, RTT_ROOT, BSP_ROOT):
ua.write('def GetCPPDEFINES():\n')
ua.write('\tCPPDEFINES=%s\n' % str(CPPDEFINES))
ua.write('\treturn CPPDEFINES\n\n')
-
- print CPPDEFINES
+
+ else:
+ ua.write('def GetCPPDEFINES():\n')
+ ua.write('\tCPPDEFINES=""\n\n')
+ ua.write('\treturn CPPDEFINES\n\n')