]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/journal/meson.build
build-sys: use #if Y instead of #ifdef Y everywhere
[thirdparty/systemd.git] / src / journal / meson.build
1 journal_internal_sources = files('''
2 audit-type.c
3 audit-type.h
4 catalog.c
5 catalog.h
6 compress.c
7 compress.h
8 journal-def.h
9 journal-file.c
10 journal-file.h
11 journal-send.c
12 journal-vacuum.c
13 journal-vacuum.h
14 journal-verify.c
15 journal-verify.h
16 lookup3.c
17 lookup3.h
18 mmap-cache.c
19 mmap-cache.h
20 sd-journal.c
21 '''.split())
22
23 if conf.get('HAVE_GCRYPT') == 1
24 journal_internal_sources += files('''
25 journal-authenticate.c
26 journal-authenticate.h
27 fsprg.c
28 fsprg.h
29 '''.split())
30
31 journal_internal_sources += gcrypt_util_sources
32 endif
33
34 ############################################################
35
36 audit_type_includes = [config_h,
37 missing_h,
38 'linux/audit.h']
39 if conf.get('HAVE_AUDIT') == 1
40 audit_type_includes += 'libaudit.h'
41 endif
42
43 generate_audit_type_list = find_program('generate-audit_type-list.sh')
44 audit_type_list_txt = custom_target(
45 'audit_type-list.txt',
46 output : 'audit_type-list.txt',
47 command : [generate_audit_type_list, cpp] + audit_type_includes,
48 capture : true)
49
50 audit_type_to_name = custom_target(
51 'audit_type-to-name.h',
52 input : ['audit_type-to-name.awk', audit_type_list_txt],
53 output : 'audit_type-to-name.h',
54 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
55 capture : true)
56
57 journal_internal_sources += [audit_type_to_name]
58
59 ############################################################
60
61 libjournal_core_sources = files('''
62 journald-audit.c
63 journald-audit.h
64 journald-console.c
65 journald-console.h
66 journald-context.c
67 journald-context.h
68 journald-kmsg.c
69 journald-kmsg.h
70 journald-native.c
71 journald-native.h
72 journald-rate-limit.c
73 journald-rate-limit.h
74 journald-server.c
75 journald-server.h
76 journald-stream.c
77 journald-stream.h
78 journald-syslog.c
79 journald-syslog.h
80 journald-wall.c
81 journald-wall.h
82 journal-internal.h
83 '''.split())
84
85 systemd_journald_sources = files('''
86 journald.c
87 journald-server.h
88 '''.split())
89
90 journald_gperf_c = custom_target(
91 'journald-gperf.c',
92 input : 'journald-gperf.gperf',
93 output : 'journald-gperf.c',
94 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
95
96 systemd_cat_sources = files('cat.c')
97
98 journalctl_sources = files('journalctl.c')
99
100 if conf.get('HAVE_QRENCODE') == 1
101 journalctl_sources += files('journal-qrcode.c',
102 'journal-qrcode.h')
103 endif
104
105 install_data('journald.conf',
106 install_dir : pkgsysconfdir)
107
108 meson.add_install_script(
109 'sh', '-c',
110 mkdir_p.format('/var/log/journal'))
111 meson.add_install_script(
112 'sh', '-c',
113 'chown 0:0 $DESTDIR/var/log/journal &&
114 chmod 755 $DESTDIR/var/log/journal || :')
115 if get_option('adm-group')
116 meson.add_install_script(
117 'sh', '-c',
118 'setfacl -nm g:adm:rx,d:g:adm:rx $DESTDIR/var/log/journal || :')
119 endif
120 if get_option('wheel-group')
121 meson.add_install_script(
122 'sh', '-c',
123 'setfacl -nm g:wheel:rx,d:g:wheel:rx $DESTDIR/var/log/journal || :')
124 endif