]> git.ipfire.org Git - thirdparty/systemd.git/blob - tmpfiles.d/meson.build
meson: build systemd using meson
[thirdparty/systemd.git] / tmpfiles.d / meson.build
1 # -*- mode: meson -*-
2
3 enable_tmpfiles = conf.get('ENABLE_TMPFILES', 0) == 1
4
5 tmpfiles = [['home.conf', ''],
6 ['journal-nocow.conf', ''],
7 ['systemd-nologin.conf', ''],
8 ['systemd-nspawn.conf', ''],
9 ['systemd-remote.conf', 'ENABLE_REMOTE'],
10 ['tmp.conf', ''],
11 ['var.conf', ''],
12 ['x11.conf', ''],
13 ['legacy.conf', 'HAVE_SYSV_COMPAT'],
14 ]
15
16 foreach pair : tmpfiles
17 if not enable_tmpfiles
18 # do nothing
19 elif pair[1] == '' or conf.get(pair[1], 0) == 1
20 install_data(pair[0], install_dir : tmpfilesdir)
21 else
22 message('Not installing tmpfiles.d/@0@ because @1@ is @2@'.format(
23 pair[0], pair[1], conf.get(pair[1], 0)))
24 endif
25 endforeach
26
27 m4_files = ['etc.conf',
28 'systemd.conf']
29
30 foreach file : m4_files
31 custom_target(
32 'tmpfiles.d/' + file,
33 input : file + '.m4',
34 output: file,
35 command : [m4, '-P'] + m4_defines + ['@INPUT@'],
36 capture : true,
37 install : enable_tmpfiles,
38 install_dir : tmpfilesdir)
39 endforeach