mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +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()
|
||||
all_files = run_command(
|
||||
git,
|
||||
['--git-dir=@0@/.git'.format(meson.source_root()),
|
||||
['--git-dir=@0@/.git'.format(meson.current_source_dir()),
|
||||
'ls-files',
|
||||
':/*.[ch]'])
|
||||
all_files = files(all_files.stdout().split())
|
||||
@ -2346,11 +2346,11 @@ if git.found()
|
||||
custom_target(
|
||||
'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(
|
||||
'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
|
||||
|
||||
if git.found()
|
||||
@ -2363,17 +2363,17 @@ endif
|
||||
if git.found()
|
||||
git_head = run_command(
|
||||
git,
|
||||
['--git-dir=@0@/.git'.format(meson.source_root()),
|
||||
['--git-dir=@0@/.git'.format(meson.current_source_dir()),
|
||||
'rev-parse', 'HEAD']).stdout().strip()
|
||||
git_head_short = run_command(
|
||||
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()
|
||||
|
||||
run_target(
|
||||
'git-snapshot',
|
||||
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),
|
||||
'--prefix', 'systemd-@0@/'.format(git_head),
|
||||
'HEAD'])
|
||||
|
Loading…
Reference in New Issue
Block a user