[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2] 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. CC: Ian Campbell <ian.campbell@xxxxxxxxxx> CC: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> CC: Jan Beulich <jbeulich@xxxxxxxx> CC: Keir Fraser <keir@xxxxxxx> CC: Tim Deegan <tim@xxxxxxx> Signed-off-by: Jonathan Creekmore <jonathan.creekmore@xxxxxxxxx> --- xen/Makefile | 3 ++- xen/Rules.mk | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 3a1de99..365c477 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 diff --git a/xen/Rules.mk b/xen/Rules.mk index 02db110..123a4a7 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -173,7 +173,7 @@ FORCE: .PHONY: clean clean:: $(addprefix _clean_, $(subdir-all)) - rm -f *.o *~ core $(DEPS) + rm -f *~ core _clean_%/: FORCE $(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean -- 2.6.2 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |