build: remove old kernel-headers build directories
authorFelix Fietkau <nbd@nbd.name>
Fri, 16 Jun 2017 13:15:37 +0000 (15:15 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 13 Dec 2017 15:00:27 +0000 (16:00 +0100)
Saves space after updating kernel versions

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 76b62e602233d1a2e1f8ef1c0833bd22ebaaf832)

toolchain/kernel-headers/Makefile

index bce6e93e1a8f849be7e550da12ba6566c72d7cbf..1bf5598d6fd6287fb3d660d6faf311f017508e32 100644 (file)
@@ -71,6 +71,7 @@ define Host/Configure/post/mipsel
 endef
 
 define Host/Prepare
+       rm -rf $(BUILD_DIR_TOOLCHAIN)/linux-*
        $(call Kernel/Prepare/Default)
        rm -f $(BUILD_DIR_TOOLCHAIN)/linux
        ln -s linux-$(LINUX_VERSION) $(BUILD_DIR_TOOLCHAIN)/linux