From fe69ec624898b2824e137a928092089f32ccd164 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sun, 14 Jul 2019 13:23:14 +0000 Subject: [PATCH] run.mk: Remove all core files before run Fix: Make sure that all core files are removed before the run target's command is executed. Signed-off-by: Jan Lindemann --- make/run.mk | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/make/run.mk b/make/run.mk index bff65d66..abf239b7 100644 --- a/make/run.mk +++ b/make/run.mk @@ -64,10 +64,11 @@ endif all: install: -clean: +clean: runclean localclean distclean: run-prereq: all + $(RM) -f core core.* vgcore vgcore.* ifeq ($(TARGET),mingw) run test: run-prereq @@ -82,14 +83,12 @@ start: run-prereq else run test: run-prereq - $(RM) -f core.* $(EXE_PATH) $(EXE_ARGS) start: run-prereq - $(RM) -f core.* $(EXE_PATH) $(EXE_ARGS) & which: - /usr/bin/which $(EXE_PATH) + $(WHICH) $(EXE_PATH) $(SHORTCUT_SCRIPT): ifeq ($(TARGET),mingw) @@ -105,9 +104,7 @@ distclean.shortcut: $(RM) -f $(SHORTCUT_SCRIPT) distclean: distclean.shortcut -clean: vg-clean-supp clean.out - -# unfortunately iwatch only supports one directory :-( +# unfortunately iwatch supports only one directory :-( autorun: make run & iwatch -e close_write -c "$(HOME)/bin/run-once.sh make restart" \ @@ -119,15 +116,12 @@ wait-stop: restart: stop wait-stop all start valgrind: run-prereq - $(RM) -f core.* valgrind $(VALGRIND_OPTS) $(EXE_PATH) $(EXE_ARGS) valkyrie: run-prereq - $(RM) -f core.* valkyrie $(VALGRIND_OPTS) $(EXE_PATH) $(EXE_ARGS) efence: run-prereq - $(RM) -f core.* ef $(EXE_PATH) $(EXE_ARGS) supp.tmp: @@ -136,13 +130,13 @@ supp.tmp: vg-create-supp: supp.tmp $(CAT) $< | $(JWB_SCRIPT_DIR)/parse-valgrind-suppressions.sh > local.supp $(RM) -f supp.tmp - vg-add-supp: $(CAT) | $(JWB_SCRIPT_DIR)/parse-valgrind-suppressions.sh >> local.supp - +clean: vg-clean-supp vg-clean-supp: $(RM) -f local.supp +clean: clean.out clean.out: $(RM) -f run.out @@ -152,7 +146,6 @@ snap: check-conf: $(CHECK_CONF_EXE) -p --log-flags console \ $(shell echo $(EXE_ARGS) | sed 's/.*--config-file *//; s/ .*//') - endif stop: @@ -167,10 +160,7 @@ strace: $(EXE_PATH) $(EXE_BIN) run-prereq strace -f $(STRACE_EXTRA_OPTS) $(EXE_PATH) $(EXE_ARGS) tee: $(EXE_PATH) $(EXE_BIN) run-prereq - $(RM) -f core.* $(EXE_PATH) $(EXE_ARGS) 2>&1 | tee run.out kcg: kcachegrind callgrind.* - -clean: runclean localclean