]> git.ipfire.org Git - thirdparty/systemd.git/blob - tmpfiles.d/meson.build
Merge pull request #5926 from fsateler/condition-uid
[thirdparty/systemd.git] / tmpfiles.d / meson.build
1 enable_tmpfiles = conf.get('ENABLE_TMPFILES', false)
2
3 tmpfiles = [['home.conf', ''],
4 ['journal-nocow.conf', ''],
5 ['systemd-nologin.conf', ''],
6 ['systemd-nspawn.conf', ''],
7 ['systemd-remote.conf', 'ENABLE_REMOTE'],
8 ['tmp.conf', ''],
9 ['x11.conf', ''],
10 ['legacy.conf', 'HAVE_SYSV_COMPAT'],
11 ]
12
13 foreach pair : tmpfiles
14 if not enable_tmpfiles
15 # do nothing
16 elif pair[1] == '' or conf.get(pair[1], false)
17 install_data(pair[0], install_dir : tmpfilesdir)
18 else
19 message('Not installing tmpfiles.d/@0@ because @1@ is @2@'
20 .format(pair[0], pair[1], conf.get(pair[1], 0)))
21 endif
22 endforeach
23
24 m4_files = ['etc.conf',
25 'systemd.conf',
26 'var.conf']
27
28 foreach file : m4_files
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)
37 endforeach
38
39 if enable_tmpfiles
40 meson.add_install_script(
41 'sh', '-c',
42 mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))
43 endif