Most of the types in datatypes.[hc] depend on virObject and virClass,
but they were specified separatedly from that.  We were lucky enough for
this to work because wherever the datatypes files were used, that
file (binary/shared object) was linked to libvirt_util as well.

Fixing this comes up as a pretty nice cleanup.

Signed-off-by: Martin Kletzander <[email protected]>
---
 src/Makefile.am | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 91a4c17..84f489f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in

-## Copyright (C) 2005-2014 Red Hat, Inc.
+## Copyright (C) 2005-2015 Red Hat, Inc.
 ##
 ## This library is free software; you can redistribute it and/or
 ## modify it under the terms of the GNU Lesser General Public
@@ -86,9 +86,12 @@ augeas_DATA =
 augeastestdir = $(datadir)/augeas/lenses/tests
 augeastest_DATA =

+DATATYPES_SOURCES = datatypes.h datatypes.c
+
 # These files are not related to driver APIs. Simply generic
 # helper APIs for various purposes
 UTIL_SOURCES =                                                 \
+               $(DATATYPES_SOURCES)                            \
                util/viralloc.c util/viralloc.h                 \
                util/virarch.h util/virarch.c                   \
                util/viratomic.h util/viratomic.c               \
@@ -185,7 +188,6 @@ util/virkeymaps.h: $(srcdir)/util/keymaps.csv       \

 # Internal generic driver infrastructure
 NODE_INFO_SOURCES = nodeinfo.h nodeinfo.c nodeinfopriv.h
-DATATYPES_SOURCES = datatypes.h datatypes.c
 DRIVER_SOURCES =                                                       \
                driver.c driver.h                                       \
                driver-hypervisor.h                                     \
@@ -198,7 +200,6 @@ DRIVER_SOURCES =                                            
        \
                driver-storage.h                                        \
                driver-stream.h                                         \
                internal.h                                              \
-               $(DATATYPES_SOURCES)                                    \
                fdstream.c fdstream.h                                   \
                $(NODE_INFO_SOURCES)                                    \
                libvirt.c libvirt_internal.h                            \
@@ -671,10 +672,6 @@ LXC_CONTROLLER_SOURCES =                                   
\
                lxc/lxc_fuse.c lxc/lxc_fuse.h                   \
                lxc/lxc_controller.c

-SECURITY_DRIVER_APPARMOR_HELPER_SOURCES =                      \
-               $(DATATYPES_SOURCES)                            \
-               security/virt-aa-helper.c
-
 PHYP_DRIVER_SOURCES =                                          \
                phyp/phyp_driver.c phyp/phyp_driver.h

@@ -2604,8 +2601,7 @@ libexec_PROGRAMS += libvirt_lxc

 libvirt_lxc_SOURCES =                                          \
                $(LXC_CONTROLLER_SOURCES)                       \
-               $(NODE_INFO_SOURCES)                            \
-               $(DATATYPES_SOURCES)
+               $(NODE_INFO_SOURCES)
 libvirt_lxc_LDFLAGS = \
                $(AM_LDFLAGS) \
                $(PIE_LDFLAGS) \
@@ -2643,7 +2639,7 @@ if WITH_SECDRIVER_APPARMOR
 if WITH_LIBVIRTD
 libexec_PROGRAMS += virt-aa-helper

-virt_aa_helper_SOURCES = $(SECURITY_DRIVER_APPARMOR_HELPER_SOURCES)
+virt_aa_helper_SOURCES = security/virt-aa-helper.c

 virt_aa_helper_LDFLAGS = \
                $(AM_LDFLAGS) \
@@ -2666,7 +2662,7 @@ virt_aa_helper_CFLAGS =                                   
        \
                $(NULL)
 endif WITH_LIBVIRTD
 endif WITH_SECDRIVER_APPARMOR
-EXTRA_DIST += $(SECURITY_DRIVER_APPARMOR_HELPER_SOURCES)
+EXTRA_DIST += security/virt-aa-helper.c

 install-data-local: install-init install-systemd
 if WITH_LIBVIRTD
-- 
2.3.5

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to