meson: use .source_root() in more places
In the main meson.build file, .source_root() and .current_source_dir() are equivalent, but it seems more appropriate to use .source_root() when we are appending a path which is by design relative to repo root.
This commit is contained in:
parent
fd5dec9adf
commit
243e5cecc3
16
meson.build
16
meson.build
|
@ -1477,7 +1477,7 @@ foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'],
|
|||
module = tuple[0]
|
||||
|
||||
sym = 'src/nss-@0@/nss-@0@.sym'.format(module)
|
||||
version_script_arg = join_paths(meson.current_source_dir(), sym)
|
||||
version_script_arg = join_paths(meson.source_root(), sym)
|
||||
|
||||
nss = shared_library(
|
||||
'nss_' + module,
|
||||
|
@ -1732,7 +1732,7 @@ if conf.get('ENABLE_LOGIND') == 1
|
|||
public_programs += exe
|
||||
|
||||
if conf.get('HAVE_PAM') == 1
|
||||
version_script_arg = join_paths(meson.current_source_dir(), pam_systemd_sym)
|
||||
version_script_arg = join_paths(meson.source_root(), pam_systemd_sym)
|
||||
pam_systemd = shared_library(
|
||||
'pam_systemd',
|
||||
pam_systemd_c,
|
||||
|
@ -2860,7 +2860,7 @@ endforeach
|
|||
if git.found()
|
||||
all_files = run_command(
|
||||
git,
|
||||
['--git-dir=@0@/.git'.format(meson.current_source_dir()),
|
||||
['--git-dir=@0@/.git'.format(meson.source_root()),
|
||||
'ls-files',
|
||||
':/*.[ch]'])
|
||||
all_files = files(all_files.stdout().split())
|
||||
|
@ -2868,10 +2868,10 @@ if git.found()
|
|||
custom_target(
|
||||
'tags',
|
||||
output : 'tags',
|
||||
command : [env, 'etags', '-o', '@0@/TAGS'.format(meson.current_source_dir())] + all_files)
|
||||
command : [env, 'etags', '-o', '@0@/TAGS'.format(meson.source_root())] + all_files)
|
||||
run_target(
|
||||
'ctags',
|
||||
command : [env, 'ctags', '-o', '@0@/tags'.format(meson.current_source_dir())] + all_files)
|
||||
command : [env, 'ctags', '-o', '@0@/tags'.format(meson.source_root())] + all_files)
|
||||
endif
|
||||
|
||||
if git.found()
|
||||
|
@ -2884,17 +2884,17 @@ endif
|
|||
if git.found()
|
||||
git_head = run_command(
|
||||
git,
|
||||
['--git-dir=@0@/.git'.format(meson.current_source_dir()),
|
||||
['--git-dir=@0@/.git'.format(meson.source_root()),
|
||||
'rev-parse', 'HEAD']).stdout().strip()
|
||||
git_head_short = run_command(
|
||||
git,
|
||||
['--git-dir=@0@/.git'.format(meson.current_source_dir()),
|
||||
['--git-dir=@0@/.git'.format(meson.source_root()),
|
||||
'rev-parse', '--short=7', 'HEAD']).stdout().strip()
|
||||
|
||||
run_target(
|
||||
'git-snapshot',
|
||||
command : ['git', 'archive',
|
||||
'-o', '@0@/systemd-@1@.tar.gz'.format(meson.current_source_dir(),
|
||||
'-o', '@0@/systemd-@1@.tar.gz'.format(meson.source_root(),
|
||||
git_head_short),
|
||||
'--prefix', 'systemd-@0@/'.format(git_head),
|
||||
'HEAD'])
|
||||
|
|
Loading…
Reference in New Issue