1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 22:01:15 +02:00

Use a meson "generator" to deduplicate .gen.hh creation

This commit is contained in:
John Ericson 2024-07-08 09:47:25 -04:00
parent d8850618b6
commit 6e5cec292b
5 changed files with 18 additions and 22 deletions

View file

@ -1,12 +1,7 @@
foreach header : [
generated_headers += gen_header.process(
'derivation.nix',
]
generated_headers += custom_target(
command : [ 'bash', '-c', '{ echo \'R"__NIX_STR(\' && cat @INPUT@ && echo \')__NIX_STR"\'; } > "$1"', '_ignored_argv0', '@OUTPUT@' ],
input : header,
output : '@PLAINNAME@.gen.hh',
)
endforeach
preserve_path_from: meson.project_source_root(),
)
sources += files(
'context.cc',