Changeset 310 for tbroadcast


Ignore:
Timestamp:
Nov 12, 2006, 12:03:28 PM (18 years ago)
Author:
garonne
Message:

add default command for make generation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tbroadcast/v2.0.3/python/tbroadcast.py

    r307 r310  
    495495    def generate_make (self, file, command):
    496496        makefile = open (file, 'w+')
     497        self.counter = len(self.packages)
    497498        self.recursive_make (self.current_package, command, makefile, len(self.packages))
    498499        makefile.close ()
     
    506507                actions.append(pkg)
    507508                indice = indice - 1
     509                self.counter = self.counter - 1
    508510                self.recursive_make(pkg, command,makefile, indice, actions)       
    509511       
     
    515517
    516518        # add the action itself
    517         newcommand = string.replace (command, '<package>', package)
     519        newcommand = string.replace (command, '<package>', package)       
     520        if command =='':
     521            newcommand='$(COMMAND)'
    518522        lines = lines + '\n'
    519523        lines = lines +  '\t@echo "#--------------------------------------------------------------"\n'
    520         lines = lines +  '\t@echo "# ('+str(indice)+'/'+str(len(self.packages))+') Now trying ['+newcommand+'] in '+ self.packages[package]['path']+'"\n'
     524        lines = lines +  '\t@echo "# ('+str(self.counter)+'/'+str(len(self.packages))+') Now trying ['+newcommand+'] in '+ self.packages[package]['path']+'"\n'
    521525        lines = lines +  '\t@echo "#--------------------------------------------------------------"\n'
    522526        lines = lines + '\t@cd ' + self.packages[package]['path']           
Note: See TracChangeset for help on using the changeset viewer.