Received: from eggs.gnu.org ([208.118.235.92]:37104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TD2l1-0001LR-IV for qemu-devel@nongnu.org; Sat, 15 Sep 2012 20:30:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TD2l0-0003Uo-Nb for qemu-devel@nongnu.org; Sat, 15 Sep 2012 20:30:43 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:53513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TD2l0-0003Ue-GM for qemu-devel@nongnu.org; Sat, 15 Sep 2012 20:30:42 -0400 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 36DCC33D20C for ; Sun, 16 Sep 2012 00:30:41 +0000 (UTC) From: Mike Frysinger Date: Sat, 15 Sep 2012 20:30:41 -0400 Message-Id: <1347755441-6499-1-git-send-email-vapier@gentoo.org> Subject: [Qemu-devel] [PATCH] 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 --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 1cd5bc8..e75740c 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: +ifeq ($(findstring clean,$(MAKECMDGOALS)),) @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 +ifeq ($(findstring clean,$(MAKECMDGOALS)),) Makefile: $(GENERATED_HEADERS) +endif # Include automatically generated dependency files # Dependencies in Makefile.objs files come from our recursive subdir rules -- 1.7.9.7