1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 23:11:16 +02:00

Unexpose config headers (low hanging fruit only)

- Some headers were completely redundant and have been removed.
- Other headers have been turned private.
- Unnecessary meson.build code has been removed.
- libutil-tests now has a private config header, where previously
  it had none. This removes the need to expose a package version
  macro publicly.
This commit is contained in:
Robert Hensing 2025-03-28 14:14:45 +00:00
parent 83ec81789a
commit b86a76044e
15 changed files with 25 additions and 82 deletions

View file

@ -14,8 +14,6 @@ cxx = meson.get_compiler('cpp')
subdir('nix-meson-build-support/deps-lists')
configdata = configuration_data()
deps_private_maybe_subproject = [
dependency('nix-util'),
dependency('nix-store'),
@ -27,14 +25,6 @@ deps_public_maybe_subproject = [
]
subdir('nix-meson-build-support/subprojects')
# TODO rename, because it will conflict with downstream projects
configdata.set_quoted('PACKAGE_VERSION', meson.project_version())
config_h = configure_file(
configuration : configdata,
output : 'config-expr.h',
)
add_project_arguments(
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
# It would be nice for our headers to be idempotent instead.
@ -44,10 +34,6 @@ add_project_arguments(
'-include', 'config-store.hh',
'-include', 'config-expr.hh',
# From C libraries, for our public, installed headers too
'-include', 'config-util.h',
'-include', 'config-store.h',
'-include', 'config-expr.h',
language : 'cpp',
)
@ -61,7 +47,7 @@ sources = files(
include_dirs = [include_directories('.')]
headers = [config_h] + files(
headers = files(
'nix_api_expr.h',
'nix_api_external.h',
'nix_api_value.h',