Re: [Qemu-devel] [PATCH for-1.1] Makefile: Fix QOM dependencies
Hi, # Include automatically generated dependency files --include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d qga/*.d) +-include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d qga/*.d qom/*.d) I wonder if, independently of QOM, we also need to consider... - qapi-generated/*.d, - usb/*.d and - tests/*.d? Maybe we should just stop spreading the dep files over all directories? RfC patch attached. cheers, Gerd From 7b830d2394b17d8480d0d6dca8de940d591a4a3a Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann kra...@redhat.com Date: Tue, 29 May 2012 09:03:30 +0200 Subject: [PATCH] dep fixup Signed-off-by: Gerd Hoffmann kra...@redhat.com --- Makefile | 10 +- rules.mak |2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 9b7a85e..e872a8a 100644 --- a/Makefile +++ b/Makefile @@ -214,12 +214,12 @@ clean: # avoid old build problems by removing potentially incorrect old files rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h rm -f qemu-options.def - rm -f *.o *.d *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ + rm -f *.o .*.d *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ rm -Rf .libs - rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d - rm -f qom/*.o qom/*.d + rm -f slirp/*.o audio/*.o block/*.o net/*.o fsdev/*.o ui/*.o qapi/*.o qga/*.o + rm -f qom/*.o rm -f qemu-img-cmds.h - rm -f trace/*.o trace/*.d + rm -f trace/*.o rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp @# May not be present in GENERATED_HEADERS rm -f trace-dtrace.h trace-dtrace.h-timestamp @@ -400,4 +400,4 @@ tar: rm -rf /tmp/$(FILE) # Include automatically generated dependency files --include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d qga/*.d) +-include $(wildcard .*.d) diff --git a/rules.mak b/rules.mak index efef6f2..9937855 100644 --- a/rules.mak +++ b/rules.mak @@ -12,7 +12,7 @@ MAKEFLAGS += -rR %.mak: # Flags for dependency generation -QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d +QEMU_DGFLAGS += -MMD -MP -MT $@ -MF .$(subst /,-,$*).d %.o: %.c $(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $, CC$(TARGET_DIR)$@) -- 1.7.1
Re: [Qemu-devel] [PATCH for-1.1] Makefile: Fix QOM dependencies
Il 29/05/2012 09:05, Gerd Hoffmann ha scritto: I wonder if, independently of QOM, we also need to consider... - qapi-generated/*.d, - usb/*.d and - tests/*.d? Maybe we should just stop spreading the dep files over all directories? RfC patch attached. This could in principle break, like hw/usb/core.o vs. hw/usb-core.o. It would be a very bad choice of names, but it is possible in principle. Another choice: we could just subst .o with .d in the *-obj-y variables. Paolo
Re: [Qemu-devel] [PATCH for-1.1] Makefile: Fix QOM dependencies
Am 29.05.2012 09:44, schrieb Paolo Bonzini: Il 29/05/2012 09:05, Gerd Hoffmann ha scritto: I wonder if, independently of QOM, we also need to consider... - qapi-generated/*.d, - usb/*.d and - tests/*.d? Maybe we should just stop spreading the dep files over all directories? RfC patch attached. This could in principle break, like hw/usb/core.o vs. hw/usb-core.o. It would be a very bad choice of names, but it is possible in principle. I concur, it's quite risky for the final RC. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Re: [Qemu-devel] [PATCH for-1.1] Makefile: Fix QOM dependencies
Am 29.05.2012 09:05, schrieb Gerd Hoffmann: - rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d - rm -f qom/*.o qom/*.d + rm -f slirp/*.o audio/*.o block/*.o net/*.o fsdev/*.o ui/*.o qapi/*.o qga/*.o + rm -f qom/*.o I think this is calling for a centrally maintained (or automatically derived) list of build directories. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Re: [Qemu-devel] [PATCH for-1.1] Makefile: Fix QOM dependencies
Il 29/05/2012 11:28, Andreas Färber ha scritto: Am 29.05.2012 09:05, schrieb Gerd Hoffmann: -rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d -rm -f qom/*.o qom/*.d +rm -f slirp/*.o audio/*.o block/*.o net/*.o fsdev/*.o ui/*.o qapi/*.o qga/*.o +rm -f qom/*.o I think this is calling for a centrally maintained (or automatically derived) list of build directories. Quite difficult with the abuse of vpath that we currently have... but we can still proceed incrementally. Paolo
Re: [Qemu-devel] [PATCH for-1.1] Makefile: Fix QOM dependencies
Am 29.05.2012 11:43, schrieb Paolo Bonzini: Il 29/05/2012 11:28, Andreas Färber ha scritto: Am 29.05.2012 09:05, schrieb Gerd Hoffmann: - rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d - rm -f qom/*.o qom/*.d + rm -f slirp/*.o audio/*.o block/*.o net/*.o fsdev/*.o ui/*.o qapi/*.o qga/*.o + rm -f qom/*.o I think this is calling for a centrally maintained (or automatically derived) list of build directories. Quite difficult with the abuse of vpath that we currently have... but we can still proceed incrementally. For 1.1 I was thinking of something like BUILDSUBDIRS=slirp audio block net fsdev ui qapi qga qom for dir in $(BUILDSUBDIRS); do \ rm -rf $dir/*.o $dir/*.d; \ done which possibly could also be reused for the list of *.d includes with some clever macro usage. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Re: [Qemu-devel] [PATCH for-1.1] Makefile: Fix QOM dependencies
On 05/29/2012 04:47 AM, Andreas Färber wrote: Am 29.05.2012 11:43, schrieb Paolo Bonzini: Il 29/05/2012 11:28, Andreas Färber ha scritto: Am 29.05.2012 09:05, schrieb Gerd Hoffmann: - rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d - rm -f qom/*.o qom/*.d + rm -f slirp/*.o audio/*.o block/*.o net/*.o fsdev/*.o ui/*.o qapi/*.o qga/*.o + rm -f qom/*.o I think this is calling for a centrally maintained (or automatically derived) list of build directories. Quite difficult with the abuse of vpath that we currently have... but we can still proceed incrementally. For 1.1 I was thinking of something like BUILDSUBDIRS=slirp audio block net fsdev ui qapi qga qom for dir in $(BUILDSUBDIRS); do \ rm -rf $dir/*.o $dir/*.d; \ done which possibly could also be reused for the list of *.d includes with some clever macro usage. I'd prefer not to make this change in 1.1.0 as this doesn't seem to be a release blocker to me. I'd rather do something more significant in 1.2 and backport to a 1.1.1 release. Regards, Anthony Liguori Andreas
Re: [Qemu-devel] [PATCH for-1.1] Makefile: Fix QOM dependencies
Il 29/05/2012 11:47, Andreas Färber ha scritto: Am 29.05.2012 11:43, schrieb Paolo Bonzini: Il 29/05/2012 11:28, Andreas Färber ha scritto: Am 29.05.2012 09:05, schrieb Gerd Hoffmann: - rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d - rm -f qom/*.o qom/*.d + rm -f slirp/*.o audio/*.o block/*.o net/*.o fsdev/*.o ui/*.o qapi/*.o qga/*.o + rm -f qom/*.o I think this is calling for a centrally maintained (or automatically derived) list of build directories. Quite difficult with the abuse of vpath that we currently have... but we can still proceed incrementally. For 1.1 I was thinking of something like BUILDSUBDIRS=slirp audio block net fsdev ui qapi qga qom for dir in $(BUILDSUBDIRS); do \ rm -rf $dir/*.o $dir/*.d; \ done which possibly could also be reused for the list of *.d includes with some clever macro usage. I think even this is too much for 1.1. After all the problems come only if you modify the source, and right now 99.99% of the people will use the git tree for that. Paolo
Re: [Qemu-devel] [PATCH for-1.1] Makefile: Fix QOM dependencies
Am 29.05.2012 11:50, schrieb Anthony Liguori: On 05/29/2012 04:47 AM, Andreas Färber wrote: Am 29.05.2012 11:43, schrieb Paolo Bonzini: Il 29/05/2012 11:28, Andreas Färber ha scritto: Am 29.05.2012 09:05, schrieb Gerd Hoffmann: -rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d -rm -f qom/*.o qom/*.d +rm -f slirp/*.o audio/*.o block/*.o net/*.o fsdev/*.o ui/*.o qapi/*.o qga/*.o +rm -f qom/*.o I think this is calling for a centrally maintained (or automatically derived) list of build directories. Quite difficult with the abuse of vpath that we currently have... but we can still proceed incrementally. For 1.1 I was thinking of something like BUILDSUBDIRS=slirp audio block net fsdev ui qapi qga qom for dir in $(BUILDSUBDIRS); do \ rm -rf $dir/*.o $dir/*.d; \ done which possibly could also be reused for the list of *.d includes with some clever macro usage. I'd prefer not to make this change in 1.1.0 as this doesn't seem to be a release blocker to me. I'd rather do something more significant in 1.2 and backport to a 1.1.1 release. Is this change referring to my patch, Gerd's attachment or my above snippet? I don't see it as a release blocker, but having proper dependencies in the release would be good for people patching the tarball. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Re: [Qemu-devel] [PATCH for-1.1] Makefile: Fix QOM dependencies
On 05/29/2012 05:01 AM, Paolo Bonzini wrote: Il 29/05/2012 11:47, Andreas Färber ha scritto: Am 29.05.2012 11:43, schrieb Paolo Bonzini: Il 29/05/2012 11:28, Andreas Färber ha scritto: Am 29.05.2012 09:05, schrieb Gerd Hoffmann: - rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d - rm -f qom/*.o qom/*.d + rm -f slirp/*.o audio/*.o block/*.o net/*.o fsdev/*.o ui/*.o qapi/*.o qga/*.o + rm -f qom/*.o I think this is calling for a centrally maintained (or automatically derived) list of build directories. Quite difficult with the abuse of vpath that we currently have... but we can still proceed incrementally. For 1.1 I was thinking of something like BUILDSUBDIRS=slirp audio block net fsdev ui qapi qga qom for dir in $(BUILDSUBDIRS); do \ rm -rf $dir/*.o $dir/*.d; \ done which possibly could also be reused for the list of *.d includes with some clever macro usage. I think even this is too much for 1.1. After all the problems come only if you modify the source, and right now 99.99% of the people will use the git tree for that. Agreed. I think this is 1.2 material with a possible backport to 1.1.x if we find a nice solution to the problem. Regards, Anthony Liguori Paolo
[Qemu-devel] [PATCH for-1.1] Makefile: Fix QOM dependencies
Dependency files qom/*.d were not included by Makefile, causing changes in object.h (e.g., changes to struct Object) not to propagate to qom-qobject.o, container.o and cpu.o. Add qom/*.d to the wildcard list. libuser/qom/cpu.o was unaffected since Makefile.user includes */*.d. Signed-off-by: Andreas Färber afaer...@suse.de --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 9b7a85e..0bb0529 100644 --- a/Makefile +++ b/Makefile @@ -400,4 +400,4 @@ tar: rm -rf /tmp/$(FILE) # Include automatically generated dependency files --include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d qga/*.d) +-include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d qga/*.d qom/*.d) -- 1.7.7
Re: [Qemu-devel] [PATCH for-1.1] Makefile: Fix QOM dependencies
Am 27.05.2012 02:29, schrieb Andreas Färber: Dependency files qom/*.d were not included by Makefile, causing changes in object.h (e.g., changes to struct Object) not to propagate to qom-qobject.o, container.o and cpu.o. Add qom/*.d to the wildcard list. libuser/qom/cpu.o was unaffected since Makefile.user includes */*.d. Signed-off-by: Andreas Färber afaer...@suse.de --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 9b7a85e..0bb0529 100644 --- a/Makefile +++ b/Makefile @@ -400,4 +400,4 @@ tar: rm -rf /tmp/$(FILE) # Include automatically generated dependency files --include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d qga/*.d) +-include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d qga/*.d qom/*.d) I wonder if, independently of QOM, we also need to consider... - qapi-generated/*.d, - usb/*.d and - tests/*.d? Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg