From: Jonathan Creekmore Date: Thu, 3 Dec 2015 14:35:09 +0000 (+0100) Subject: build: fix clean to remove all *.o and .*.d files X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2131 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=68dc5813545c408b57221a2cb81b7e00dc9dc630;p=xen.git build: fix clean to remove all *.o and .*.d files In commit 8b6ef9c152edceabecc7f90c811cd538a7b7a110, several files in xen/common/compat were changed to be built using the Makefile in xen/common, by appending the compat prefix to the object files. Additionally, the xen/common/compat directory was removed from the subdirs-y variable, so it is no longer visited by the clean rule. This resulted in some object files and dependency files being generated by inclusion into obj-y, but not cleaned because they lived in a directory that was unvisited by the clean rules. Since there is a desire for all of the object files and dependency files to be cleaned, just search for all objects and dependency files and delete them on clean. The previous method of only tracking with the $(DEPS) and *.o in the clean rules had the disadvantage that, if the configuration changed between a build and a clean, some of the dependencies or objects could get left behind. This method does not have the same disadvantage. Signed-off-by: Jonathan Creekmore [dropped removal of *.o and $(DEPS) from xen/Rules.mk's clean rule] Acked-by: Jan Beulich --- diff --git a/xen/Makefile b/xen/Makefile index 3a1de99532..62c3a6e69b 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -91,7 +91,8 @@ _clean: delete-unfresh-files $(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean $(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean - rm -f include/asm *.o $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET)-syms *~ core $(DEPS) + find . \( -name "*.o" -o -name ".*.d" \) -exec rm -f {} \; + rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET)-syms *~ core rm -f include/asm-*/asm-offsets.h rm -f .banner