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 <m...@redhat.com> 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,) ifneq ($(wildcard config-host.mak),)