Changes in tools/jobfile.py [7f881cd8:28f4adb] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/jobfile.py

    r7f881cd8 r28f4adb  
    3838def usage(prname):
    3939        "Print usage syntax"
    40         print(prname + " <JOBFILE> <CC> <INPUT> -o <OUTPUT> [CC_ARGUMENTS ...]")
     40        print(prname + " <JOBFILE> <SOURCE> <TARGET> <TOOL> <CATEGORY> [OPTIONS ...]")
    4141
    4242def main():
     
    4646       
    4747        jobfname = sys.argv[1]
    48         ccname = sys.argv[2]
    49         srcfname = sys.argv[3]
    50         assert(not srcfname.startswith("-"))
    51         assert(sys.argv[4] == "-o")
    52         tgtfname = sys.argv[5]
     48        srcfname = sys.argv[2]
     49        tgtfname = sys.argv[3]
     50        toolname = sys.argv[4]
     51        category = sys.argv[5]
     52        cwd = os.getcwd()
    5353        options = " ".join(sys.argv[6:])
    54         cwd = os.getcwd()
    55        
    56         if srcfname.endswith(".c"):
    57                 toolname = "cc"
    58                 category = "core"
    59        
    60         if srcfname.endswith(".s"):
    61                 toolname = "as"
    62                 category = "asm"
    63        
    64         if srcfname.endswith(".S"):
    65                 toolname = "as"
    66                 category = "asm/preproc"
    6754       
    6855        jobfile = open(jobfname, "a")
     
    7158        fcntl.lockf(jobfile, fcntl.LOCK_UN)
    7259        jobfile.close()
    73        
    74         # Run the compiler proper.
    75         os.execvp(ccname, sys.argv[2:])
    7660
    7761if __name__ == '__main__':
Note: See TracChangeset for help on using the changeset viewer.