ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
ff6046
From 2eca34cfa911fa7c1aafef5d60b7a2e752ae5b3b Mon Sep 17 00:00:00 2001
ff6046
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
ff6046
Date: Fri, 10 Aug 2018 16:50:07 +0200
ff6046
Subject: [PATCH] meson: use .source_root() in more places
ff6046
ff6046
In the main meson.build file, .source_root() and .current_source_dir() are
ff6046
equivalent, but it seems more appropriate to use .source_root() when we are appending
ff6046
a path which is by design relative to repo root.
ff6046
ff6046
(cherry picked from commit 243e5cecc3a211519544ccba01c44edc827ac517)
ff6046
ff6046
Resolves: #1696224
ff6046
---
ff6046
 meson.build | 16 ++++++++--------
ff6046
 1 file changed, 8 insertions(+), 8 deletions(-)
ff6046
ff6046
diff --git a/meson.build b/meson.build
ff6046
index f623bcf37d..fe161e5ec5 100644
ff6046
--- a/meson.build
ff6046
+++ b/meson.build
ff6046
@@ -1453,7 +1453,7 @@ foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'],
ff6046
                 module = tuple[0]
ff6046
 
ff6046
                 sym = 'src/nss-@0@/nss-@0@.sym'.format(module)
ff6046
-                version_script_arg = join_paths(meson.current_source_dir(), sym)
ff6046
+                version_script_arg = join_paths(meson.source_root(), sym)
ff6046
 
ff6046
                 nss = shared_library(
ff6046
                         'nss_' + module,
ff6046
@@ -1704,7 +1704,7 @@ if conf.get('ENABLE_LOGIND') == 1
ff6046
         public_programs += [exe]
ff6046
 
ff6046
         if conf.get('HAVE_PAM') == 1
ff6046
-                version_script_arg = join_paths(meson.current_source_dir(), pam_systemd_sym)
ff6046
+                version_script_arg = join_paths(meson.source_root(), pam_systemd_sym)
ff6046
                 pam_systemd = shared_library(
ff6046
                         'pam_systemd',
ff6046
                         pam_systemd_c,
ff6046
@@ -2816,7 +2816,7 @@ endforeach
ff6046
 if git.found()
ff6046
         all_files = run_command(
ff6046
                 git,
ff6046
-                ['--git-dir=@0@/.git'.format(meson.current_source_dir()),
ff6046
+                ['--git-dir=@0@/.git'.format(meson.source_root()),
ff6046
                  'ls-files',
ff6046
                  ':/*.[ch]'])
ff6046
         all_files = files(all_files.stdout().split())
ff6046
@@ -2824,10 +2824,10 @@ if git.found()
ff6046
         custom_target(
ff6046
                 'tags',
ff6046
                 output : 'tags',
ff6046
-                command : [env, 'etags', '-o', '@0@/TAGS'.format(meson.current_source_dir())] + all_files)
ff6046
+                command : [env, 'etags', '-o', '@0@/TAGS'.format(meson.source_root())] + all_files)
ff6046
         run_target(
ff6046
                 'ctags',
ff6046
-                command : [env, 'ctags', '-o', '@0@/tags'.format(meson.current_source_dir())] + all_files)
ff6046
+                command : [env, 'ctags', '-o', '@0@/tags'.format(meson.source_root())] + all_files)
ff6046
 endif
ff6046
 
ff6046
 if git.found()
ff6046
@@ -2840,17 +2840,17 @@ endif
ff6046
 if git.found()
ff6046
         git_head = run_command(
ff6046
                 git,
ff6046
-                ['--git-dir=@0@/.git'.format(meson.current_source_dir()),
ff6046
+                ['--git-dir=@0@/.git'.format(meson.source_root()),
ff6046
                  'rev-parse', 'HEAD']).stdout().strip()
ff6046
         git_head_short = run_command(
ff6046
                 git,
ff6046
-                ['--git-dir=@0@/.git'.format(meson.current_source_dir()),
ff6046
+                ['--git-dir=@0@/.git'.format(meson.source_root()),
ff6046
                  'rev-parse', '--short=7', 'HEAD']).stdout().strip()
ff6046
 
ff6046
         run_target(
ff6046
                 'git-snapshot',
ff6046
                 command : ['git', 'archive',
ff6046
-                           '-o', '@0@/systemd-@1@.tar.gz'.format(meson.current_source_dir(),
ff6046
+                           '-o', '@0@/systemd-@1@.tar.gz'.format(meson.source_root(),
ff6046
                                                                  git_head_short),
ff6046
                            '--prefix', 'systemd-@0@/'.format(git_head),
ff6046
                            'HEAD'])