build: remove old kernel-headers build directories
authorFelix Fietkau <nbd@nbd.name>
Fri, 16 Jun 2017 13:15:37 +0000 (15:15 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 16 Jun 2017 13:16:52 +0000 (15:16 +0200)
Saves space after updating kernel versions

Signed-off-by: Felix Fietkau <nbd@nbd.name>
toolchain/kernel-headers/Makefile

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