From b2e899429f4cb2a1d9944fedb17d979aa483bf4f Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Fri, 13 Nov 2020 15:36:38 -0800 Subject: [PATCH] 'make clean' fixes --- Makefile | 4 ++++ tests/Makefile | 20 ++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index fc39d796..e3105ca1 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,10 @@ endif include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk +clean: + $(MAKE) -C tests clean + rm -rf testing/googletest/build/* + prepare-virtual: $(MAKE) -C $(BOARD_HARDWARE_PATH)/keyboardio prepare-virtual diff --git a/tests/Makefile b/tests/Makefile index 4afe2f1f..ee274b80 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -15,17 +15,21 @@ all: ${TESTS} done cmake-clean: - -${MAKE} clean - rm -rf ../testing/googletest/build + rm -rf "${top_dir}/testing/googletest/build/*" -clean: ../testing/googletest/build/Makefile - rm -rf "${build_dir}" +clean: cmake-clean +# ${top_dir}/testing/googletest/build/Makefile + @for test in ${TESTS}; do \ + ${MAKE} -s -f ${top_dir}/testing/makefiles/testcase.mk -C $${test} top_dir=${top_dir} testcase=$${test} clean; \ + done + + rm -rf "${build_dir}/*" -googletest: ../testing/googletest/build/Makefile - cd ../testing/googletest/build && $(MAKE) +googletest: ${top_dir}/testing/googletest/build/Makefile + cd ${top_dir}/testing/googletest/build && $(MAKE) -../testing/googletest/build/Makefile: - install -d ../testing/googletest/build && cd ../testing/googletest/build && cmake .. +${top_dir}/testing/googletest/build/Makefile: + install -d ${top_dir}/testing/googletest/build && cd ${top_dir}/testing/googletest/build && cmake .. ${libcommon_a}: ${MAKE} -f ${top_dir}/testing/makefiles/libcommon.mk -C ${top_dir}/testing