mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
meson: use current_source_dir() to scope git invocations (#6635)
This commit is contained in:
parent
f29eef2e90
commit
450b60baa5
12
meson.build
12
meson.build
@ -2338,7 +2338,7 @@ endforeach
|
|||||||
if git.found()
|
if git.found()
|
||||||
all_files = run_command(
|
all_files = run_command(
|
||||||
git,
|
git,
|
||||||
['--git-dir=@0@/.git'.format(meson.source_root()),
|
['--git-dir=@0@/.git'.format(meson.current_source_dir()),
|
||||||
'ls-files',
|
'ls-files',
|
||||||
':/*.[ch]'])
|
':/*.[ch]'])
|
||||||
all_files = files(all_files.stdout().split())
|
all_files = files(all_files.stdout().split())
|
||||||
@ -2346,11 +2346,11 @@ if git.found()
|
|||||||
custom_target(
|
custom_target(
|
||||||
'tags',
|
'tags',
|
||||||
output : 'tags',
|
output : 'tags',
|
||||||
command : ['env', 'etags', '-o', '@0@/TAGS'.format(meson.source_root())] + all_files)
|
command : ['env', 'etags', '-o', '@0@/TAGS'.format(meson.current_source_dir())] + all_files)
|
||||||
custom_target(
|
custom_target(
|
||||||
'ctags',
|
'ctags',
|
||||||
output : 'ctags',
|
output : 'ctags',
|
||||||
command : ['env', 'ctags', '-o', '@0@/tags'.format(meson.source_root())] + all_files)
|
command : ['env', 'ctags', '-o', '@0@/tags'.format(meson.current_source_dir())] + all_files)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if git.found()
|
if git.found()
|
||||||
@ -2363,17 +2363,17 @@ endif
|
|||||||
if git.found()
|
if git.found()
|
||||||
git_head = run_command(
|
git_head = run_command(
|
||||||
git,
|
git,
|
||||||
['--git-dir=@0@/.git'.format(meson.source_root()),
|
['--git-dir=@0@/.git'.format(meson.current_source_dir()),
|
||||||
'rev-parse', 'HEAD']).stdout().strip()
|
'rev-parse', 'HEAD']).stdout().strip()
|
||||||
git_head_short = run_command(
|
git_head_short = run_command(
|
||||||
git,
|
git,
|
||||||
['--git-dir=@0@/.git'.format(meson.source_root()),
|
['--git-dir=@0@/.git'.format(meson.current_source_dir()),
|
||||||
'rev-parse', '--short=7', 'HEAD']).stdout().strip()
|
'rev-parse', '--short=7', 'HEAD']).stdout().strip()
|
||||||
|
|
||||||
run_target(
|
run_target(
|
||||||
'git-snapshot',
|
'git-snapshot',
|
||||||
command : ['git', 'archive',
|
command : ['git', 'archive',
|
||||||
'-o', '@0@/systemd-@1@.tar.gz'.format(meson.source_root(),
|
'-o', '@0@/systemd-@1@.tar.gz'.format(meson.current_source_dir(),
|
||||||
git_head_short),
|
git_head_short),
|
||||||
'--prefix', 'systemd-@0@/'.format(git_head),
|
'--prefix', 'systemd-@0@/'.format(git_head),
|
||||||
'HEAD'])
|
'HEAD'])
|
||||||
|
Loading…
Reference in New Issue
Block a user