summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruserwithuid <userwithuid@gmail.com>2017-04-27 17:47:04 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-27 13:47:04 -0400
commit1c9f131444693c6f863a66dc5b189df037e22ff7 (patch)
tree20a7fb407586010897aa41e520852a38c8e87382
parent5d96ab7d6dafc0e24fdf3e7e36447775d8320a7a (diff)
meson: do not install files from disabled features (#5811)
Mirror conditions from Makefile.am.
-rw-r--r--docs/sysvinit/meson.build7
-rw-r--r--docs/var-log/meson.build7
-rw-r--r--src/hostname/meson.build10
-rw-r--r--src/journal-remote/meson.build16
-rw-r--r--src/locale/meson.build8
-rw-r--r--units/meson.build4
6 files changed, 30 insertions, 22 deletions
diff --git a/docs/sysvinit/meson.build b/docs/sysvinit/meson.build
index 36b2f6f98c..a8f5b519a3 100644
--- a/docs/sysvinit/meson.build
+++ b/docs/sysvinit/meson.build
@@ -2,5 +2,8 @@ file = configure_file(
input : 'README.in',
output : 'README',
configuration : substs)
-install_data(file,
- install_dir : sysvinit_path)
+
+if conf.get('HAVE_SYSV_COMPAT', 0) == 1
+ install_data(file,
+ install_dir : sysvinit_path)
+endif
diff --git a/docs/var-log/meson.build b/docs/var-log/meson.build
index 43078c40e9..c833f0f5b0 100644
--- a/docs/var-log/meson.build
+++ b/docs/var-log/meson.build
@@ -2,5 +2,8 @@ file = configure_file(
input : 'README.in',
output : 'README',
configuration : substs)
-install_data(file,
- install_dir : varlogdir)
+
+if conf.get('HAVE_SYSV_COMPAT', 0) == 1
+ install_data(file,
+ install_dir : varlogdir)
+endif
diff --git a/src/hostname/meson.build b/src/hostname/meson.build
index 68275ba8f5..7cb5fc135a 100644
--- a/src/hostname/meson.build
+++ b/src/hostname/meson.build
@@ -1,9 +1,9 @@
-install_data('org.freedesktop.hostname1.conf',
- install_dir : dbuspolicydir)
-install_data('org.freedesktop.hostname1.service',
- install_dir : dbussystemservicedir)
-
if conf.get('ENABLE_HOSTNAMED', 0) == 1
+ install_data('org.freedesktop.hostname1.conf',
+ install_dir : dbuspolicydir)
+ install_data('org.freedesktop.hostname1.service',
+ install_dir : dbussystemservicedir)
+
custom_target(
'org.freedesktop.hostname1.policy',
input : 'org.freedesktop.hostname1.policy.in',
diff --git a/src/journal-remote/meson.build b/src/journal-remote/meson.build
index 394be7068c..072fa14548 100644
--- a/src/journal-remote/meson.build
+++ b/src/journal-remote/meson.build
@@ -37,13 +37,13 @@ if conf.get('ENABLE_REMOTE', 0) == 1 and conf.get('HAVE_MICROHTTPD', 0) == 1
configuration : substs)
install_data(journal_remote_conf,
install_dir : pkgsysconfdir)
-endif
-install_data('browse.html',
- install_dir : join_paths(pkgdatadir, 'gatewayd'))
+ install_data('browse.html',
+ install_dir : join_paths(pkgdatadir, 'gatewayd'))
-meson.add_install_script('sh', '-c',
- mkdir_p.format('/var/log/journal/remote'))
-meson.add_install_script('sh', '-c',
- 'chown 0:0 $DESTDIR/var/log/journal/remote &&
- chmod 755 $DESTDIR/var/log/journal/remote || :')
+ meson.add_install_script('sh', '-c',
+ mkdir_p.format('/var/log/journal/remote'))
+ meson.add_install_script('sh', '-c',
+ 'chown 0:0 $DESTDIR/var/log/journal/remote &&
+ chmod 755 $DESTDIR/var/log/journal/remote || :')
+endif
diff --git a/src/locale/meson.build b/src/locale/meson.build
index f722e0ed92..d03af4c0e2 100644
--- a/src/locale/meson.build
+++ b/src/locale/meson.build
@@ -27,9 +27,11 @@ endif
kbd_model_map = join_paths(meson.current_source_dir(), 'kbd-model-map')
language_fallback_map = join_paths(meson.current_source_dir(), 'language-fallback-map')
-install_data('kbd-model-map',
- 'language-fallback-map',
- install_dir : pkgdatadir)
+if conf.get('ENABLE_LOCALED', 0) == 1
+ install_data('kbd-model-map',
+ 'language-fallback-map',
+ install_dir : pkgdatadir)
+endif
tests += [
[['src/locale/test-keymap-util.c',
diff --git a/units/meson.build b/units/meson.build
index 0cc5f8861a..9411891c7f 100644
--- a/units/meson.build
+++ b/units/meson.build
@@ -80,8 +80,8 @@ units = [
'sockets.target.wants/'],
['systemd-initctl.socket', '',
'sockets.target.wants/'],
- ['systemd-journal-gatewayd.socket', ''],
- ['systemd-journal-remote.socket', ''],
+ ['systemd-journal-gatewayd.socket', 'ENABLE_REMOTE HAVE_MICROHTTPD'],
+ ['systemd-journal-remote.socket', 'ENABLE_REMOTE HAVE_MICROHTTPD'],
['systemd-journald-audit.socket', '',
'sockets.target.wants/'],
['systemd-journald-dev-log.socket', '',