mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03: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
|
||||
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)
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -94,7 +94,7 @@ virCapsPtr virLXCDriverCapsInit(virLXCDriverPtr driver)
|
||||
}
|
||||
|
||||
if (!(lxc_path = virFileFindResource("libvirt_lxc",
|
||||
abs_topbuilddir "/src",
|
||||
abs_top_builddir "/src",
|
||||
LIBEXECDIR)))
|
||||
goto error;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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;
|
||||
|
@ -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) \
|
||||
|
@ -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)))
|
||||
|
@ -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
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user