Doc: make clean vs make clobber

make clean


make clean deletes all of the output and intermediate files for this configuration. This is the same as:

rm -rf $OUT (where $OUT is set to the build directory of your device in out/target/product/[CODENAME])

which is a less dramatic & less complete way to clean your build. make clean doesn’t kill all your output files, just intermediary files used by the build process.

make clobber


make clobber deletes all of the output and intermediate files for all configurations. This is the same as:

rm -rf out/

(So this removes not only out/target/product/CODENAME but the entire /out directory.)

To do a start-everything-new build, first type:

make clobber

and then this will remove all of out/ (where the builds are generated) so that a rebuild will re-create the whole thing from scratch.

Leave a comment