[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] allow make {dist, }clean work w/out configure
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] allow make {dist, }clean work w/out configure |
Date: |
Sun, 16 Sep 2012 11:52:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 |
Il 16/09/2012 02:30, 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 <address@hidden>
> ---
> 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)),)
Please use instead:
ifneq ($(filter-out %clean,$(MAKECMDGOALS)),)
so that "make clean all" still gives error.
Paolo
> @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
>