Don't eat errors in debug Makefile.
[riscv-tests.git] / debug / Makefile
index 5726883502ef4bfc4743fc25f41d5d0a3dae4191..a5ea832645719116a01f659147fdae417795aeef 100644 (file)
@@ -9,15 +9,16 @@ default: spike$(XLEN).log
 all:   pylint spike32.log spike64.log
 
 pylint:
-       pylint --rcfile=pylint.rc *.py
+       pylint --rcfile=pylint.rc `git ls-files '*.py'`
 
 %.log:
+       set -o pipefail; \
        $(GDBSERVER_PY) \
                --isolate \
-               --$(subst .log,,$@) \
+               $(src_dir)/targets/RISC-V/$(subst .log,.py,$@) \
                --sim_cmd $(RISCV)/bin/$(RISCV_SIM) \
                --server_cmd $(RISCV)/bin/openocd \
-           > $@ 2>&1 || (sed s/^/$@:\ / $@ && false)
+           | tee $@ 2>&1 || (sed s/^/$@:\ / $@ && false)
 
 clean:
-       rm -f *.log *.pyc
+       rm -f spike32.log spike64.log *.pyc