]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix names for abs_top_{src,build}dir variables
authorAndrea Bolognani <abologna@redhat.com>
Tue, 12 Mar 2019 14:11:47 +0000 (15:11 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Thu, 14 Mar 2019 09:05:28 +0000 (10:05 +0100)
According to the official documentation for autoconf[1], the
correct names for these variables are abs_top_{src,build}dir
rather than abs_top{src,build}dir; in fact, we're already
using the correct names in various places, so let's just make
everything nice and consistent.

[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Preset-Output-Variables.html

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
18 files changed:
src/Makefile.am
src/conf/domain_conf.c
src/cpu/cpu_map.c
src/driver.c
src/locking/lock_driver_lockd.c
src/locking/lock_manager.c
src/logging/log_manager.c
src/lxc/lxc_conf.c
src/network/bridge_driver.c
src/remote/remote_driver.c
src/storage/storage_backend.c
src/storage/storage_backend_disk.c
src/util/virfile.c
src/util/virstoragefilebackend.c
tests/Makefile.am
tests/virschematest.c
tests/virshtest.c
tests/virtestmock.c

index 8c8dfe3dcf938c0217f5e7812a7bee683b59c33c..0d3d2318895a09631d335d556d643f97b5817104 100644 (file)
@@ -18,9 +18,9 @@
 
 # old automake does not provide abs_{src,build}dir variables
 abs_builddir = $(shell pwd)
-abs_topbuilddir = $(shell cd .. && pwd)
+abs_top_builddir = $(shell cd .. && pwd)
 abs_srcdir = $(shell cd $(srcdir) && pwd)
-abs_topsrcdir = $(shell cd $(top_srcdir) && pwd)
+abs_top_srcdir = $(shell cd $(top_srcdir) && pwd)
 
 # No libraries with the exception of LIBXML should be listed
 # here. List them against the individual XXX_la_CFLAGS targets
@@ -33,8 +33,8 @@ AM_CPPFLAGS = -I../gnulib/lib \
                -I$(srcdir)/util \
                -I./util \
                -DIN_LIBVIRT \
-               -Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \
-               -Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
+               -Dabs_top_builddir="\"$(abs_top_builddir)\"" \
+               -Dabs_top_srcdir="\"$(abs_top_srcdir)\"" \
                $(NULL)
 
 WARN_CFLAGS += $(STRICT_FRAME_LIMIT_CFLAGS)
index 356a9ae56cdf31a8c6f5305bc0e6ecebf2d7b4b8..b77f536ca569664483f0e97797703fd95e26558b 100644 (file)
@@ -19415,7 +19415,7 @@ virDomainDefParseXML(xmlDocPtr xml,
         VIR_AUTOFREE(char *) schema = NULL;
 
         schema = virFileFindResource("domain.rng",
-                                     abs_topsrcdir "/docs/schemas",
+                                     abs_top_srcdir "/docs/schemas",
                                      PKGDATADIR "/schemas");
         if (!schema)
             return NULL;
index 83151c1c549ca7e8ce656e6de53d5dfa80fd8c85..cb9f7c243f086774802f4dc420ed627394800325 100644 (file)
@@ -96,7 +96,7 @@ cpuMapLoadInclude(const char *filename,
     char *mapfile;
 
     if (!(mapfile = virFileFindResource(filename,
-                                        abs_topsrcdir "/src/cpu_map",
+                                        abs_top_srcdir "/src/cpu_map",
                                         PKGDATADIR "/cpu_map")))
         return -1;
 
@@ -185,7 +185,7 @@ int cpuMapLoad(const char *arch,
     char *mapfile;
 
     if (!(mapfile = virFileFindResource("index.xml",
-                                        abs_topsrcdir "/src/cpu_map",
+                                        abs_top_srcdir "/src/cpu_map",
                                         PKGDATADIR "/cpu_map")))
         return -1;
 
index 8b5ade763f7725c5f80a5b4ea132bc8c7792a6a2..5e8f68f6df517adaa9a44730c68037203f74d26c 100644 (file)
@@ -54,7 +54,7 @@ virDriverLoadModule(const char *name,
     if (!(modfile = virFileFindResourceFull(name,
                                             "libvirt_driver_",
                                             ".so",
-                                            abs_topbuilddir "/src/.libs",
+                                            abs_top_builddir "/src/.libs",
                                             DEFAULT_DRIVER_DIR,
                                             "LIBVIRT_DRIVER_DIR")))
         return -1;
index 4ffa92fc9b570704afc2303a431800de0877949e..f6371f30503b9d2a3154ebd9e071e8a2fa09aaa2 100644 (file)
@@ -221,7 +221,7 @@ static virNetClientPtr virLockManagerLockDaemonConnectionNew(bool privileged,
     if (!privileged &&
         !(daemonPath = virFileFindResourceFull("virtlockd",
                                                NULL, NULL,
-                                               abs_topbuilddir "/src",
+                                               abs_top_builddir "/src",
                                                SBINDIR,
                                                "VIRTLOCKD_PATH")))
         goto error;
index d421b6acfc151dfa8236c582bf851a7dd3be13c0..1c8705ab116047398b8849e555a1e52a94e76eb0 100644 (file)
@@ -141,7 +141,7 @@ virLockManagerPluginPtr virLockManagerPluginNew(const char *name,
         if (!(modfile = virFileFindResourceFull(name,
                                                 NULL,
                                                 ".so",
-                                                abs_topbuilddir "/src/.libs",
+                                                abs_top_builddir "/src/.libs",
                                                 LIBDIR "/libvirt/lock-driver",
                                                 "LIBVIRT_LOCK_MANAGER_PLUGIN_DIR")))
             goto cleanup;
index cd7935802d8bc738ef563b033b0d00fac1284008..eb0a32b4b62e49926581e138f946c1d9a7167049 100644 (file)
@@ -80,7 +80,7 @@ virLogManagerConnect(bool privileged,
     if (!privileged &&
         !(daemonPath = virFileFindResourceFull("virtlogd",
                                                NULL, NULL,
-                                               abs_topbuilddir "/src",
+                                               abs_top_builddir "/src",
                                                SBINDIR,
                                                "VIRTLOGD_PATH")))
         goto error;
index 4720c99793890b8b752bdca510c6c8235a27f5f3..2e4cc4f51a4a76efe269a709810e5e30be77f1d1 100644 (file)
@@ -94,7 +94,7 @@ virCapsPtr virLXCDriverCapsInit(virLXCDriverPtr driver)
     }
 
     if (!(lxc_path = virFileFindResource("libvirt_lxc",
-                                         abs_topbuilddir "/src",
+                                         abs_top_builddir "/src",
                                          LIBEXECDIR)))
         goto error;
 
index c3e1381124121f534a743c6bbe57693872976739..6789dafd157f6da501bc69fe5555602fa7211ea9 100644 (file)
@@ -1488,7 +1488,7 @@ networkBuildDhcpDaemonCommandLine(virNetworkDriverStatePtr driver,
 
     /* This helper is used to create custom leases file for libvirt */
     if (!(leaseshelper_path = virFileFindResource("libvirt_leaseshelper",
-                                                  abs_topbuilddir "/src",
+                                                  abs_top_builddir "/src",
                                                   LIBEXECDIR)))
         goto cleanup;
 
index eabe7a38239de9ef1fc3a09d84e7bd2f7906fd1e..5c4dd41227ff32f19bc5a6a544ea9fee42e2fe6a 100644 (file)
@@ -1079,7 +1079,7 @@ doRemoteOpen(virConnectPtr conn,
         if ((flags & VIR_DRV_OPEN_REMOTE_AUTOSTART) &&
             !(daemonPath = virFileFindResourceFull("libvirtd",
                                                    NULL, NULL,
-                                                   abs_topbuilddir "/src",
+                                                   abs_top_builddir "/src",
                                                    SBINDIR,
                                                    "LIBVIRTD_PATH")))
             goto failed;
index 295d8de4796b72f6c979b9c282cf2ef0f4303d5d..ed5bdd5bad906c91dcbd2d0a6c984691b805ad02 100644 (file)
@@ -92,7 +92,7 @@ virStorageDriverLoadBackendModule(const char *name,
     if (!(modfile = virFileFindResourceFull(name,
                                             "libvirt_storage_backend_",
                                             ".so",
-                                            abs_topbuilddir "/src/.libs",
+                                            abs_top_builddir "/src/.libs",
                                             STORAGE_BACKEND_MODULE_DIR,
                                             "LIBVIRT_STORAGE_BACKEND_DIR")))
         return -1;
index 4c5b784ca7810f249e6db8c675ae25e3c478ba43..9b94d26cf96a80fe9d151bfe8cbc93d9d75b2e98 100644 (file)
@@ -363,7 +363,7 @@ virStorageBackendDiskReadPartitions(virStoragePoolObjPtr pool,
     VIR_AUTOPTR(virCommand) cmd = NULL;
 
     if (!(parthelper_path = virFileFindResource("libvirt_parthelper",
-                                                abs_topbuilddir "/src",
+                                                abs_top_builddir "/src",
                                                 LIBEXECDIR)))
         return -1;
 
@@ -417,7 +417,7 @@ virStorageBackendDiskReadGeometry(virStoragePoolObjPtr pool)
     VIR_AUTOPTR(virCommand) cmd = NULL;
 
     if (!(parthelper_path = virFileFindResource("libvirt_parthelper",
-                                                abs_topbuilddir "/src",
+                                                abs_top_builddir "/src",
                                                 LIBEXECDIR)))
         return -1;
 
index a4c6d184af9f06ea248aff99dbf2ecb81f0f3d91..ec8d85929c3b6be851aa9f79b6c9009eb7f740b7 100644 (file)
@@ -260,7 +260,7 @@ virFileWrapperFdNew(int *fd, const char *name, unsigned int flags)
     }
 
     if (!(iohelper_path = virFileFindResource("libvirt_iohelper",
-                                              abs_topbuilddir "/src",
+                                              abs_top_builddir "/src",
                                               LIBEXECDIR)))
         goto error;
 
@@ -1704,7 +1704,7 @@ static bool useDirOverride;
  * @prefix: optional string to prepend to filename
  * @suffix: optional string to append to filename
  * @builddir: location of the filename in the build tree including
- *            abs_topsrcdir or abs_topbuilddir prefix
+ *            abs_top_srcdir or abs_top_builddir prefix
  * @installdir: location of the installed binary
  * @envname: environment variable used to override all dirs
  *
index 9acaea2f81a658e7c841f80d60b68ac94d96bfe5..f362436d9ba683558a8bd9227d5ec835401df151 100644 (file)
@@ -57,7 +57,7 @@ virStorageFileLoadBackendModule(const char *name,
     if (!(modfile = virFileFindResourceFull(name,
                                             "libvirt_storage_file_",
                                             ".so",
-                                            abs_topbuilddir "/src/.libs",
+                                            abs_top_builddir "/src/.libs",
                                             STORAGE_FILE_MODULE_DIR,
                                             "LIBVIRT_STORAGE_FILE_DIR")))
         return -1;
index 237336d648bc23267adba75be1aac947e91f5a1e..42ec64755de6475c00d38e6c4c8392471350fbeb 100644 (file)
@@ -18,9 +18,9 @@
 
 # old automake does not provide abs_{src,build}dir variables
 abs_builddir = $(shell pwd)
-abs_topbuilddir = $(shell cd .. && pwd)
+abs_top_builddir = $(shell cd .. && pwd)
 abs_srcdir = $(shell cd $(srcdir) && pwd)
-abs_topsrcdir = $(shell cd $(top_srcdir) && pwd)
+abs_top_srcdir = $(shell cd $(top_srcdir) && pwd)
 
 SHELL = $(PREFERABLY_POSIX_SHELL)
 
@@ -37,9 +37,9 @@ WARN_CFLAGS += $(RELAXED_FRAME_LIMIT_CFLAGS)
 
 AM_CFLAGS = \
        -Dabs_builddir="\"$(abs_builddir)\"" \
-       -Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \
+       -Dabs_top_builddir="\"$(abs_top_builddir)\"" \
        -Dabs_srcdir="\"$(abs_srcdir)\"" \
-       -Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
+       -Dabs_top_srcdir="\"$(abs_top_srcdir)\"" \
        $(LIBXML_CFLAGS) \
        $(LIBNL_CFLAGS) \
        $(GNUTLS_CFLAGS) \
index 8dfab5e2a3351fd10c56bd8a1eab7df71226fcc1..56bdcb2f883fcad5682623ac42c3f2082887f5e6 100644 (file)
@@ -148,7 +148,7 @@ testSchemaGrammar(const void *opaque)
     int ret = -1;
 
     if (virAsprintf(&schema_path, "%s/docs/schemas/%s",
-                    abs_topsrcdir, data->schema) < 0)
+                    abs_top_srcdir, data->schema) < 0)
         return -1;
 
     if (!(data->validator = virXMLValidatorInit(schema_path)))
index d77d3d81d49ee51b0bba620fdc4b9899d83bd4dd..7e59ad7da64a7367fee86a501a1351c76a6bd6a6 100644 (file)
@@ -82,13 +82,13 @@ testCompareOutputLit(const char *expectData,
     return result;
 }
 
-# define VIRSH_DEFAULT abs_topbuilddir "/tools/virsh", \
+# define VIRSH_DEFAULT abs_top_builddir "/tools/virsh", \
     "--connect", \
     "test:///default"
 
 static char *custom_uri;
 
-# define VIRSH_CUSTOM  abs_topbuilddir "/tools/virsh", \
+# define VIRSH_CUSTOM  abs_top_builddir "/tools/virsh", \
     "--connect", \
     custom_uri
 
index 1cafbec0d505edc4f76cf4261abc7780f0d30021..3049c907898148ef0b0c8271f61a0fba33384662 100644 (file)
@@ -161,8 +161,8 @@ checkPath(const char *path,
     }
 
 
-    if (!STRPREFIX(path, abs_topsrcdir) &&
-        !STRPREFIX(path, abs_topbuilddir)) {
+    if (!STRPREFIX(path, abs_top_srcdir) &&
+        !STRPREFIX(path, abs_top_builddir)) {
         printFile(path, func);
     }