Example #1
0
def remake(non_empty_job_list):  
    '''Remake the selected targets (equivalent to clean and make). '''
    
    non_empty_job_list = list(non_empty_job_list) 
        
    
    from compmake.ui.console import ask_question
    if get_compmake_status() == compmake_status_interactive: 
        question = "Should I clean and remake %d jobs? [y/n] " % \
            len(non_empty_job_list)
        answer = ask_question(question)
        if not answer:
            info('Not cleaned.')
            return
        
    for job in non_empty_job_list:
        mark_remake(job)
    
    manager = ManagerLocal()
    manager.add_targets(non_empty_job_list)
    manager.process()
    
    if manager.failed:
        return RET_CODE_JOB_FAILED
    else:
        return 0
Example #2
0
def make(job_list):
    '''Makes selected targets; or all targets if none specified. ''' 
    job_list = list(job_list)
    
    if not job_list:
        job_list = list(top_targets())
    
    #print "Making %d jobs" % len(job_list)
    
    manager = ManagerLocal()
    manager.add_targets(job_list)
    manager.process()

    if manager.failed:
        return RET_CODE_JOB_FAILED
    else:
        return 0
Example #3
0
def more(non_empty_job_list, loop=1):
    '''Makes more of the selected targets. '''
    
    non_empty_job_list = list(non_empty_job_list)
    
    
    for x in range(int(loop)):
        if loop > 1:
            info("------- more: iteration %d --- " % x) 

        for job in non_empty_job_list:
            mark_more(job)
            
        manager = ManagerLocal()
        manager.add_targets(non_empty_job_list, more=True)
        manager.process()
        
        if manager.failed:
            return RET_CODE_JOB_FAILED

    return 0