[libvirt] [PATCH 10/29] remote: refactor & rename variables for building libvirtd
Daniel P. Berrangé
berrange at redhat.com
Fri Jul 12 13:48:54 UTC 2019
On Fri, Jul 12, 2019 at 03:36:58PM +0200, Michal Privoznik wrote:
> On 7/11/19 6:04 PM, Daniel P. Berrangé wrote:
> > The same make variables will be useful for building both libvirtd and
> > the split daemons, so refactor & rename variables to facilitate reuse.
> >
> > Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> > ---
> > src/remote/Makefile.inc.am | 95 ++++++++++++++++++++------------------
> > 1 file changed, 51 insertions(+), 44 deletions(-)
> >
> > diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am
> > index 7732fa744c..43ad53bedb 100644
> > --- a/src/remote/Makefile.inc.am
> > +++ b/src/remote/Makefile.inc.am
> > @@ -18,13 +18,13 @@ REMOTE_DRIVER_SOURCES = \
> > $(REMOTE_DRIVER_GENERATED) \
> > $(NULL)
> > -LIBVIRTD_GENERATED = \
> > +REMOTE_DAEMON_GENERATED = \
> > remote/remote_daemon_dispatch_stubs.h \
> > remote/remote_daemon_dispatch_lxc_stubs.h \
> > remote/remote_daemon_dispatch_qemu_stubs.h \
> > $(NULL)
> > -LIBVIRTD_SOURCES = \
> > +REMOTE_DAEMON_SOURCES = \
> > remote/remote_daemon.c \
> > remote/remote_daemon.h \
> > remote/remote_daemon_config.c \
> > @@ -33,9 +33,50 @@ LIBVIRTD_SOURCES = \
> > remote/remote_daemon_dispatch.h \
> > remote/remote_daemon_stream.c \
> > remote/remote_daemon_stream.h \
> > - $(LIBVIRTD_GENERATED) \
> > + $(REMOTE_DAEMON_GENERATED) \
> > $(NULL)
> > +REMOTE_DAEMON_CFLAGS = \
> > + $(LIBXML_CFLAGS) \
> > + $(GNUTLS_CFLAGS) \
> > + $(SASL_CFLAGS) \
> > + $(XDR_CFLAGS) \
> > + $(DBUS_CFLAGS) \
> > + $(LIBNL_CFLAGS) \
> > + $(WARN_CFLAGS) \
> > + $(PIE_CFLAGS) \
> > + -I$(srcdir)/access \
> > + -I$(srcdir)/conf \
> > + -I$(srcdir)/rpc \
> > + $(NULL)
> > +
> > +REMOTE_DAEMON_LDFLAGS = \
> > + $(RELRO_LDFLAGS) \
> > + $(PIE_LDFLAGS) \
> > + $(NO_INDIRECT_LDFLAGS) \
> > + $(NO_UNDEFINED_LDFLAGS) \
> > + $(NULL)
> > +
> > +REMOTE_DAEMON_LDADD = \
> > + libvirt_driver_admin.la \
> > + libvirt-lxc.la \
> > + libvirt-qemu.la \
> > + libvirt.la \
> > + $(LIBXML_LIBS) \
> > + $(GNUTLS_LIBS) \
> > + $(SASL_LIBS) \
> > + $(DBUS_LIBS) \
> > + $(LIBNL_LIBS) \
> > + $(NULL)
>
> These variables need to be moved to src/Makefile.am because other Makefiles
> will use it. For instance the very next patch uses REMOTE_DAEMON_LDFLAGS
> which is not declared for src/secret/Makefile.inc.am
That's not a problem actually. The src/*/Makefile.inc.am files are
included into the top level src/Makefile, so whatever variables are
defined in src/remote/Makefile.in.am, are visible to all other
src/*/Makefile.in.am files that get included afterwards.
> Also, automake complains about the following (after I've moved the
> variable):
>
> src/Makefile.am:56: warning: variable 'REMOTE_DAEMON_LDFLAGS' is defined but
> no program or
> src/Makefile.am:56: library has 'REMOTE_DAEMON' as canonical name (possible
> typo)
Oh yes, that's one of the things I needed to figure out a solution for.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list