qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] make: remove generated objects from target dirs


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] make: remove generated objects from target dirs
Date: Sun, 4 Mar 2012 13:25:59 +0000

On 4 March 2012 09:10, Michael S. Tsirkin <address@hidden> wrote:
> I ended up with qmp-commands.h in target directories,
> which makes build fail as it is found before the
> main header.
> make clean fixes it, but it might get triggered
> again when we make some header target-independent next.
> It's easy to just make sure all such leftovers are
> removed, so let's do this.
>
> Signed-off-by: Michael S. Tsirkin <address@hidden>
>
> diff --git a/Makefile b/Makefile
> index e66e885..958a414 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -89,6 +89,7 @@ qemu-options.def: $(SRC_PATH)/qemu-options.hx
>  SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
>
>  subdir-%: $(GENERATED_HEADERS)
> +       $(call quiet-command,rm -f $(foreach header, $(GENERATED_HEADERS), 
> "$*/$(header)"),)
>        $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" 
> TARGET_DIR="$*/" all,)

In general we don't have workarounds for "something
moved directory and this broke builds not from clean"
(source file moved from hw/ to . being one that's bitten
me before), so why does just this one deserve to get an
rm here rather than just asking the user to run
'make clean / distclean' ?

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]