external/LinuxBoot: Fix cleanup mechanism
`make clean` never thoroughly removed LinuxBoot build artifacts. This change checks for kernel directories present in the project directory and deletes all of them, if found. Signed-off-by: Patrik Tesarik <patrik.tesarik@9elements.com> Change-Id: Ia056ac6608e3631dfc270ba5c2f32216c3e1ac50 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65098 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
ed8aef9ccd
commit
f5c2f253a7
|
@ -1,7 +1,7 @@
|
|||
## SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
project_dir=linuxboot
|
||||
kernel_dir=$(project_dir)/kernel
|
||||
kernel_names=$(shell ls $(project_dir) | grep kernel)
|
||||
|
||||
unexport $(COREBOOT_EXPORTS)
|
||||
|
||||
|
@ -52,9 +52,12 @@ endif
|
|||
linuxboot: kernel initramfs_compressed
|
||||
|
||||
clean:
|
||||
if [ -d "$(kernel_dir)" ]; then rm -rf $(kernel_dir); fi
|
||||
if [ ! -z "$(kernel_names)" ]; then \
|
||||
rm -rf $(project_dir)/kernel*; \
|
||||
fi
|
||||
rm -f $(project_dir)/u-root
|
||||
rm -f $(project_dir)/initramfs*
|
||||
rm -f $(project_dir)/bzImage
|
||||
|
||||
distclean:
|
||||
rm -rf $(project_dir)
|
||||
|
|
Loading…
Reference in New Issue