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 bce6e93..1bf5598 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