At the moment, "make distclean" relies on the TARGET_DIRS variable, set by configure. The problem is that this variable does not always contain all possible targets.
For example, the following will leave build data in the tree: ./configure && make && ./configure --target-list=i386-softmmu \ && make distclean as it will only remove the i386-softmmu build directory, although the first build created additional directories. Solution : pass the full list of targets from configure to make via the DEFAULT_TARGET_LIST variable. Signed-off-by: Alexandre Raymond <cerb...@gmail.com> --- Makefile | 2 +- configure | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 723d41f..878402e 100644 --- a/Makefile +++ b/Makefile @@ -225,7 +225,7 @@ distclean: clean rm -f qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.toc qemu-doc.tp rm -f qemu-doc.vr rm -f qemu-tech.info qemu-tech.aux qemu-tech.cp qemu-tech.dvi qemu-tech.fn qemu-tech.info qemu-tech.ky qemu-tech.log qemu-tech.pdf qemu-tech.pg qemu-tech.toc qemu-tech.tp qemu-tech.vr - for d in $(TARGET_DIRS) $(QEMULIBS); do \ + for d in $(DEFAULT_TARGET_LIST) $(QEMULIBS); do \ rm -rf $$d || exit 1 ; \ done diff --git a/configure b/configure index 600da9b..83f980a 100755 --- a/configure +++ b/configure @@ -2810,6 +2810,7 @@ qemu_version=`head $source_path/VERSION` echo "VERSION=$qemu_version" >>$config_host_mak echo "PKGVERSION=$pkgversion" >>$config_host_mak echo "SRC_PATH=$source_path" >> $config_host_mak +echo "DEFAULT_TARGET_LIST=$default_target_list" >> $config_host_mak echo "TARGET_DIRS=$target_list" >> $config_host_mak if [ "$docs" = "yes" ] ; then echo "BUILD_DOCS=yes" >> $config_host_mak -- 1.7.5