1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/pkg.mk: improve clean and distclean for in-source builds

This commit is contained in:
Alexandre Abadie 2020-07-10 11:16:29 +02:00
parent b05b2fddb9
commit 06b152fac0
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -126,17 +126,14 @@ ifeq ($(PKG_SOURCE_DIR),$(PKG_BUILD_DIR))
# This is the case for packages that are built within their source directory
# e.g. micropython and openthread
clean::
@-test -d $(PKG_SOURCE_DIR) && $(GIT_IN_PKG) clean $(GIT_QUIET) -xdff
distclean::
rm -rf $(PKG_SOURCE_DIR)
@-test -d $(PKG_SOURCE_DIR) && $(GIT_IN_PKG) clean -xdff '**' -e $(PKG_STATE:$(PKG_SOURCE_DIR)/%='%*')
else
clean::
rm -rf $(PKG_BUILD_DIR)
endif
distclean:: clean
rm -rf $(PKG_SOURCE_DIR)
endif
# Dependencies to 'patches'
-include $(PKG_PATCHED).d