daandemeyer / rpms / systemd

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