From 98851c0728d801ff9f710cd91dcff2b47d528059 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sat, 17 Oct 2020 17:57:17 -0700 Subject: [PATCH] move more of make clean out into the makefile, leaving the "make clean" target in builder so it works for sketches --- Makefile | 4 ++++ bin/kaleidoscope-builder | 13 +++---------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 09ec799a..8d003505 100644 --- a/Makefile +++ b/Makefile @@ -151,6 +151,10 @@ smoke-sketches: $(SMOKE_SKETCHES) .PHONY: force +clean: + rm -rf -- "testing/googletest/build" + rm -rf -- "_build" + @BOARD_HARDWARE_PATH="$(BOARD_HARDWARE_PATH)" $(KALEIDOSCOPE_BUILDER_DIR)/kaleidoscope-builder clean $(SMOKE_SKETCHES): force @BOARD_HARDWARE_PATH="$(BOARD_HARDWARE_PATH)" $(KALEIDOSCOPE_BUILDER_DIR)/kaleidoscope-builder $@ compile diff --git a/bin/kaleidoscope-builder b/bin/kaleidoscope-builder index 14ce90f8..d0ff2280 100755 --- a/bin/kaleidoscope-builder +++ b/bin/kaleidoscope-builder @@ -492,16 +492,9 @@ decompile () { } clean () { - find_sketch - build_paths - rm -rf -- "${OUTPUT_PATH}" - rm -rf -- "${BUILD_PATH}" - kaleidoscope_dir="$(dirname "$0")/.." - if [ -d "${kaleidoscope_dir}/testing/googletest/build" ]; then - ( cd "${kaleidoscope_dir}/testing/googletest/build" && - cmake .. && - make clean) - fi + if [ -d "$OUTPUT_PATH" ]; then + rm -rf -- "${OUTPUT_PATH}" + fi } reset_device() {