From 6894a50aa71ac6c65caf41a017b684a067131345 Mon Sep 17 00:00:00 2001 From: Deon Nicholas Date: Tue, 25 Jun 2013 11:30:37 -0700 Subject: [PATCH] Updated "make clean" to remove all .o files Summary: The old Makefile did not remove ALL .o and .d files, but rather only those that happened to be in the root folder and one-level deep. This was causing issues when recompiling files in deeper folders. This fix now causes make clean to find ALL .o and .d files via a unix "find" command, and then remove them. Test Plan: make clean; make all -j 32; Reviewers: haobo, jpaton, dhruba Reviewed By: haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D11493 --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6e64d5e3f..0fa9d42dc 100644 --- a/Makefile +++ b/Makefile @@ -140,8 +140,9 @@ valgrind_check: all $(PROGRAMS) $(TESTS) done clean: - -rm -f $(PROGRAMS) $(BENCHMARKS) $(LIBRARY) $(SHARED) $(MEMENVLIBRARY) $(THRIFTSERVER) */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o build_config.mk */*.d */*/*.d + -rm -f $(PROGRAMS) $(BENCHMARKS) $(LIBRARY) $(SHARED) $(MEMENVLIBRARY) $(THRIFTSERVER) build_config.mk -rm -rf ios-x86/* ios-arm/* + -for x in `find . -name "*.[od]"`; do rm $$x; done $(LIBRARY): $(LIBOBJECTS) rm -f $@