From 09602fd9d856fe19fc7cff85ead0b5a3846b136c Mon Sep 17 00:00:00 2001 From: bernard Date: Sun, 4 Jan 2015 12:26:01 +0800 Subject: [PATCH] If there is no CPPDEFINES, generate an empty GetCPPDEFINES function. --- tools/ua.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/ua.py b/tools/ua.py index ac3ea9061..19384c5eb 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')