2
0
mirror of git://github.com/lxc/lxc synced 2025-08-29 20:59:51 +00:00

build: add more global config variables

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2021-09-13 11:03:34 +02:00
parent c077362de8
commit 73eb5ccc55
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D
2 changed files with 8 additions and 11 deletions

View File

@ -40,6 +40,7 @@ prefixdir = get_option('prefix')
if not prefixdir.startswith('/') if not prefixdir.startswith('/')
error('Prefix is not absolute: "@0@"'.format(prefixdir)) error('Prefix is not absolute: "@0@"'.format(prefixdir))
endif endif
docdir = join_paths(prefixdir, get_option('docdir'))
datadir = join_paths(prefixdir, get_option('datadir')) datadir = join_paths(prefixdir, get_option('datadir'))
bindir = join_paths(prefixdir, get_option('bindir')) bindir = join_paths(prefixdir, get_option('bindir'))
sbindir = join_paths(prefixdir, get_option('sbindir')) sbindir = join_paths(prefixdir, get_option('sbindir'))
@ -57,8 +58,10 @@ lxcpath = get_option('config-path')
globalconfig = get_option('global-config') globalconfig = get_option('global-config')
conf.set_quoted('BINDIR', bindir) conf.set_quoted('BINDIR', bindir)
conf.set_quoted('DOCDIR', docdir)
conf.set_quoted('SBINDIR', sbindir) conf.set_quoted('SBINDIR', sbindir)
conf.set_quoted('INCLUDEDIR', includedir) conf.set_quoted('INCLUDEDIR', includedir)
conf.set_quoted('LOCALSTATEDIR', localstatedir)
conf.set_quoted('LIBDIR', libdir) conf.set_quoted('LIBDIR', libdir)
conf.set_quoted('LIBEXECDIR', libexecdir) conf.set_quoted('LIBEXECDIR', libexecdir)
conf.set_quoted('SYSCONFDIR', sysconfdir) conf.set_quoted('SYSCONFDIR', sysconfdir)
@ -74,22 +77,13 @@ conf.set_quoted('DATADIR', datadir)
conf.set_quoted('LXCTEMPLATECONFIG', join_paths(datadir, 'lxc/config')) conf.set_quoted('LXCTEMPLATECONFIG', join_paths(datadir, 'lxc/config'))
conf.set_quoted('LXCTEMPLATEDIR', join_paths(datadir, 'lxc/templates')) conf.set_quoted('LXCTEMPLATEDIR', join_paths(datadir, 'lxc/templates'))
conf.set_quoted('LXCINITDIR', libexecdir) conf.set_quoted('LXCINITDIR', libexecdir)
conf.set_quoted('LXCHOOKDIR', join_paths(datadir, 'lxc/hooks'))
conf.set_quoted('LXCBINHOOKDIR', join_paths(libexecdir, 'lxc/hooks'))
# AS_AC_EXPAND(DATADIR, "$datadir")
# AS_AC_EXPAND(LOCALSTATEDIR, "$localstatedir")
# AS_AC_EXPAND(DOCDIR, "$docdir")
# AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date --utc --date=@${SOURCE_DATE_EPOCH:-$(date +%s)} '+%Y-%m-%d')") # AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date --utc --date=@${SOURCE_DATE_EPOCH:-$(date +%s)} '+%Y-%m-%d')")
# AS_AC_EXPAND(LXCPATH, "$with_config_path")
# AS_AC_EXPAND(LXC_GLOBAL_CONF, "$with_global_conf")
# AS_AC_EXPAND(LXC_USERNIC_CONF, "$with_usernic_conf") # AS_AC_EXPAND(LXC_USERNIC_CONF, "$with_usernic_conf")
# AS_AC_EXPAND(LXC_USERNIC_DB, "$with_usernic_db") # AS_AC_EXPAND(LXC_USERNIC_DB, "$with_usernic_db")
# AS_AC_EXPAND(LXC_DISTRO_SYSCONF, "$distrosysconf") # AS_AC_EXPAND(LXC_DISTRO_SYSCONF, "$distrosysconf")
# AS_AC_EXPAND(LXCHOOKDIR, "$datadir/lxc/hooks")
# AS_AC_EXPAND(LXCBINHOOKDIR, "$libexecdir/lxc/hooks")
# AS_AC_EXPAND(LXCINITDIR, "$libexecdir")
#
# # We need the install path so criu knows where to reference the hook scripts.
# AC_DEFINE_UNQUOTED([DATADIR], "$DATADIR", ["Prefix for shared files."])
cc = meson.get_compiler('c') cc = meson.get_compiler('c')
pkgconfig = import('pkgconfig') pkgconfig = import('pkgconfig')

View File

@ -27,3 +27,6 @@ option('config-path', type : 'string', value : 'lib/lxc',
option('global-config', type : 'string', value : 'lxc/lxc.conf', option('global-config', type : 'string', value : 'lxc/lxc.conf',
description : 'the rootfs mount directory') description : 'the rootfs mount directory')
option('docdir', type : 'string',
description : 'documentation directory')