Changeset 3b3e776 in mainline for tools/jobfile.py
- Timestamp:
- 2010-02-05T10:57:50Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0358da0
- Parents:
- 3f085132 (diff), b4cbef1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
tools/jobfile.py
-
Property mode
changed from
100644
to100755
r3f085132 r3b3e776 1 #!/usr/bin/env python 1 2 # 2 # Copyright (c) 2005 Martin Decky 3 # Copyright (c) 2007 Jakub Jermar 3 # Copyright (c) 2009 Martin Decky 4 4 # All rights reserved. 5 5 # … … 27 27 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 # 29 """ 30 Add a source/object file pair to a checker jobfile 31 """ 29 32 30 ## Setup toolchain 31 # 33 import sys 34 import os 35 import fcntl 32 36 33 include Makefile.common 34 include $(LIBC_PREFIX)/Makefile.toolchain 37 def usage(prname): 38 "Print usage syntax" 39 print prname + " <JOBFILE> <SOURCE> <TARGET> <TOOL> <CATEGORY> [OPTIONS ...]" 35 40 36 ## Sources 37 # 41 def main(): 42 if (len(sys.argv) < 6): 43 usage(sys.argv[0]) 44 return 45 46 jobfname = sys.argv[1] 47 srcfname = sys.argv[2] 48 tgtfname = sys.argv[3] 49 toolname = sys.argv[4] 50 category = sys.argv[5] 51 cwd = os.getcwd() 52 options = " ".join(sys.argv[6:]) 53 54 jobfile = file(jobfname, "a") 55 fcntl.lockf(jobfile, fcntl.LOCK_EX) 56 jobfile.write("{%s},{%s},{%s},{%s},{%s},{%s}\n" % (srcfname, tgtfname, toolname, category, cwd, options)) 57 fcntl.lockf(jobfile, fcntl.LOCK_UN) 58 jobfile.close() 38 59 39 SOURCES = \ 40 edit.c \ 41 sheet.c 42 43 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 44 45 .PHONY: all 46 47 all: $(OUTPUT) $(OUTPUT).disasm 48 49 -include $(DEPEND) 50 51 $(OUTPUT).disasm: $(OUTPUT) 52 $(OBJDUMP) -d $< > $@ 53 54 $(OUTPUT): $(OBJECTS) $(LIBS) 55 $(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map 56 57 %.o: %.c $(DEPEND) 58 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ 59 60 $(DEPEND): 61 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null 62 -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@ 60 if __name__ == '__main__': 61 main() -
Property mode
changed from
Note:
See TracChangeset
for help on using the changeset viewer.