From: Davide Cavalca Date: Wed, 30 Aug 2017 15:04:53 +0000 (-0700) Subject: meson: use current_source_dir() to scope git invocations (#6635) X-Git-Tag: v235~208 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=450b60baa5ee7051d84ded8324fcd8a10ad3dea2;p=thirdparty%2Fsystemd.git meson: use current_source_dir() to scope git invocations (#6635) --- diff --git a/meson.build b/meson.build index 67df9a45997..d291ddb60d4 100644 --- a/meson.build +++ b/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'])