def EndBuilding(target, program=None): import rtconfig need_exit = False Env['target'] = program Env['project'] = Projects Env.AddPostAction(target, rtconfig.POST_ACTION) # Add addition clean files Clean(target, 'cconfig.h') Clean(target, 'rtua.py') Clean(target, 'rtua.pyc') if GetOption('target'): GenTargetProject(program) BSP_ROOT = Dir('#').abspath if GetOption('copy') and program != None: from mkdist import MakeCopy MakeCopy(program, BSP_ROOT, Rtt_Root, Env) need_exit = True if GetOption('copy-header') and program != None: from mkdist import MakeCopyHeader MakeCopyHeader(program, BSP_ROOT, Rtt_Root, Env) need_exit = True if GetOption('make-dist') and program != None: from mkdist import MkDist MkDist(program, BSP_ROOT, Rtt_Root, Env) need_exit = True if GetOption('cscope'): from cscope import CscopeDatabase CscopeDatabase(Projects) if not GetOption('help') and not GetOption('target'): if not os.path.exists(rtconfig.EXEC_PATH): print "Error: the toolchain path (%s) is not exist, please check 'EXEC_PATH' in path or rtconfig.py." % rtconfig.EXEC_PATH need_exit = True if need_exit: exit(0)
def EndBuilding(target, program=None): import rtconfig Env.AddPostAction(target, rtconfig.POST_ACTION) if GetOption('target') == 'mdk': from keil import MDKProject from keil import MDK4Project from keil import MDK5Project template = os.path.isfile('template.Uv2') if template: MDKProject('project.Uv2', Projects) else: template = os.path.isfile('template.uvproj') if template: MDK4Project('project.uvproj', Projects) else: template = os.path.isfile('template.uvprojx') if template: MDK5Project('project.uvprojx', Projects) else: print 'No template project file found.' if GetOption('target') == 'mdk4': from keil import MDK4Project MDK4Project('project.uvproj', Projects) if GetOption('target') == 'mdk5': from keil import MDK5Project MDK5Project('project.uvprojx', Projects) if GetOption('target') == 'iar': from iar import IARProject IARProject('project.ewp', Projects) if GetOption('target') == 'vs': from vs import VSProject VSProject('project.vcproj', Projects, program) if GetOption('target') == 'vs2012': from vs2012 import VS2012Project VS2012Project('project.vcxproj', Projects, program) if GetOption('target') == 'cb': from codeblocks import CBProject CBProject('project.cbp', Projects, program) if GetOption('target') == 'ua': from ua import PrepareUA PrepareUA(Projects, Rtt_Root, str(Dir('#'))) BSP_ROOT = Dir('#').abspath if GetOption('copy') and program != None: from mkdist import MakeCopy MakeCopy(program, BSP_ROOT, Rtt_Root, Env) exit(0) if GetOption('copy-header') and program != None: from mkdist import MakeCopyHeader MakeCopyHeader(program, BSP_ROOT, Rtt_Root, Env) exit(0) if GetOption('make-dist') and program != None: from mkdist import MkDist MkDist(program, BSP_ROOT, Rtt_Root, Env) exit(0) if GetOption('cscope'): from cscope import CscopeDatabase CscopeDatabase(Projects)
def EndBuilding(target, program=None): import rtconfig Env['target'] = program Env['project'] = Projects Env.AddPostAction(target, rtconfig.POST_ACTION) # Add addition clean files Clean(target, 'cconfig.h') Clean(target, 'rtua.py') Clean(target, 'rtua.pyc') if GetOption('target') == 'mdk': from keil import MDKProject from keil import MDK4Project from keil import MDK5Project template = os.path.isfile('template.Uv2') if template: MDKProject('project.Uv2', Projects) else: template = os.path.isfile('template.uvproj') if template: MDK4Project('project.uvproj', Projects) else: template = os.path.isfile('template.uvprojx') if template: MDK5Project('project.uvprojx', Projects) else: print 'No template project file found.' if GetOption('target') == 'mdk4': from keil import MDK4Project MDK4Project('project.uvproj', Projects) if GetOption('target') == 'mdk5': from keil import MDK5Project MDK5Project('project.uvprojx', Projects) if GetOption('target') == 'iar': from iar import IARProject IARProject('project.ewp', Projects) if GetOption('target') == 'vs': from vs import VSProject VSProject('project.vcproj', Projects, program) if GetOption('target') == 'vs2012': from vs2012 import VS2012Project VS2012Project('project.vcxproj', Projects, program) if GetOption('target') == 'cb': from codeblocks import CBProject CBProject('project.cbp', Projects, program) if GetOption('target') == 'ua': from ua import PrepareUA PrepareUA(Projects, Rtt_Root, str(Dir('#'))) if GetOption('target') == 'vsc': from vsc import GenerateVSCode GenerateVSCode(Env) if GetOption('target') == 'cdk': from cdk import CDKProject CDKProject('project.cdkproj', Projects) BSP_ROOT = Dir('#').abspath if GetOption('copy') and program != None: from mkdist import MakeCopy MakeCopy(program, BSP_ROOT, Rtt_Root, Env) exit(0) if GetOption('copy-header') and program != None: from mkdist import MakeCopyHeader MakeCopyHeader(program, BSP_ROOT, Rtt_Root, Env) exit(0) if GetOption('make-dist') and program != None: from mkdist import MkDist MkDist(program, BSP_ROOT, Rtt_Root, Env) exit(0) if GetOption('cscope'): from cscope import CscopeDatabase CscopeDatabase(Projects) if not GetOption('help') and not GetOption('target'): if not os.path.exists(rtconfig.EXEC_PATH): print "Error: Toolchain path (%s) is not exist, please check 'EXEC_PATH' in path or rtconfig.py." % rtconfig.EXEC_PATH sys.exit(1)