Debian Codegraph @

src/libsystemd/sd-journal/meson.build

raw
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2
3 # We're generating a header file here intended to be included
4 # by audit-type.c. To make that work, we have to add the generated
5 # header file's directory to the include directories for libsystemd.
6 # In meson, adding include directories is done via include_directories(),
7 # which always adds two include directories for each argument, one relative to
8 # the source directory and one relative to the build directory. We don't
9 # want to add src/libsystemd to the include directories, yet custom_target()
10 # does not allow path segments in its output argument, so to make sure the
11 # generated header is written to src/libsystemd/sd-journal in the build directory,
12 # the custom_target() has to be defined here in src/libsystemd/sd-journal
13 # in the source directory.
14
15 generate_audit_type_list = files('generate-audit_type-list.sh')
16 audit_type_list_txt = custom_target(
17 input : [generate_audit_type_list, audit_sources],
18 output : 'audit_type-list.txt',
19 command : [env, 'bash', generate_audit_type_list, cpp, system_include_args],
20 capture : true)
21
22 audit_type_to_name = custom_target(
23 input : ['audit_type-to-name.awk', audit_type_list_txt],
24 output : 'audit_type-to-name.inc',
25 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
26 capture : true)