meson: use join_paths consistently

With -Dsplit-usr=true, we set rootprefix to /. This leads to //lib/systemd or
//lib/udev for various dir variables. Using join_paths() avoids this.
This commit is contained in:
Michael Biebl 2017-04-13 10:30:56 -04:00 committed by Zbigniew Jędrzejewski-Szmek
parent 082ef2adbd
commit e17e5ba9bf
16 changed files with 110 additions and 110 deletions

View file

@ -24,5 +24,5 @@ if conf.get('ENABLE_HWDB', 0) == 1
install_dir : udevhwdbdir) install_dir : udevhwdbdir)
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format(sysconfdir + '/udev/hwdb.d')) mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
endif endif

View file

@ -52,7 +52,7 @@ foreach tuple : manpages
htmlaliases += [alias + '.html'] htmlaliases += [alias + '.html']
endforeach endforeach
mandirn = get_option('mandir') + '/man' + section mandirn = join_paths(get_option('mandir'), 'man' + section)
have = condition == '' or conf.get(condition, 0) == 1 have = condition == '' or conf.get(condition, 0) == 1
@ -74,7 +74,7 @@ foreach tuple : manpages
command : [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags + [custom_html_xsl, '@INPUT@'], command : [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags + [custom_html_xsl, '@INPUT@'],
depend_files : custom_entities_ent, depend_files : custom_entities_ent,
install : want_html, install : want_html,
install_dir : docdir + '/html') install_dir : join_paths(docdir, 'html'))
html_pages += [p2] html_pages += [p2]
source_xml_files += files(tuple[0] + '.xml') source_xml_files += files(tuple[0] + '.xml')
@ -107,7 +107,7 @@ foreach tuple : [['systemd.directives', '7', systemd_directives_xml],
html = stem + '.html' html = stem + '.html'
man = stem + '.' + section man = stem + '.' + section
mandirn = get_option('mandir') + '/man' + section mandirn = join_paths(get_option('mandir'), 'man' + section)
p1 = custom_target( p1 = custom_target(
man, man,
@ -124,7 +124,7 @@ foreach tuple : [['systemd.directives', '7', systemd_directives_xml],
output : html, output : html,
command : [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags + [custom_html_xsl, '@INPUT@'], command : [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags + [custom_html_xsl, '@INPUT@'],
install : want_html, install : want_html,
install_dir : docdir + '/html') install_dir : join_paths(docdir, 'html'))
html_pages += [p2] html_pages += [p2]
endforeach endforeach

View file

@ -66,118 +66,118 @@ if rootlibdir == ''
endif endif
# Dirs of external packages # Dirs of external packages
pkgconfigdatadir = datadir + '/pkgconfig' pkgconfigdatadir = join_paths(datadir, 'pkgconfig')
pkgconfiglibdir = libdir + '/pkgconfig' pkgconfiglibdir = join_paths(libdir, 'pkgconfig')
polkitpolicydir = datadir + '/polkit-1/actions' polkitpolicydir = join_paths(datadir, 'polkit-1/actions')
polkitrulesdir = datadir + '/polkit-1/rules.d' polkitrulesdir = join_paths(datadir, 'polkit-1/rules.d')
polkitpkladir = localstatedir + '/lib/polkit-1/localauthority/10-vendor.d' polkitpkladir = join_paths(localstatedir, 'lib/polkit-1/localauthority/10-vendor.d')
varlogdir = localstatedir + '/log' varlogdir = join_paths(localstatedir, 'log')
xinitrcdir = sysconfdir + '/X11/xinit/xinitrc.d' xinitrcdir = join_paths(sysconfdir, 'X11/xinit/xinitrc.d')
rpmmacrosdir = get_option('rpmmacrosdir') rpmmacrosdir = get_option('rpmmacrosdir')
# Our own paths # Our own paths
pkgdatadir = datadir + '/systemd' pkgdatadir = join_paths(datadir, 'systemd')
environmentdir = prefixdir + '/lib/environment.d' environmentdir = join_paths(prefixdir, 'lib/environment.d')
pkgsysconfdir = sysconfdir + '/systemd' pkgsysconfdir = join_paths(sysconfdir, 'systemd')
userunitdir = prefixdir + '/lib/systemd/user' userunitdir = join_paths(prefixdir, 'lib/systemd/user')
userpresetdir = prefixdir + '/lib/systemd/user-preset' userpresetdir = join_paths(prefixdir, 'lib/systemd/user-preset')
tmpfilesdir = prefixdir + '/lib/tmpfiles.d' tmpfilesdir = join_paths(prefixdir, 'lib/tmpfiles.d')
sysusersdir = prefixdir + '/lib/sysusers.d' sysusersdir = join_paths(prefixdir, 'lib/sysusers.d')
sysctldir = prefixdir + '/lib/sysctl.d' sysctldir = join_paths(prefixdir, 'lib/sysctl.d')
binfmtdir = prefixdir + '/lib/binfmt.d' binfmtdir = join_paths(prefixdir, 'lib/binfmt.d')
modulesloaddir = prefixdir + '/lib/modules-load.d' modulesloaddir = join_paths(prefixdir, 'lib/modules-load.d')
networkdir = rootprefixdir + '/lib/systemd/network' networkdir = join_paths(rootprefixdir, 'lib/systemd/network')
pkgincludedir = includedir + '/systemd' pkgincludedir = join_paths(includedir, 'systemd')
systemgeneratordir = rootlibexecdir + '/system-generators' systemgeneratordir = join_paths(rootlibexecdir, 'system-generators')
usergeneratordir = prefixdir + '/lib/systemd/user-generators' usergeneratordir = join_paths(prefixdir, 'lib/systemd/user-generators')
systemenvgeneratordir = prefixdir + '/lib/systemd/system-environment-generators' systemenvgeneratordir = join_paths(prefixdir, 'lib/systemd/system-environment-generators')
userenvgeneratordir = prefixdir + '/lib/systemd/user-environment-generators' userenvgeneratordir = join_paths(prefixdir, 'lib/systemd/user-environment-generators')
systemshutdowndir = rootlibexecdir + '/system-shutdown' systemshutdowndir = join_paths(rootlibexecdir, 'system-shutdown')
systemsleepdir = rootlibexecdir + '/system-sleep' systemsleepdir = join_paths(rootlibexecdir, 'system-sleep')
systemunitdir = rootprefixdir + '/lib/systemd/system' systemunitdir = join_paths(rootprefixdir, 'lib/systemd/system')
systempresetdir = rootprefixdir + '/lib/systemd/system-preset' systempresetdir = join_paths(rootprefixdir, 'lib/systemd/system-preset')
udevlibexecdir = rootprefixdir + '/lib/udev' udevlibexecdir = join_paths(rootprefixdir, 'lib/udev')
udevhomedir = udevlibexecdir + '' udevhomedir = udevlibexecdir
udevrulesdir = udevlibexecdir + '/rules.d' udevrulesdir = join_paths(udevlibexecdir, 'rules.d')
udevhwdbdir = udevlibexecdir + '/hwdb.d' udevhwdbdir = join_paths(udevlibexecdir, 'hwdb.d')
catalogdir = prefixdir + '/lib/systemd/catalog' catalogdir = join_paths(prefixdir, 'lib/systemd/catalog')
kernelinstalldir = prefixdir + '/lib/kernel/install.d' kernelinstalldir = join_paths(prefixdir, 'lib/kernel/install.d')
factorydir = datadir + '/factory' factorydir = join_paths(datadir, 'factory')
docdir = datadir + '/doc/systemd' docdir = join_paths(datadir, 'doc/systemd')
bootlibdir = prefixdir + '/lib/systemd/boot/efi' bootlibdir = join_paths(prefixdir, 'lib/systemd/boot/efi')
testsdir = prefixdir + '/lib/systemd/tests' testsdir = join_paths(prefixdir, 'lib/systemd/tests')
systemdstatedir = localstatedir + '/lib/systemd' systemdstatedir = join_paths(localstatedir, 'lib/systemd')
catalogstatedir = systemdstatedir + '/catalog' catalogstatedir = join_paths(systemdstatedir, 'catalog')
randomseeddir = localstatedir + '/lib/systemd' randomseeddir = join_paths(localstatedir, 'lib/systemd')
dbuspolicydir = get_option('dbuspolicydir') dbuspolicydir = get_option('dbuspolicydir')
if dbuspolicydir == '' if dbuspolicydir == ''
dbuspolicydir = datadir + '/dbus-1/system.d' dbuspolicydir = join_paths(datadir, 'dbus-1/system.d')
endif endif
dbussessionservicedir = get_option('dbussessionservicedir') dbussessionservicedir = get_option('dbussessionservicedir')
if dbussessionservicedir == '' if dbussessionservicedir == ''
dbussessionservicedir = datadir + '/dbus-1/services' dbussessionservicedir = join_paths(datadir, 'dbus-1/services')
endif endif
dbussystemservicedir = get_option('dbussystemservicedir') dbussystemservicedir = get_option('dbussystemservicedir')
if dbussystemservicedir == '' if dbussystemservicedir == ''
dbussystemservicedir = datadir + '/dbus-1/system-services' dbussystemservicedir = join_paths(datadir, 'dbus-1/system-services')
endif endif
pamlibdir = get_option('pamlibdir') pamlibdir = get_option('pamlibdir')
if pamlibdir == '' if pamlibdir == ''
pamlibdir = rootlibdir + '/security' pamlibdir = join_paths(rootlibdir, 'security')
endif endif
pamconfdir = get_option('pamconfdir') pamconfdir = get_option('pamconfdir')
if pamconfdir == '' if pamconfdir == ''
pamconfdir = sysconfdir + '/pam.d' pamconfdir = join_paths(sysconfdir, 'pam.d')
endif endif
conf.set_quoted('PKGSYSCONFDIR', pkgsysconfdir) conf.set_quoted('PKGSYSCONFDIR', pkgsysconfdir)
conf.set_quoted('SYSTEM_CONFIG_UNIT_PATH', pkgsysconfdir + '/system') conf.set_quoted('SYSTEM_CONFIG_UNIT_PATH', join_paths(pkgsysconfdir, 'system'))
conf.set_quoted('SYSTEM_DATA_UNIT_PATH', systemunitdir) conf.set_quoted('SYSTEM_DATA_UNIT_PATH', systemunitdir)
conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path) conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path)
conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path) conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
conf.set_quoted('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local')) conf.set_quoted('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local'))
conf.set_quoted('RC_LOCAL_SCRIPT_PATH_STOP', get_option('halt-local')) conf.set_quoted('RC_LOCAL_SCRIPT_PATH_STOP', get_option('halt-local'))
conf.set_quoted('USER_CONFIG_UNIT_PATH', pkgsysconfdir + '/user') conf.set_quoted('USER_CONFIG_UNIT_PATH', join_paths(pkgsysconfdir, 'user'))
conf.set_quoted('USER_DATA_UNIT_PATH', userunitdir) conf.set_quoted('USER_DATA_UNIT_PATH', userunitdir)
conf.set_quoted('CERTIFICATE_ROOT', get_option('certificate-root')) conf.set_quoted('CERTIFICATE_ROOT', get_option('certificate-root'))
conf.set_quoted('CATALOG_DATABASE', catalogstatedir + '/database') conf.set_quoted('CATALOG_DATABASE', join_paths(catalogstatedir, 'database'))
conf.set_quoted('SYSTEMD_CGROUP_AGENT_PATH', rootlibexecdir + '/systemd-cgroups-agent') conf.set_quoted('SYSTEMD_CGROUP_AGENT_PATH', join_paths(rootlibexecdir, 'systemd-cgroups-agent'))
conf.set_quoted('SYSTEMD_BINARY_PATH', rootlibexecdir + '/systemd') conf.set_quoted('SYSTEMD_BINARY_PATH', join_paths(rootlibexecdir, 'systemd'))
conf.set_quoted('SYSTEMD_FSCK_PATH', rootlibexecdir + '/systemd-fsck') conf.set_quoted('SYSTEMD_FSCK_PATH', join_paths(rootlibexecdir, 'systemd-fsck'))
conf.set_quoted('SYSTEMD_SHUTDOWN_BINARY_PATH', rootlibexecdir + '/systemd-shutdown') conf.set_quoted('SYSTEMD_SHUTDOWN_BINARY_PATH', join_paths(rootlibexecdir, 'systemd-shutdown'))
conf.set_quoted('SYSTEMD_SLEEP_BINARY_PATH', rootlibexecdir + '/systemd-sleep') conf.set_quoted('SYSTEMD_SLEEP_BINARY_PATH', join_paths(rootlibexecdir, 'systemd-sleep'))
conf.set_quoted('SYSTEMCTL_BINARY_PATH', rootbindir + '/systemctl') conf.set_quoted('SYSTEMCTL_BINARY_PATH', join_paths(rootbindir, 'systemctl'))
conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', rootbindir + '/systemd-tty-ask-password-agent') conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', join_paths(rootbindir, 'systemd-tty-ask-password-agent'))
conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH', bindir + '/systemd-stdio-bridge') conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH', join_paths(bindir, 'systemd-stdio-bridge'))
conf.set_quoted('ROOTPREFIX', rootprefixdir) conf.set_quoted('ROOTPREFIX', rootprefixdir)
conf.set_quoted('RANDOM_SEED_DIR', randomseeddir) conf.set_quoted('RANDOM_SEED_DIR', randomseeddir)
conf.set_quoted('RANDOM_SEED', randomseeddir + '/random-seed') conf.set_quoted('RANDOM_SEED', join_paths(randomseeddir, 'random-seed'))
conf.set_quoted('SYSTEMD_CRYPTSETUP_PATH', rootlibexecdir + '/systemd-cryptsetup') conf.set_quoted('SYSTEMD_CRYPTSETUP_PATH', join_paths(rootlibexecdir, 'systemd-cryptsetup'))
conf.set_quoted('SYSTEM_GENERATOR_PATH', systemgeneratordir) conf.set_quoted('SYSTEM_GENERATOR_PATH', systemgeneratordir)
conf.set_quoted('USER_GENERATOR_PATH', usergeneratordir) conf.set_quoted('USER_GENERATOR_PATH', usergeneratordir)
conf.set_quoted('SYSTEM_ENV_GENERATOR_PATH', systemenvgeneratordir) conf.set_quoted('SYSTEM_ENV_GENERATOR_PATH', systemenvgeneratordir)
conf.set_quoted('USER_ENV_GENERATOR_PATH', userenvgeneratordir) conf.set_quoted('USER_ENV_GENERATOR_PATH', userenvgeneratordir)
conf.set_quoted('SYSTEM_SHUTDOWN_PATH', systemshutdowndir) conf.set_quoted('SYSTEM_SHUTDOWN_PATH', systemshutdowndir)
conf.set_quoted('SYSTEM_SLEEP_PATH', systemsleepdir) conf.set_quoted('SYSTEM_SLEEP_PATH', systemsleepdir)
conf.set_quoted('SYSTEMD_KBD_MODEL_MAP', pkgdatadir + '/kbd-model-map') conf.set_quoted('SYSTEMD_KBD_MODEL_MAP', join_paths(pkgdatadir, 'kbd-model-map'))
conf.set_quoted('SYSTEMD_LANGUAGE_FALLBACK_MAP', pkgdatadir + '/language-fallback-map') conf.set_quoted('SYSTEMD_LANGUAGE_FALLBACK_MAP', join_paths(pkgdatadir, 'language-fallback-map'))
conf.set_quoted('UDEVLIBEXECDIR', udevlibexecdir) conf.set_quoted('UDEVLIBEXECDIR', udevlibexecdir)
conf.set_quoted('POLKIT_AGENT_BINARY_PATH', bindir + '/pkttyagent') conf.set_quoted('POLKIT_AGENT_BINARY_PATH', join_paths(bindir, 'pkttyagent'))
conf.set_quoted('LIBDIR', libdir) conf.set_quoted('LIBDIR', libdir)
conf.set_quoted('ROOTLIBDIR', rootlibdir) conf.set_quoted('ROOTLIBDIR', rootlibdir)
conf.set_quoted('ROOTLIBEXECDIR', rootlibexecdir) conf.set_quoted('ROOTLIBEXECDIR', rootlibexecdir)
conf.set_quoted('BOOTLIBDIR', bootlibdir) conf.set_quoted('BOOTLIBDIR', bootlibdir)
conf.set_quoted('SYSTEMD_PULL_PATH', rootlibexecdir + '/systemd-pull') conf.set_quoted('SYSTEMD_PULL_PATH', join_paths(rootlibexecdir, 'systemd-pull'))
conf.set_quoted('SYSTEMD_IMPORT_PATH', rootlibexecdir + '/systemd-import') conf.set_quoted('SYSTEMD_IMPORT_PATH', join_paths(rootlibexecdir, 'systemd-import'))
conf.set_quoted('SYSTEMD_EXPORT_PATH', rootlibexecdir + '/systemd-export') conf.set_quoted('SYSTEMD_EXPORT_PATH', join_paths(rootlibexecdir, 'systemd-export'))
conf.set_quoted('VENDOR_KEYRING_PATH', rootlibexecdir + '/import-pubring.gpg') conf.set_quoted('VENDOR_KEYRING_PATH', join_paths(rootlibexecdir, 'import-pubring.gpg'))
conf.set_quoted('USER_KEYRING_PATH', pkgsysconfdir + '/import-pubring.gpg') conf.set_quoted('USER_KEYRING_PATH', join_paths(pkgsysconfdir, 'import-pubring.gpg'))
conf.set_quoted('DOCUMENT_ROOT', pkgdatadir + '/gatewayd') conf.set_quoted('DOCUMENT_ROOT', join_paths(pkgdatadir, 'gatewayd'))
conf.set_quoted('ABS_BUILD_DIR', meson.build_root()) conf.set_quoted('ABS_BUILD_DIR', meson.build_root())
conf.set_quoted('ABS_SRC_DIR', meson.source_root()) conf.set_quoted('ABS_SRC_DIR', meson.source_root())
@ -212,8 +212,8 @@ substs.set('systemshutdowndir', systemshutdowndir)
substs.set('systemsleepdir', systemsleepdir) substs.set('systemsleepdir', systemsleepdir)
substs.set('VARLOGDIR', varlogdir) substs.set('VARLOGDIR', varlogdir)
substs.set('CERTIFICATEROOT', get_option('certificate-root')) substs.set('CERTIFICATEROOT', get_option('certificate-root'))
substs.set('SYSTEMCTL', rootbindir + '/systemctl') substs.set('SYSTEMCTL', join_paths(rootbindir, 'systemctl'))
substs.set('RANDOM_SEED', randomseeddir + '/random-seed') substs.set('RANDOM_SEED', join_paths(randomseeddir, 'random-seed'))
substs.set('SYSTEM_SYSVINIT_PATH', sysvinit_path) substs.set('SYSTEM_SYSVINIT_PATH', sysvinit_path)
substs.set('SYSTEM_SYSVRCND_PATH', sysvrcnd_path) substs.set('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
substs.set('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local')) substs.set('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local'))
@ -1206,8 +1206,8 @@ if conf.get('ENABLE_ENVIRONMENT_D', 0) == 1
install_dir : userenvgeneratordir) install_dir : userenvgeneratordir)
meson.add_install_script(meson_make_symlink, meson.add_install_script(meson_make_symlink,
sysconfdir + '/environment', join_paths(sysconfdir, 'environment'),
environmentdir + '/99-environment.conf') join_paths(environmentdir, '99-environment.conf'))
endif endif
if conf.get('ENABLE_HIBERNATE', 0) == 1 if conf.get('ENABLE_HIBERNATE', 0) == 1
@ -1689,7 +1689,7 @@ if conf.get('ENABLE_BINFMT', 0) == 1
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format(binfmtdir)) mkdir_p.format(binfmtdir))
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format(sysconfdir + '/binfmt.d')) mkdir_p.format(join_paths(sysconfdir, 'binfmt.d')))
endif endif
if conf.get('ENABLE_VCONSOLE', 0) == 1 if conf.get('ENABLE_VCONSOLE', 0) == 1
@ -1893,7 +1893,7 @@ executable('systemd-mount',
install : true) install : true)
meson.add_install_script(meson_make_symlink, meson.add_install_script(meson_make_symlink,
'systemd-mount', bindir + '/systemd-umount') 'systemd-mount', join_paths(bindir, 'systemd-umount'))
executable('systemd-run', executable('systemd-run',
'src/run/run.c', 'src/run/run.c',
@ -2044,7 +2044,7 @@ if conf.get('HAVE_KMOD', 0) == 1
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format(modulesloaddir)) mkdir_p.format(modulesloaddir))
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format(sysconfdir + '/modules-load.d')) mkdir_p.format(join_paths(sysconfdir, 'modules-load.d')))
endif endif
executable('systemd-nspawn', executable('systemd-nspawn',

View file

@ -8,5 +8,5 @@ if conf.get('ENABLE_NETWORKD', 0) == 1
install_dir : networkdir) install_dir : networkdir)
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format(sysconfdir + '/systemd/network')) mkdir_p.format(join_paths(sysconfdir, 'systemd/network')))
endif endif

View file

@ -8,7 +8,7 @@ i18n.gettext(meson.project_name())
intltool_merge = find_program('intltool-merge') intltool_merge = find_program('intltool-merge')
po_dir = meson.current_source_dir() po_dir = meson.current_source_dir()
intltool_cache = meson.current_build_dir() + '/intltool-merge-cache' intltool_cache = join_paths(meson.current_build_dir(), 'intltool-merge-cache')
intltool_command = [intltool_merge, '-x', '-u', intltool_command = [intltool_merge, '-x', '-u',
'-c', intltool_cache, '-c', intltool_cache,
po_dir, '@INPUT@', '@OUTPUT@'] po_dir, '@INPUT@', '@OUTPUT@']

View file

@ -6,7 +6,7 @@ if bashcompletiondir == ''
if bash_completion.found() if bash_completion.found()
bashcompletiondir = bash_completion.get_pkgconfig_variable('completionsdir') bashcompletiondir = bash_completion.get_pkgconfig_variable('completionsdir')
else else
bashcompletiondir = datadir + '/bash-completion/completions' bashcompletiondir = join_paths(datadir, 'bash-completion/completions')
endif endif
message('bash completions: @0@'.format(bashcompletiondir)) message('bash completions: @0@'.format(bashcompletiondir))

View file

@ -2,7 +2,7 @@
zshcompletiondir = get_option('zshcompletiondir') zshcompletiondir = get_option('zshcompletiondir')
if zshcompletiondir == '' if zshcompletiondir == ''
zshcompletiondir = datadir + '/zsh/site-functions' zshcompletiondir = join_paths(datadir, 'zsh/site-functions')
message('zsh completions: @0@'.format(zshcompletiondir)) message('zsh completions: @0@'.format(zshcompletiondir))
endif endif

View file

@ -70,7 +70,7 @@ if have_gnu_efi
efi_ldsdir = get_option('efi-ldsdir') efi_ldsdir = get_option('efi-ldsdir')
if efi_ldsdir == '' if efi_ldsdir == ''
efi_ldsdir = efi_libdir + '/gnuefi' efi_ldsdir = join_paths(efi_libdir, 'gnuefi')
endif endif
efi_incdir = get_option('efi-includedir') efi_incdir = get_option('efi-includedir')
@ -92,7 +92,7 @@ if have_gnu_efi
'-Wsign-compare', '-Wsign-compare',
'-Wno-missing-field-initializers', '-Wno-missing-field-initializers',
'-isystem', efi_incdir, '-isystem', efi_incdir,
'-isystem', efi_incdir + '/' + efi_arch, '-isystem', join_paths(efi_incdir, efi_arch),
'-include', efi_config_h] '-include', efi_config_h]
if efi_arch == 'x86_64' if efi_arch == 'x86_64'
compile_args += ['-mno-red-zone', compile_args += ['-mno-red-zone',

View file

@ -227,10 +227,10 @@ meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir)) meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format(pkgsysconfdir + '/system/multi-user.target.wants')) mkdir_p.format(join_paths(pkgsysconfdir, 'system/multi-user.target.wants')))
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format(pkgsysconfdir + '/system/getty.target.wants')) mkdir_p.format(join_paths(pkgsysconfdir, 'system/getty.target.wants')))
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format(pkgsysconfdir + '/user')) mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format(sysconfdir + '/xdg/systemd')) mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))

View file

@ -42,7 +42,7 @@ if conf.get('ENABLE_REMOTE', 0) == 1 and conf.get('HAVE_MICROHTTPD', 0) == 1
endif endif
install_data('browse.html', install_data('browse.html',
install_dir : pkgdatadir + '/gatewayd') install_dir : join_paths(pkgdatadir, 'gatewayd'))
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format('/var/log/journal/remote')) mkdir_p.format('/var/log/journal/remote'))

View file

@ -10,4 +10,4 @@ install_data('50-depmod.install',
install_dir : kernelinstalldir) install_dir : kernelinstalldir)
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format(sysconfdir + '/kernel/install.d')) mkdir_p.format(join_paths(sysconfdir, 'kernel/install.d')))

View file

@ -26,8 +26,8 @@ endif
# If you know a way that allows the same variables to be used # If you know a way that allows the same variables to be used
# in sources list and concatenated to a string for test_env, # in sources list and concatenated to a string for test_env,
# let me know. # let me know.
kbd_model_map = meson.current_source_dir() + '/kbd-model-map' kbd_model_map = join_paths(meson.current_source_dir(), 'kbd-model-map')
language_fallback_map = meson.current_source_dir() + '/language-fallback-map' language_fallback_map = join_paths(meson.current_source_dir(), 'language-fallback-map')
install_data('kbd-model-map', install_data('kbd-model-map',
'language-fallback-map', 'language-fallback-map',

View file

@ -161,7 +161,7 @@ executable('mtd_probe',
install_dir : udevlibexecdir) install_dir : udevlibexecdir)
install_data('udev.conf', install_data('udev.conf',
install_dir : sysconfdir + '/udev') install_dir : join_paths(sysconfdir, 'udev'))
udev_pc = configure_file( udev_pc = configure_file(
input : 'udev.pc.in', input : 'udev.pc.in',
@ -171,4 +171,4 @@ install_data(udev_pc,
install_dir : pkgconfigdatadir) install_dir : pkgconfigdatadir)
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format(sysconfdir + '/udev/rules.d')) mkdir_p.format(join_paths(sysconfdir, 'udev/rules.d')))

View file

@ -20,4 +20,4 @@ foreach file : in_files
endforeach endforeach
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format(sysconfdir + '/sysctl.d')) mkdir_p.format(join_paths(sysconfdir, 'sysctl.d')))

View file

@ -40,5 +40,5 @@ endforeach
if enable_tmpfiles if enable_tmpfiles
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p.format(sysconfdir + '/tmpfiles.d')) mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))
endif endif

View file

@ -32,7 +32,7 @@ units = [
['local-fs.target', ''], ['local-fs.target', ''],
['machine.slice', 'ENABLE_MACHINED'], ['machine.slice', 'ENABLE_MACHINED'],
['machines.target', 'ENABLE_MACHINED', ['machines.target', 'ENABLE_MACHINED',
pkgsysconfdir + '/system/multi-user.target.wants/'], join_paths(pkgsysconfdir, 'system/multi-user.target.wants/')],
['multi-user.target', '', ['multi-user.target', '',
'runlevel2.target runlevel3.target runlevel4.target'], 'runlevel2.target runlevel3.target runlevel4.target'],
['network-online.target', ''], ['network-online.target', ''],
@ -51,7 +51,7 @@ units = [
'runlevel6.target ctrl-alt-del.target'], 'runlevel6.target ctrl-alt-del.target'],
['remote-fs-pre.target', ''], ['remote-fs-pre.target', ''],
['remote-fs.target', '', ['remote-fs.target', '',
pkgsysconfdir + '/system/multi-user.target.wants/'], join_paths(pkgsysconfdir, 'system/multi-user.target.wants/')],
['rescue.target', '', ['rescue.target', '',
'runlevel1.target'], 'runlevel1.target'],
['rpcbind.target', ''], ['rpcbind.target', ''],
@ -91,7 +91,7 @@ units = [
['systemd-journald.socket', '', ['systemd-journald.socket', '',
'sockets.target.wants/'], 'sockets.target.wants/'],
['systemd-networkd.socket', '', ['systemd-networkd.socket', '',
pkgsysconfdir + '/system/sockets.target.wants/'], join_paths(pkgsysconfdir, 'system/sockets.target.wants/')],
['systemd-rfkill.socket', 'ENABLE_RFKILL'], ['systemd-rfkill.socket', 'ENABLE_RFKILL'],
['systemd-tmpfiles-clean.timer', '', ['systemd-tmpfiles-clean.timer', '',
'timers.target.wants/'], 'timers.target.wants/'],
@ -164,7 +164,7 @@ in_units = [
['systemd-modules-load.service', 'HAVE_KMOD', ['systemd-modules-load.service', 'HAVE_KMOD',
'sysinit.target.wants/'], 'sysinit.target.wants/'],
['systemd-networkd-wait-online.service', 'ENABLE_NETWORKD', ['systemd-networkd-wait-online.service', 'ENABLE_NETWORKD',
pkgsysconfdir + '/system/network-online.target.wants/'], join_paths(pkgsysconfdir, 'system/network-online.target.wants/')],
['systemd-nspawn@.service', ''], ['systemd-nspawn@.service', ''],
['systemd-poweroff.service', ''], ['systemd-poweroff.service', ''],
['systemd-quotacheck.service', 'ENABLE_QUOTACHECK'], ['systemd-quotacheck.service', 'ENABLE_QUOTACHECK'],
@ -182,7 +182,7 @@ in_units = [
['systemd-timedated.service', 'ENABLE_TIMEDATED', ['systemd-timedated.service', 'ENABLE_TIMEDATED',
'dbus-org.freedesktop.timedate1.service'], 'dbus-org.freedesktop.timedate1.service'],
['systemd-timesyncd.service', 'ENABLE_TIMESYNCD', ['systemd-timesyncd.service', 'ENABLE_TIMESYNCD',
pkgsysconfdir + '/system/sysinit.target.wants/'], join_paths(pkgsysconfdir, 'system/sysinit.target.wants/')],
['systemd-tmpfiles-clean.service', 'ENABLE_TMPFILES'], ['systemd-tmpfiles-clean.service', 'ENABLE_TMPFILES'],
['systemd-tmpfiles-setup-dev.service', 'ENABLE_TMPFILES', ['systemd-tmpfiles-setup-dev.service', 'ENABLE_TMPFILES',
'sysinit.target.wants/'], 'sysinit.target.wants/'],
@ -208,7 +208,7 @@ in_units = [
m4_units = [ m4_units = [
['getty@.service', '', ['getty@.service', '',
'autovt@.service ' + 'autovt@.service ' +
pkgsysconfdir + '/system/getty.target.wants/getty@tty1.service'], join_paths(pkgsysconfdir, 'system/getty.target.wants/getty@tty1.service')],
['serial-getty@.service', ''], ['serial-getty@.service', ''],
['tmp.mount', '', ['tmp.mount', '',
'local-fs.target.wants/'], 'local-fs.target.wants/'],
@ -219,10 +219,10 @@ m4_in_units = [
['container-getty@.service', ''], ['container-getty@.service', ''],
['systemd-networkd.service', 'ENABLE_NETWORKD', ['systemd-networkd.service', 'ENABLE_NETWORKD',
'dbus-org.freedesktop.network1.service ' + 'dbus-org.freedesktop.network1.service ' +
pkgsysconfdir + '/system/multi-user.target.wants/ '], join_paths(pkgsysconfdir, 'system/multi-user.target.wants/')],
['systemd-resolved.service', 'ENABLE_RESOLVED', ['systemd-resolved.service', 'ENABLE_RESOLVED',
'dbus-org.freedesktop.resolve1.service ' + 'dbus-org.freedesktop.resolve1.service ' +
pkgsysconfdir + '/system/multi-user.target.wants/'], join_paths(pkgsysconfdir, 'system/multi-user.target.wants/')],
['user@.service', ''], ['user@.service', ''],
] ]
@ -313,16 +313,16 @@ endforeach
############################################################ ############################################################
meson.add_install_script(meson_make_symlink, meson.add_install_script(meson_make_symlink,
pkgsysconfdir + '/user', join_paths(pkgsysconfdir, 'user'),
sysconfdir + '/xdg/systemd/user') join_paths(sysconfdir, 'xdg/systemd/user'))
meson.add_install_script(meson_make_symlink, meson.add_install_script(meson_make_symlink,
dbussystemservicedir + '/org.freedesktop.systemd1.service', join_paths(dbussystemservicedir, 'org.freedesktop.systemd1.service'),
dbussessionservicedir + '/org.freedesktop.systemd1.service') join_paths(dbussessionservicedir, 'org.freedesktop.systemd1.service'))
if conf.get('HAVE_SYSV_COMPAT', 0) == 1 if conf.get('HAVE_SYSV_COMPAT', 0) == 1
foreach i : [1, 2, 3, 4, 5] foreach i : [1, 2, 3, 4, 5]
meson.add_install_script('sh', '-c', meson.add_install_script('sh', '-c',
mkdir_p mkdir_p
.format(systemunitdir + '/runlevel@0@.target.wants'.format(i))) .format(join_paths(systemunitdir, 'runlevel@0@.target.wants'.format(i))))
endforeach endforeach
endif endif