]> git.ipfire.org Git - thirdparty/systemd.git/blob - tmpfiles.d/meson.build
Merge pull request #6151 from speakinghedge/6150-LLDP-messages-containing-padding...
[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 ['tmp.conf', ''],
8 ['x11.conf', ''],
9 ['legacy.conf', 'HAVE_SYSV_COMPAT'],
10 ]
11
12 foreach pair : tmpfiles
13 if not enable_tmpfiles
14 # do nothing
15 elif pair[1] == '' or conf.get(pair[1], false)
16 install_data(pair[0], install_dir : tmpfilesdir)
17 else
18 message('Not installing tmpfiles.d/@0@ because @1@ is @2@'
19 .format(pair[0], pair[1], conf.get(pair[1], 0)))
20 endif
21 endforeach
22
23 m4_files = [['etc.conf', ''],
24 ['systemd.conf', ''],
25 ['systemd-remote.conf', 'ENABLE_REMOTE'],
26 ['var.conf', ''],
27 ]
28
29 foreach pair : m4_files
30 if not enable_tmpfiles
31 # do nothing
32 elif pair[1] == '' or conf.get(pair[1], false)
33 custom_target(
34 'tmpfiles.d_' + pair[0],
35 input : pair[0] + '.m4',
36 output: pair[0],
37 command : [m4, '-P'] + m4_defines + ['@INPUT@'],
38 capture : true,
39 install : true,
40 install_dir : tmpfilesdir)
41 else
42 message('Not installing tmpfiles.d/@0@.m4 because @1@ is @2@'
43 .format(pair[0], pair[1], conf.get(pair[1], 0)))
44 endif
45 endforeach
46
47 if enable_tmpfiles
48 meson.add_install_script(
49 'sh', '-c',
50 mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))
51 endif