From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDL7V-00012Q-3k for qemu-devel@nongnu.org; Sun, 16 Sep 2012 16:07:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDL7U-0004Pz-6i for qemu-devel@nongnu.org; Sun, 16 Sep 2012 16:07:09 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:46089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDL7U-0004Pt-0w for qemu-devel@nongnu.org; Sun, 16 Sep 2012 16:07:08 -0400 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 0779033C9EB for ; Sun, 16 Sep 2012 20:07:06 +0000 (UTC) From: Mike Frysinger Date: Sun, 16 Sep 2012 16:07:13 -0400 Message-Id: <1347826033-4330-1-git-send-email-vapier@gentoo.org> In-Reply-To: <5055A16F.4040303@redhat.com> References: <5055A16F.4040303@redhat.com> Subject: [Qemu-devel] [PATCH v2] allow make {dist, }clean work w/out configure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org There's no reason to require configure to run before running a clean target, so check MAKECMDGOALS before. Signed-off-by: Mike Frysinger --- v2 - handle edge cases Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 1cd5bc8..0a37369 100644 --- a/Makefile +++ b/Makefile @@ -14,9 +14,11 @@ config-host.mak: $(SRC_PATH)/configure @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh else config-host.mak: +ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) @echo "Please call configure before running make!" @exit 1 endif +endif GENERATED_HEADERS = config-host.h trace.h qemu-options.def ifeq ($(TRACE_BACKEND),dtrace) @@ -398,7 +400,9 @@ qemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \ # Add a dependency on the generated files, so that they are always # rebuilt before other object files +ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) Makefile: $(GENERATED_HEADERS) +endif # Include automatically generated dependency files # Dependencies in Makefile.objs files come from our recursive subdir rules -- 1.7.9.7