]> git.ipfire.org Git - thirdparty/systemd.git/blame - tmpfiles.d/meson.build
tree-wide: beautify remaining copyright statements
[thirdparty/systemd.git] / tmpfiles.d / meson.build
CommitLineData
3a726fcd
ZJS
1# SPDX-License-Identifier: LGPL-2.1+
2#
96b2fb93 3# Copyright © 2017 Zbigniew Jędrzejewski-Szmek
3a726fcd 4
349cc4a5 5enable_tmpfiles = conf.get('ENABLE_TMPFILES') == 1
5c23128d
ZJS
6
7tmpfiles = [['home.conf', ''],
8 ['journal-nocow.conf', ''],
9 ['systemd-nologin.conf', ''],
32b8157f 10 ['systemd-nspawn.conf', 'ENABLE_MACHINED'],
61d0578b 11 ['portables.conf', 'ENABLE_PORTABLED'],
5c23128d 12 ['tmp.conf', ''],
5c23128d
ZJS
13 ['x11.conf', ''],
14 ['legacy.conf', 'HAVE_SYSV_COMPAT'],
15 ]
16
17foreach pair : tmpfiles
37efbbd8
ZJS
18 if not enable_tmpfiles
19 # do nothing
349cc4a5 20 elif pair[1] == '' or conf.get(pair[1]) == 1
37efbbd8
ZJS
21 install_data(pair[0], install_dir : tmpfilesdir)
22 else
23 message('Not installing tmpfiles.d/@0@ because @1@ is @2@'
24 .format(pair[0], pair[1], conf.get(pair[1], 0)))
25 endif
5c23128d
ZJS
26endforeach
27
5e354b22
FB
28m4_files = [['etc.conf', ''],
29 ['systemd.conf', ''],
5e354b22
FB
30 ['var.conf', ''],
31 ]
5c23128d 32
5e354b22
FB
33foreach pair : m4_files
34 if not enable_tmpfiles
35 # do nothing
349cc4a5 36 elif pair[1] == '' or conf.get(pair[1]) == 1
5e354b22 37 custom_target(
525e9db3 38 'tmpfiles.d_' + pair[0],
5e354b22
FB
39 input : pair[0] + '.m4',
40 output: pair[0],
348b4437 41 command : [meson_apply_m4, config_h, '@INPUT@'],
5e354b22
FB
42 capture : true,
43 install : true,
44 install_dir : tmpfilesdir)
45 else
46 message('Not installing tmpfiles.d/@0@.m4 because @1@ is @2@'
47 .format(pair[0], pair[1], conf.get(pair[1], 0)))
48 endif
5c23128d 49endforeach
94e75a54
ZJS
50
51if enable_tmpfiles
37efbbd8
ZJS
52 meson.add_install_script(
53 'sh', '-c',
54 mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))
94e75a54 55endif