From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlYlF-0006GM-AW for qemu-devel@nongnu.org; Mon, 25 Jul 2011 23:56:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QlYlD-0006SX-OV for qemu-devel@nongnu.org; Mon, 25 Jul 2011 23:56:49 -0400 From: Alexandre Raymond Date: Mon, 25 Jul 2011 23:56:01 -0400 Message-Id: <1311652562-10794-2-git-send-email-cerbere@gmail.com> In-Reply-To: <1311652562-10794-1-git-send-email-cerbere@gmail.com> References: <1311652562-10794-1-git-send-email-cerbere@gmail.com> Subject: [Qemu-devel] [PATCH 1/2] Makefile: distclean should clean all possible targets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Qemu Developers Cc: qemu-trivial@nongnu.org, Alexandre Raymond 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 --- 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