diff --git a/Scripts/extras/lab5.mk b/Scripts/extras/lab5.mk index 38dba5e..fdd5451 100644 --- a/Scripts/extras/lab5.mk +++ b/Scripts/extras/lab5.mk @@ -51,7 +51,7 @@ gdb: grade: $(Q)(test -f ${LABDIR}/.config && cp ${LABDIR}/.config ${LABDIR}/.config.bak) || : - $(Q)$(DOCKER_RUN) $(GRADER) -t $(TIMEOUT) -f $(LABDIR)/scores.json $(GRADER_V) -s $(SERIAL) make SERIAL=$(SERIAL) qemu-grade + $(Q)$(DOCKER_RUN) $(GRADER) -t $(TIMEOUT) $(Q)(test -f ${LABDIR}/.config.bak && cp ${LABDIR}/.config.bak ${LABDIR}/.config && rm .config.bak) || : .PHONY: qemu qemu-gdb gdb defconfig build clean distclean grade all diff --git a/Scripts/kernel.mk b/Scripts/kernel.mk index 814f3fc..9732e9b 100644 --- a/Scripts/kernel.mk +++ b/Scripts/kernel.mk @@ -54,8 +54,10 @@ gdb: $(Q)$(GDB) --nx -x $(SCRIPTS)/gdb/gdbinit grade: + $(Q)$(MAKE) distclean &> /dev/null $(Q)(test -f ${LABDIR}/.config && cp ${LABDIR}/.config ${LABDIR}/.config.bak) || : - $(Q)$(DOCKER_RUN) $(GRADER) -t $(TIMEOUT) + $(Q)$(MAKE) build + $(Q)$(DOCKER_RUN) $(GRADER) -t $(TIMEOUT) -f $(LABDIR)/scores.json $(GRADER_V) -s $(SERIAL) make SERIAL=$(SERIAL) qemu-grade $(Q)(test -f ${LABDIR}/.config.bak && cp ${LABDIR}/.config.bak ${LABDIR}/.config && rm .config.bak) || : .PHONY: qemu qemu-gdb gdb defconfig build clean distclean grade all