Re: [PATCH v7 13/20] build: Do not build usbredir dependent file is usbredir disabled

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

 



> 
> Hi,
> 
> On Mon, Sep 16, 2019 at 12:20:56PM +0200, Victor Toso wrote:
> > From: Frediano Ziglio <fziglio@xxxxxxxxxx>
> > 
> > These files would end up to compile empty code, no reason
> > to compile and link them.
> > 
> > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> 
> Acked-by: Victor Toso <victortoso@xxxxxxxxxx>
> 

Before I forget, typo in title, should be

"build: Do not build usbredir dependent file if usbredir is disabled"

Hope it gets in v8

> > ---
> >  src/meson.build   | 10 +++++-----
> >  src/usb-backend.c |  4 ----
> >  src/usbutil.c     |  3 ---
> >  src/usbutil.h     |  4 ----
> >  4 files changed, 5 insertions(+), 16 deletions(-)
> > 
> > diff --git a/src/meson.build b/src/meson.build
> > index 00eb277..0461dea 100644
> > --- a/src/meson.build
> > +++ b/src/meson.build
> > @@ -119,11 +119,6 @@ spice_client_glib_sources = [
> >    'spice-uri-priv.h',
> >    'spice-util-priv.h',
> >    'usb-device-manager-priv.h',
> > -  'usbutil.c',
> > -  'usbutil.h',
> > -  'usb-backend.c',
> > -  'usb-emulation.h',
> > -  'usb-backend.h',
> >    'vmcstream.c',
> >    'vmcstream.h',
> >  ]
> > @@ -159,6 +154,11 @@ endif
> >  
> >  if spice_gtk_has_usbredir
> >    spice_client_glib_sources += [
> > +    'usbutil.c',
> > +    'usbutil.h',
> > +    'usb-backend.c',
> > +    'usb-emulation.h',
> > +    'usb-backend.h',
> >      'usb-device-cd.c',
> >      'usb-device-cd.h',
> >      'cd-scsi.c',
> > diff --git a/src/usb-backend.c b/src/usb-backend.c
> > index 81d7c9e..3a5a873 100644
> > --- a/src/usb-backend.c
> > +++ b/src/usb-backend.c
> > @@ -22,8 +22,6 @@
> >  
> >  #include "config.h"
> >  
> > -#ifdef USE_USBREDIR
> > -
> >  #include <glib-object.h>
> >  #include <inttypes.h>
> >  #include <gio/gio.h>
> > @@ -1522,5 +1520,3 @@
> > spice_usb_backend_create_emulated_device(SpiceUsbBackend *be,
> >  
> >      return TRUE;
> >  }
> > -
> > -#endif /* USB_REDIR */
> > diff --git a/src/usbutil.c b/src/usbutil.c
> > index 5052ef3..aebed35 100644
> > --- a/src/usbutil.c
> > +++ b/src/usbutil.c
> > @@ -26,7 +26,6 @@
> >  #include <ctype.h>
> >  #include <stdlib.h>
> >  
> > -#ifdef USE_USBREDIR
> >  #include <stdio.h>
> >  #ifdef __linux__
> >  #include <unistd.h>
> > @@ -275,8 +274,6 @@ void spice_usb_util_get_device_strings(int bus, int
> > address,
> >      }
> >  }
> >  
> > -#endif
> > -
> >  #ifdef USBUTIL_TEST
> >  int main()
> >  {
> > diff --git a/src/usbutil.h b/src/usbutil.h
> > index 6c570d9..2f683fa 100644
> > --- a/src/usbutil.h
> > +++ b/src/usbutil.h
> > @@ -21,8 +21,6 @@
> >  #pragma once
> >  
> >  #include <glib.h>
> > -
> > -#ifdef USE_USBREDIR
> >  #include <libusb.h>
> >  
> >  G_BEGIN_DECLS
> > @@ -32,5 +30,3 @@ void spice_usb_util_get_device_strings(int bus, int
> > address,
> >                                         gchar **manufacturer, gchar
> >                                         **product);
> >  
> >  G_END_DECLS
> > -
> > -#endif /* USE_USBREDIR */

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]