pkg/pkg.mk: improve clean and distclean for in-source builds
This commit is contained in:
parent
b05b2fddb9
commit
06b152fac0
@ -126,17 +126,14 @@ ifeq ($(PKG_SOURCE_DIR),$(PKG_BUILD_DIR))
|
|||||||
# This is the case for packages that are built within their source directory
|
# This is the case for packages that are built within their source directory
|
||||||
# e.g. micropython and openthread
|
# e.g. micropython and openthread
|
||||||
clean::
|
clean::
|
||||||
@-test -d $(PKG_SOURCE_DIR) && $(GIT_IN_PKG) clean $(GIT_QUIET) -xdff
|
@-test -d $(PKG_SOURCE_DIR) && $(GIT_IN_PKG) clean -xdff '**' -e $(PKG_STATE:$(PKG_SOURCE_DIR)/%='%*')
|
||||||
|
|
||||||
distclean::
|
|
||||||
rm -rf $(PKG_SOURCE_DIR)
|
|
||||||
else
|
else
|
||||||
clean::
|
clean::
|
||||||
rm -rf $(PKG_BUILD_DIR)
|
rm -rf $(PKG_BUILD_DIR)
|
||||||
|
endif
|
||||||
|
|
||||||
distclean:: clean
|
distclean:: clean
|
||||||
rm -rf $(PKG_SOURCE_DIR)
|
rm -rf $(PKG_SOURCE_DIR)
|
||||||
endif
|
|
||||||
|
|
||||||
# Dependencies to 'patches'
|
# Dependencies to 'patches'
|
||||||
-include $(PKG_PATCHED).d
|
-include $(PKG_PATCHED).d
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user