From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDWz3-0004JX-LS for qemu-devel@nongnu.org; Mon, 17 Sep 2012 04:47:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDWyy-0003lq-0L for qemu-devel@nongnu.org; Mon, 17 Sep 2012 04:47:13 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:36515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDWyx-0003li-Pk for qemu-devel@nongnu.org; Mon, 17 Sep 2012 04:47:07 -0400 Received: by pbbrp12 with SMTP id rp12so9214039pbb.4 for ; Mon, 17 Sep 2012 01:47:06 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5056E383.3010406@redhat.com> Date: Mon, 17 Sep 2012 10:46:59 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <5055A16F.4040303@redhat.com> <1347826033-4330-1-git-send-email-vapier@gentoo.org> In-Reply-To: <1347826033-4330-1-git-send-email-vapier@gentoo.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [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: Mike Frysinger Cc: qemu-devel@nongnu.org Il 16/09/2012 22:07, Mike Frysinger ha scritto: > 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 > Looks good, thanks! Paolo