From b8ee0b147fd2d310458a3bf4e387571b2cb0c04a Mon Sep 17 00:00:00 2001 From: Rafe Colton Date: Thu, 30 Apr 2020 14:39:13 -0700 Subject: [PATCH 1/2] Avoid crash if we try to run `make clean` before having ever run `make` --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 097f7111f..67664bf0d 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ clean: rm -rf test/clustertest/clustertest rm -rf libstuff/libstuff.d rm -rf libstuff/libstuff.h.gch - cd mbedtls && $(MAKE) clean + (test -f mbedtls/Makefile && cd mbedtls && $(MAKE) clean) || true cd test/clustertest/testplugin && $(MAKE) clean # The mbedtls libraries are all built the same way. From fc97d6918809ea62e6161e87c9cba1786dd05199 Mon Sep 17 00:00:00 2001 From: Rafe Colton Date: Thu, 30 Apr 2020 14:46:54 -0700 Subject: [PATCH 2/2] Explain --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 67664bf0d..703fd7888 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,8 @@ clean: rm -rf test/clustertest/clustertest rm -rf libstuff/libstuff.d rm -rf libstuff/libstuff.h.gch + # If we've never run `make`, `mbedtls/Makefile` does not exist. Add a `test + # -f` check and `|| true` so it doesn't cause `make clean` to exit nonzero (test -f mbedtls/Makefile && cd mbedtls && $(MAKE) clean) || true cd test/clustertest/testplugin && $(MAKE) clean