mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
Use a meson "generator" to deduplicate .gen.hh
creation
This commit is contained in:
parent
d8850618b6
commit
6e5cec292b
5 changed files with 18 additions and 22 deletions
|
@ -116,20 +116,17 @@ lexer_tab = custom_target(
|
|||
install_dir : get_option('includedir') / 'nix',
|
||||
)
|
||||
|
||||
subdir('build-utils-meson/generate-header')
|
||||
|
||||
generated_headers = []
|
||||
foreach header : [
|
||||
'imported-drv-to-derivation.nix',
|
||||
'fetchurl.nix',
|
||||
'call-flake.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',
|
||||
)
|
||||
generated_headers += gen_header.process(header)
|
||||
endforeach
|
||||
|
||||
|
||||
sources = files(
|
||||
'attr-path.cc',
|
||||
'attr-set.cc',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue