Changes in tools/jobfile.py [7f881cd8:28f4adb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/jobfile.py
r7f881cd8 r28f4adb 38 38 def usage(prname): 39 39 "Print usage syntax" 40 print(prname + " <JOBFILE> < CC> <INPUT> -o <OUTPUT> [CC_ARGUMENTS ...]")40 print(prname + " <JOBFILE> <SOURCE> <TARGET> <TOOL> <CATEGORY> [OPTIONS ...]") 41 41 42 42 def main(): … … 46 46 47 47 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() 53 53 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"67 54 68 55 jobfile = open(jobfname, "a") … … 71 58 fcntl.lockf(jobfile, fcntl.LOCK_UN) 72 59 jobfile.close() 73 74 # Run the compiler proper.75 os.execvp(ccname, sys.argv[2:])76 60 77 61 if __name__ == '__main__':
Note:
See TracChangeset
for help on using the changeset viewer.