]> git.ipfire.org Git - thirdparty/systemd.git/blob - tmpfiles.d/meson.build
meson: reindent all files with 8 spaces
[thirdparty/systemd.git] / tmpfiles.d / meson.build
1 enable_tmpfiles = conf.get('ENABLE_TMPFILES', 0) == 1
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 ['var.conf', ''],
10 ['x11.conf', ''],
11 ['legacy.conf', 'HAVE_SYSV_COMPAT'],
12 ]
13
14 foreach pair : tmpfiles
15 if not enable_tmpfiles
16 # do nothing
17 elif pair[1] == '' or conf.get(pair[1], 0) == 1
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
23 endforeach
24
25 m4_files = ['etc.conf',
26 'systemd.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