|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH 1/5] build: add clean-libs rule
From: Florian Schmidt <florian.schmidt@xxxxxxxxx>
This rule allows to clean all intermediate files, but keep the final
image(s). Simply removing the final image from the LIBPLAT_CLEAN works
because the image itself is also cleaned by removing all UK_IMAGES in a
further clean step (which happened to be a noop until now).
Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>
Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
Makefile | 12 ++++++++----
plat/kvm/Linker.uk | 1 -
plat/linuxu/Linker.uk | 1 -
plat/xen/Linker.uk | 1 -
4 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index e423be8d..6de41605 100644
--- a/Makefile
+++ b/Makefile
@@ -552,10 +552,12 @@ all: images gdb_helpers
# Generate cleaning rules
include $(CONFIG_UK_BASE)/support/build/Makefile.clean
-clean: $(addprefix clean-,\
+clean-libs: $(addprefix clean-,\
$(foreach P,$(UK_PLATS) $(UK_PLATS-y),\
$(if $(call qstrip,$($(call uc,$(P))_LIBS) $($(call uc,$(P))_LIBS-y)),\
$(foreach L,$($(call uc,$(P))_LIBS) $($(call uc,$(P))_LIBS-y), $(L))))
$(UK_LIBS) $(UK_LIBS-y))
+
+clean: clean-libs
$(call verbose_cmd,CLEAN,build/,$(RM) \
$(UK_CONFIG_OUT) \
$(call build_clean,$(UK_IMAGES-y)) \
@@ -565,7 +567,7 @@ else # !($(UK_HAVE_DOT_CONFIG),y)
all: menuconfig
-.PHONY: prepare image libs objs clean
+.PHONY: prepare image libs objs clean-libs clean
fetch: menuconfig
@@ -577,7 +579,7 @@ libs: menuconfig
images: menuconfig
-clean:
+clean-libs clean:
$(error Do not know which files to clean without having a
configuration. Did you mean 'properclean' or 'distclean'?)
endif
@@ -777,8 +779,10 @@ help:
@echo 'Cleaning:'
@echo ' clean-[LIBNAME] - delete all files created by build for
a single library'
@echo ' (e.g., clean-libfdt)'
+ @echo ' clean-libs - delete all files created by build for
all libraries'
+ @echo ' but keep final images and fetched
files'
@echo ' clean - delete all files created by build for
all libraries'
- @echo ' but keep fetched files'
+ @echo ' including final images, but keep
fetched files'
@echo ' properclean - delete build directory'
@echo ' distclean - delete build directory and
configurations (including .config)'
@echo ''
diff --git a/plat/kvm/Linker.uk b/plat/kvm/Linker.uk
index 54ae5e8e..966b265a 100644
--- a/plat/kvm/Linker.uk
+++ b/plat/kvm/Linker.uk
@@ -57,7 +57,6 @@ endif
UK_IMAGES-$(CONFIG_PLAT_KVM) += $(KVM_IMAGE)
# ...for cleaning:
-LIBKVMPLAT_CLEAN += $(call build_clean,$(KVM_IMAGE))
LIBKVMPLAT_CLEAN += $(call build_clean,$(KVM_IMAGE).gz)
LIBKVMPLAT_CLEAN += $(call build_clean,$(KVM_IMAGE).dbg)
LIBKVMPLAT_CLEAN += $(call build_clean,$(KVM_IMAGE).sym)
diff --git a/plat/linuxu/Linker.uk b/plat/linuxu/Linker.uk
index abbc781e..0dd12c8c 100644
--- a/plat/linuxu/Linker.uk
+++ b/plat/linuxu/Linker.uk
@@ -38,6 +38,5 @@ endif
UK_IMAGES-$(CONFIG_PLAT_LINUXU) += $(LINUXU_IMAGE)
# ...for cleaning:
-LIBLINUXUPLAT_CLEAN += $(call build_clean,$(LINUXU_IMAGE))
LIBLINUXUPLAT_CLEAN += $(call build_clean,$(LINUXU_IMAGE).dbg)
LIBLINUXUPLAT_CLEAN += $(call build_clean,$(LINUXU_IMAGE).sym)
diff --git a/plat/xen/Linker.uk b/plat/xen/Linker.uk
index 5bb75cf0..042252da 100644
--- a/plat/xen/Linker.uk
+++ b/plat/xen/Linker.uk
@@ -81,4 +81,3 @@ LIBXENPLAT_CLEAN += $(call build_clean,$(XEN_IMAGE).elf.dbg)
LIBXENPLAT_CLEAN += $(call build_clean,$(XEN_IMAGE).gz)
LIBXENPLAT_CLEAN += $(call build_clean,$(XEN_IMAGE).dbg)
LIBXENPLAT_CLEAN += $(call build_clean,$(XEN_IMAGE).sym)
-LIBXENPLAT_CLEAN += $(call build_clean,$(XEN_IMAGE))
--
2.22.0
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |