diff --git a/make/buildsystem-helpers.mk b/make/buildsystem-helpers.mk index eec4cbd0..813809ec 100644 --- a/make/buildsystem-helpers.mk +++ b/make/buildsystem-helpers.mk @@ -22,8 +22,8 @@ endef # clean up define CLEANUP $(Q)( \ - if [ -d $(BUILD_DIR)/$($(PKG)_DIR) ]; then \ - $(call MESSAGE,"Clean up"); \ + if [ "$($(PKG)_DIR)" ]; then \ + $(call MESSAGE,"Clean-up"); \ rm -rf $(BUILD_DIR)/$($(PKG)_DIR); \ fi; \ )