clean/distclean speedup

Paul Fox pgf at brightstareng.com
Thu Mar 9 13:50:06 PST 2006


i know these targets aren't used _that_ often, but if we're
allowed to use xargs, this patch makes 'make clean' and 'make
distclean' somewhat faster.  i won't apply this myself -- i'll
leave it to someone who feels more responsibility for the
makefiles than i'm willing to take.  ;-)

paul

Index: Makefile
===================================================================
--- Makefile	(revision 14459)
+++ Makefile	(working copy)
@@ -498,18 +498,18 @@
 	    libbusybox.so* \
 	    .config.old busybox busybox_unstripped
 	- rm -r -f _install testsuite/links
-	- find . -name .\*.flags -exec rm -f {} \;
-	- find . -name \*.o -exec rm -f {} \;
-	- find . -name \*.om -exec rm -f {} \;
-	- find . -name \*.os -exec rm -f {} \;
-	- find . -name \*.osm -exec rm -f {} \;
-	- find . -name \*.a -exec rm -f {} \;
+	- find . -name .\*.flags \
+	    -o -name \*.o \
+	    -o -name \*.om \
+	    -o -name \*.os \
+	    -o -name \*.osm \
+	    -o -name \*.a | xargs rm -f
 
 distclean: clean
 	- $(MAKE) -C scripts/config clean
 	- rm -f scripts/bb_mkdep
 	- rm -r -f include/config $(DEP_INCLUDES)
-	- find . -name .depend'*' -exec rm -f {} \;
+	- find . -name .depend'*' | xargs rm -f 
 	rm -f .config .config.old .config.cmd
 
 release: distclean #doc



=---------------------
 paul fox, pgf at brightstareng.com


More information about the busybox mailing list