mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
Fix names for abs_top_{src,build}dir variables
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>
This commit is contained in:
parent
cd01258714
commit
c0a4a98eab
@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
# old automake does not provide abs_{src,build}dir variables
|
# old automake does not provide abs_{src,build}dir variables
|
||||||
abs_builddir = $(shell pwd)
|
abs_builddir = $(shell pwd)
|
||||||
abs_topbuilddir = $(shell cd .. && pwd)
|
abs_top_builddir = $(shell cd .. && pwd)
|
||||||
abs_srcdir = $(shell cd $(srcdir) && 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
|
# No libraries with the exception of LIBXML should be listed
|
||||||
# here. List them against the individual XXX_la_CFLAGS targets
|
# here. List them against the individual XXX_la_CFLAGS targets
|
||||||
@ -33,8 +33,8 @@ AM_CPPFLAGS = -I../gnulib/lib \
|
|||||||
-I$(srcdir)/util \
|
-I$(srcdir)/util \
|
||||||
-I./util \
|
-I./util \
|
||||||
-DIN_LIBVIRT \
|
-DIN_LIBVIRT \
|
||||||
-Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \
|
-Dabs_top_builddir="\"$(abs_top_builddir)\"" \
|
||||||
-Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
|
-Dabs_top_srcdir="\"$(abs_top_srcdir)\"" \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
WARN_CFLAGS += $(STRICT_FRAME_LIMIT_CFLAGS)
|
WARN_CFLAGS += $(STRICT_FRAME_LIMIT_CFLAGS)
|
||||||
|
@ -19415,7 +19415,7 @@ virDomainDefParseXML(xmlDocPtr xml,
|
|||||||
VIR_AUTOFREE(char *) schema = NULL;
|
VIR_AUTOFREE(char *) schema = NULL;
|
||||||
|
|
||||||
schema = virFileFindResource("domain.rng",
|
schema = virFileFindResource("domain.rng",
|
||||||
abs_topsrcdir "/docs/schemas",
|
abs_top_srcdir "/docs/schemas",
|
||||||
PKGDATADIR "/schemas");
|
PKGDATADIR "/schemas");
|
||||||
if (!schema)
|
if (!schema)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -96,7 +96,7 @@ cpuMapLoadInclude(const char *filename,
|
|||||||
char *mapfile;
|
char *mapfile;
|
||||||
|
|
||||||
if (!(mapfile = virFileFindResource(filename,
|
if (!(mapfile = virFileFindResource(filename,
|
||||||
abs_topsrcdir "/src/cpu_map",
|
abs_top_srcdir "/src/cpu_map",
|
||||||
PKGDATADIR "/cpu_map")))
|
PKGDATADIR "/cpu_map")))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ int cpuMapLoad(const char *arch,
|
|||||||
char *mapfile;
|
char *mapfile;
|
||||||
|
|
||||||
if (!(mapfile = virFileFindResource("index.xml",
|
if (!(mapfile = virFileFindResource("index.xml",
|
||||||
abs_topsrcdir "/src/cpu_map",
|
abs_top_srcdir "/src/cpu_map",
|
||||||
PKGDATADIR "/cpu_map")))
|
PKGDATADIR "/cpu_map")))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ virDriverLoadModule(const char *name,
|
|||||||
if (!(modfile = virFileFindResourceFull(name,
|
if (!(modfile = virFileFindResourceFull(name,
|
||||||
"libvirt_driver_",
|
"libvirt_driver_",
|
||||||
".so",
|
".so",
|
||||||
abs_topbuilddir "/src/.libs",
|
abs_top_builddir "/src/.libs",
|
||||||
DEFAULT_DRIVER_DIR,
|
DEFAULT_DRIVER_DIR,
|
||||||
"LIBVIRT_DRIVER_DIR")))
|
"LIBVIRT_DRIVER_DIR")))
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -221,7 +221,7 @@ static virNetClientPtr virLockManagerLockDaemonConnectionNew(bool privileged,
|
|||||||
if (!privileged &&
|
if (!privileged &&
|
||||||
!(daemonPath = virFileFindResourceFull("virtlockd",
|
!(daemonPath = virFileFindResourceFull("virtlockd",
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
abs_topbuilddir "/src",
|
abs_top_builddir "/src",
|
||||||
SBINDIR,
|
SBINDIR,
|
||||||
"VIRTLOCKD_PATH")))
|
"VIRTLOCKD_PATH")))
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -141,7 +141,7 @@ virLockManagerPluginPtr virLockManagerPluginNew(const char *name,
|
|||||||
if (!(modfile = virFileFindResourceFull(name,
|
if (!(modfile = virFileFindResourceFull(name,
|
||||||
NULL,
|
NULL,
|
||||||
".so",
|
".so",
|
||||||
abs_topbuilddir "/src/.libs",
|
abs_top_builddir "/src/.libs",
|
||||||
LIBDIR "/libvirt/lock-driver",
|
LIBDIR "/libvirt/lock-driver",
|
||||||
"LIBVIRT_LOCK_MANAGER_PLUGIN_DIR")))
|
"LIBVIRT_LOCK_MANAGER_PLUGIN_DIR")))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -80,7 +80,7 @@ virLogManagerConnect(bool privileged,
|
|||||||
if (!privileged &&
|
if (!privileged &&
|
||||||
!(daemonPath = virFileFindResourceFull("virtlogd",
|
!(daemonPath = virFileFindResourceFull("virtlogd",
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
abs_topbuilddir "/src",
|
abs_top_builddir "/src",
|
||||||
SBINDIR,
|
SBINDIR,
|
||||||
"VIRTLOGD_PATH")))
|
"VIRTLOGD_PATH")))
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -94,7 +94,7 @@ virCapsPtr virLXCDriverCapsInit(virLXCDriverPtr driver)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(lxc_path = virFileFindResource("libvirt_lxc",
|
if (!(lxc_path = virFileFindResource("libvirt_lxc",
|
||||||
abs_topbuilddir "/src",
|
abs_top_builddir "/src",
|
||||||
LIBEXECDIR)))
|
LIBEXECDIR)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -1488,7 +1488,7 @@ networkBuildDhcpDaemonCommandLine(virNetworkDriverStatePtr driver,
|
|||||||
|
|
||||||
/* This helper is used to create custom leases file for libvirt */
|
/* This helper is used to create custom leases file for libvirt */
|
||||||
if (!(leaseshelper_path = virFileFindResource("libvirt_leaseshelper",
|
if (!(leaseshelper_path = virFileFindResource("libvirt_leaseshelper",
|
||||||
abs_topbuilddir "/src",
|
abs_top_builddir "/src",
|
||||||
LIBEXECDIR)))
|
LIBEXECDIR)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -1079,7 +1079,7 @@ doRemoteOpen(virConnectPtr conn,
|
|||||||
if ((flags & VIR_DRV_OPEN_REMOTE_AUTOSTART) &&
|
if ((flags & VIR_DRV_OPEN_REMOTE_AUTOSTART) &&
|
||||||
!(daemonPath = virFileFindResourceFull("libvirtd",
|
!(daemonPath = virFileFindResourceFull("libvirtd",
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
abs_topbuilddir "/src",
|
abs_top_builddir "/src",
|
||||||
SBINDIR,
|
SBINDIR,
|
||||||
"LIBVIRTD_PATH")))
|
"LIBVIRTD_PATH")))
|
||||||
goto failed;
|
goto failed;
|
||||||
|
@ -92,7 +92,7 @@ virStorageDriverLoadBackendModule(const char *name,
|
|||||||
if (!(modfile = virFileFindResourceFull(name,
|
if (!(modfile = virFileFindResourceFull(name,
|
||||||
"libvirt_storage_backend_",
|
"libvirt_storage_backend_",
|
||||||
".so",
|
".so",
|
||||||
abs_topbuilddir "/src/.libs",
|
abs_top_builddir "/src/.libs",
|
||||||
STORAGE_BACKEND_MODULE_DIR,
|
STORAGE_BACKEND_MODULE_DIR,
|
||||||
"LIBVIRT_STORAGE_BACKEND_DIR")))
|
"LIBVIRT_STORAGE_BACKEND_DIR")))
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -363,7 +363,7 @@ virStorageBackendDiskReadPartitions(virStoragePoolObjPtr pool,
|
|||||||
VIR_AUTOPTR(virCommand) cmd = NULL;
|
VIR_AUTOPTR(virCommand) cmd = NULL;
|
||||||
|
|
||||||
if (!(parthelper_path = virFileFindResource("libvirt_parthelper",
|
if (!(parthelper_path = virFileFindResource("libvirt_parthelper",
|
||||||
abs_topbuilddir "/src",
|
abs_top_builddir "/src",
|
||||||
LIBEXECDIR)))
|
LIBEXECDIR)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -417,7 +417,7 @@ virStorageBackendDiskReadGeometry(virStoragePoolObjPtr pool)
|
|||||||
VIR_AUTOPTR(virCommand) cmd = NULL;
|
VIR_AUTOPTR(virCommand) cmd = NULL;
|
||||||
|
|
||||||
if (!(parthelper_path = virFileFindResource("libvirt_parthelper",
|
if (!(parthelper_path = virFileFindResource("libvirt_parthelper",
|
||||||
abs_topbuilddir "/src",
|
abs_top_builddir "/src",
|
||||||
LIBEXECDIR)))
|
LIBEXECDIR)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ virFileWrapperFdNew(int *fd, const char *name, unsigned int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(iohelper_path = virFileFindResource("libvirt_iohelper",
|
if (!(iohelper_path = virFileFindResource("libvirt_iohelper",
|
||||||
abs_topbuilddir "/src",
|
abs_top_builddir "/src",
|
||||||
LIBEXECDIR)))
|
LIBEXECDIR)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
@ -1704,7 +1704,7 @@ static bool useDirOverride;
|
|||||||
* @prefix: optional string to prepend to filename
|
* @prefix: optional string to prepend to filename
|
||||||
* @suffix: optional string to append to filename
|
* @suffix: optional string to append to filename
|
||||||
* @builddir: location of the filename in the build tree including
|
* @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
|
* @installdir: location of the installed binary
|
||||||
* @envname: environment variable used to override all dirs
|
* @envname: environment variable used to override all dirs
|
||||||
*
|
*
|
||||||
|
@ -57,7 +57,7 @@ virStorageFileLoadBackendModule(const char *name,
|
|||||||
if (!(modfile = virFileFindResourceFull(name,
|
if (!(modfile = virFileFindResourceFull(name,
|
||||||
"libvirt_storage_file_",
|
"libvirt_storage_file_",
|
||||||
".so",
|
".so",
|
||||||
abs_topbuilddir "/src/.libs",
|
abs_top_builddir "/src/.libs",
|
||||||
STORAGE_FILE_MODULE_DIR,
|
STORAGE_FILE_MODULE_DIR,
|
||||||
"LIBVIRT_STORAGE_FILE_DIR")))
|
"LIBVIRT_STORAGE_FILE_DIR")))
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
# old automake does not provide abs_{src,build}dir variables
|
# old automake does not provide abs_{src,build}dir variables
|
||||||
abs_builddir = $(shell pwd)
|
abs_builddir = $(shell pwd)
|
||||||
abs_topbuilddir = $(shell cd .. && pwd)
|
abs_top_builddir = $(shell cd .. && pwd)
|
||||||
abs_srcdir = $(shell cd $(srcdir) && 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)
|
SHELL = $(PREFERABLY_POSIX_SHELL)
|
||||||
|
|
||||||
@ -37,9 +37,9 @@ WARN_CFLAGS += $(RELAXED_FRAME_LIMIT_CFLAGS)
|
|||||||
|
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = \
|
||||||
-Dabs_builddir="\"$(abs_builddir)\"" \
|
-Dabs_builddir="\"$(abs_builddir)\"" \
|
||||||
-Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \
|
-Dabs_top_builddir="\"$(abs_top_builddir)\"" \
|
||||||
-Dabs_srcdir="\"$(abs_srcdir)\"" \
|
-Dabs_srcdir="\"$(abs_srcdir)\"" \
|
||||||
-Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
|
-Dabs_top_srcdir="\"$(abs_top_srcdir)\"" \
|
||||||
$(LIBXML_CFLAGS) \
|
$(LIBXML_CFLAGS) \
|
||||||
$(LIBNL_CFLAGS) \
|
$(LIBNL_CFLAGS) \
|
||||||
$(GNUTLS_CFLAGS) \
|
$(GNUTLS_CFLAGS) \
|
||||||
|
@ -148,7 +148,7 @@ testSchemaGrammar(const void *opaque)
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
if (virAsprintf(&schema_path, "%s/docs/schemas/%s",
|
if (virAsprintf(&schema_path, "%s/docs/schemas/%s",
|
||||||
abs_topsrcdir, data->schema) < 0)
|
abs_top_srcdir, data->schema) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!(data->validator = virXMLValidatorInit(schema_path)))
|
if (!(data->validator = virXMLValidatorInit(schema_path)))
|
||||||
|
@ -82,13 +82,13 @@ testCompareOutputLit(const char *expectData,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
# define VIRSH_DEFAULT abs_topbuilddir "/tools/virsh", \
|
# define VIRSH_DEFAULT abs_top_builddir "/tools/virsh", \
|
||||||
"--connect", \
|
"--connect", \
|
||||||
"test:///default"
|
"test:///default"
|
||||||
|
|
||||||
static char *custom_uri;
|
static char *custom_uri;
|
||||||
|
|
||||||
# define VIRSH_CUSTOM abs_topbuilddir "/tools/virsh", \
|
# define VIRSH_CUSTOM abs_top_builddir "/tools/virsh", \
|
||||||
"--connect", \
|
"--connect", \
|
||||||
custom_uri
|
custom_uri
|
||||||
|
|
||||||
|
@ -161,8 +161,8 @@ checkPath(const char *path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!STRPREFIX(path, abs_topsrcdir) &&
|
if (!STRPREFIX(path, abs_top_srcdir) &&
|
||||||
!STRPREFIX(path, abs_topbuilddir)) {
|
!STRPREFIX(path, abs_top_builddir)) {
|
||||||
printFile(path, func);
|
printFile(path, func);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user