]> git.ipfire.org Git - thirdparty/systemd.git/blame - tmpfiles.d/meson.build
Merge pull request #5842 from keszybz/meson-status-and-conditionals
[thirdparty/systemd.git] / tmpfiles.d / meson.build
CommitLineData
2c201c21 1enable_tmpfiles = conf.get('ENABLE_TMPFILES', false)
5c23128d
ZJS
2
3tmpfiles = [['home.conf', ''],
4 ['journal-nocow.conf', ''],
5 ['systemd-nologin.conf', ''],
6 ['systemd-nspawn.conf', ''],
7 ['systemd-remote.conf', 'ENABLE_REMOTE'],
8 ['tmp.conf', ''],
9 ['var.conf', ''],
10 ['x11.conf', ''],
11 ['legacy.conf', 'HAVE_SYSV_COMPAT'],
12 ]
13
14foreach pair : tmpfiles
37efbbd8
ZJS
15 if not enable_tmpfiles
16 # do nothing
2c201c21 17 elif pair[1] == '' or conf.get(pair[1], false)
37efbbd8
ZJS
18 install_data(pair[0], install_dir : tmpfilesdir)
19 else
20 message('Not installing tmpfiles.d/@0@ because @1@ is @2@'
21 .format(pair[0], pair[1], conf.get(pair[1], 0)))
22 endif
5c23128d
ZJS
23endforeach
24
25m4_files = ['etc.conf',
26 'systemd.conf']
27
28foreach file : m4_files
37efbbd8
ZJS
29 custom_target(
30 'tmpfiles.d/' + file,
31 input : file + '.m4',
32 output: file,
33 command : [m4, '-P'] + m4_defines + ['@INPUT@'],
34 capture : true,
35 install : enable_tmpfiles,
36 install_dir : tmpfilesdir)
5c23128d 37endforeach
94e75a54
ZJS
38
39if enable_tmpfiles
37efbbd8
ZJS
40 meson.add_install_script(
41 'sh', '-c',
42 mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))
94e75a54 43endif