summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-28 21:46:53 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-29 13:29:59 +0100
commit9a8e64b0e9eba188d1d38df98f6a9f9dad79d81a (patch)
tree1a707d4074e26d84328ff5fcaf5e06f71e1d290d
parent74344a1702316845fadad0eb0c8f5d4a8c1dd5c4 (diff)
downloadsystemd-9a8e64b0e9eba188d1d38df98f6a9f9dad79d81a.tar.gz
systemd-9a8e64b0e9eba188d1d38df98f6a9f9dad79d81a.tar.bz2
systemd-9a8e64b0e9eba188d1d38df98f6a9f9dad79d81a.zip
meson: emit a warning if rootprefix is set
It's printed at the end because it's the easiest to spot there. When meson is upgraded to 0.43.1, we'll be able to use warning() instead.
-rw-r--r--meson.build18
1 files changed, 13 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index 052474895d..376c8b84be 100644
--- a/meson.build
+++ b/meson.build
@@ -54,14 +54,15 @@ endif
#####################################################################
+split_usr = get_option('split-usr')
+conf.set10('HAVE_SPLIT_USR', split_usr)
+
rootprefixdir = get_option('rootprefix')
-conf.set10('HAVE_SPLIT_USR', get_option('split-usr'))
# Unusual rootprefixdir values are used by some distros
# (see https://github.com/systemd/systemd/pull/7461).
-if get_option('split-usr')
- rootprefixdir = rootprefixdir != '' ? rootprefixdir : '/'
-else
- rootprefixdir = rootprefixdir != '' ? rootprefixdir : '/usr'
+rootprefix_default = get_option('split-usr') ? '/' : '/usr'
+if rootprefixdir == ''
+ rootprefixdir = rootprefix_default
endif
sysvinit_path = get_option('sysvinit-path')
@@ -2615,3 +2616,10 @@ status += [
'disabled features: @0@'.format(', '.join(missing)),
'']
message('\n '.join(status))
+
+if rootprefixdir != rootprefix_default
+ message('WARNING:\n' +
+ ' Note that the installation prefix was changed to "@0@".\n'.format(rootprefixdir) +
+ ' systemd used fixed names for unit file directories and other paths, so anything\n' +
+ ' except the default ("@0@") is strongly discouraged.'.format(rootprefix_default))
+endif