diff mbox

[1/2] build: include qapi-generated/ files in qga/Makefile.objs

Message ID 1342017621-12650-2-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini July 11, 2012, 2:40 p.m. UTC
No reason to leave them out, and it will ensure that the dependencies
are picked up.  Later we can perhaps move the files to another
directory to avoid ../ usage.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Makefile          |    2 +-
 qga/Makefile.objs |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Michael Roth July 11, 2012, 3:25 p.m. UTC | #1
On Wed, Jul 11, 2012 at 04:40:20PM +0200, Paolo Bonzini wrote:
> No reason to leave them out, and it will ensure that the dependencies
> are picked up.  Later we can perhaps move the files to another
> directory to avoid ../ usage.

Couldn't we accomplish that by just adding the dependencies to qga-obj-y in
the top-level Makefile.objs instead?

> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  Makefile          |    2 +-
>  qga/Makefile.objs |    2 ++
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 34d6a9e..1b7cd2f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -206,7 +206,7 @@ QGALIB_GEN=$(addprefix qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qm
>  $(QGALIB_OBJ): $(QGALIB_GEN)
>  $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN)
> 
> -qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y) $(QGALIB_OBJ)
> +qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y)
> 
>  QEMULIBS=libhw32 libhw64 libuser libdis libdis-user
> 
> diff --git a/qga/Makefile.objs b/qga/Makefile.objs
> index 6a4d843..b54b9b1 100644
> --- a/qga/Makefile.objs
> +++ b/qga/Makefile.objs
> @@ -1,3 +1,5 @@
>  qga-obj-y = commands.o guest-agent-command-state.o
>  qga-obj-$(CONFIG_POSIX) += commands-posix.o channel-posix.o
>  qga-obj-$(CONFIG_WIN32) += commands-win32.o channel-win32.o service-win32.o
> +qga-obj-y += ../qapi-generated/qga-qapi-types.o ../qapi-generated/qga-qapi-visit.o
> +qga-obj-y += ../qapi-generated/qga-qmp-marshal.o
> -- 
> 1.7.10.4
> 
> 
>
Paolo Bonzini July 11, 2012, 3:28 p.m. UTC | #2
Il 11/07/2012 17:25, Michael Roth ha scritto:
> > No reason to leave them out, and it will ensure that the dependencies
> > are picked up.  Later we can perhaps move the files to another
> > directory to avoid ../ usage.
> 
> Couldn't we accomplish that by just adding the dependencies to qga-obj-y in
> the top-level Makefile.objs instead?

Yes, but I believe that the better place for these files is
qga/qapi-generated/, so I'm preparing for that. :)

Paolo
Michael Roth July 11, 2012, 4 p.m. UTC | #3
On Wed, Jul 11, 2012 at 05:28:26PM +0200, Paolo Bonzini wrote:
> Il 11/07/2012 17:25, Michael Roth ha scritto:
> > > No reason to leave them out, and it will ensure that the dependencies
> > > are picked up.  Later we can perhaps move the files to another
> > > directory to avoid ../ usage.
> > 
> > Couldn't we accomplish that by just adding the dependencies to qga-obj-y in
> > the top-level Makefile.objs instead?
> 
> Yes, but I believe that the better place for these files is
> qga/qapi-generated/, so I'm preparing for that. :)

Ah, makes sense :)

Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>

> 
> Paolo
>
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 34d6a9e..1b7cd2f 100644
--- a/Makefile
+++ b/Makefile
@@ -206,7 +206,7 @@  QGALIB_GEN=$(addprefix qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qm
 $(QGALIB_OBJ): $(QGALIB_GEN)
 $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN)
 
-qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y) $(QGALIB_OBJ)
+qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y)
 
 QEMULIBS=libhw32 libhw64 libuser libdis libdis-user
 
diff --git a/qga/Makefile.objs b/qga/Makefile.objs
index 6a4d843..b54b9b1 100644
--- a/qga/Makefile.objs
+++ b/qga/Makefile.objs
@@ -1,3 +1,5 @@ 
 qga-obj-y = commands.o guest-agent-command-state.o
 qga-obj-$(CONFIG_POSIX) += commands-posix.o channel-posix.o
 qga-obj-$(CONFIG_WIN32) += commands-win32.o channel-win32.o service-win32.o
+qga-obj-y += ../qapi-generated/qga-qapi-types.o ../qapi-generated/qga-qapi-visit.o
+qga-obj-y += ../qapi-generated/qga-qmp-marshal.o