make/MainSupport.gmk
changeset 33052 4da63d511320
parent 33045 00f484891bcf
child 33437 1cf150337073
--- a/make/MainSupport.gmk	Thu Oct 22 15:54:15 2015 +0200
+++ b/make/MainSupport.gmk	Thu Oct 22 16:41:24 2015 +0200
@@ -50,6 +50,8 @@
 	@$(PRINTF) "Cleaning test $(strip $1) ..."
 	@$(PRINTF) "\n" $(LOG_DEBUG)
 	$(RM) -r $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))
+        # Remove as much of the test directory structure as is empty
+	$(RMDIR) -p $(dir $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))) 2> /dev/null || true
 	@$(PRINTF) " done\n"
 endef