mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Revert "Unexpose config headers (low hanging fruit only) (backport #12773)"
This commit is contained in:
parent
3e59cc0552
commit
ce209f1cd7
15 changed files with 82 additions and 25 deletions
|
@ -63,7 +63,9 @@ add_project_arguments(
|
||||||
# It would be nice for our headers to be idempotent instead.
|
# It would be nice for our headers to be idempotent instead.
|
||||||
'-include', 'config-util.hh',
|
'-include', 'config-util.hh',
|
||||||
'-include', 'config-store.hh',
|
'-include', 'config-store.hh',
|
||||||
|
# '-include', 'config-fetchers.h',
|
||||||
'-include', 'config-expr.hh',
|
'-include', 'config-expr.hh',
|
||||||
|
'-include', 'config-main.hh',
|
||||||
'-include', 'config-cmd.hh',
|
'-include', 'config-cmd.hh',
|
||||||
language : 'cpp',
|
language : 'cpp',
|
||||||
)
|
)
|
||||||
|
@ -91,7 +93,7 @@ sources = files(
|
||||||
|
|
||||||
include_dirs = [include_directories('.')]
|
include_dirs = [include_directories('.')]
|
||||||
|
|
||||||
headers = files(
|
headers = [config_h] + files(
|
||||||
'built-path.hh',
|
'built-path.hh',
|
||||||
'command-installable-value.hh',
|
'command-installable-value.hh',
|
||||||
'command.hh',
|
'command.hh',
|
||||||
|
@ -117,7 +119,6 @@ subdir('nix-meson-build-support/windows-version')
|
||||||
this_library = library(
|
this_library = library(
|
||||||
'nixcmd',
|
'nixcmd',
|
||||||
sources,
|
sources,
|
||||||
config_h,
|
|
||||||
dependencies : deps_public + deps_private + deps_other,
|
dependencies : deps_public + deps_private + deps_other,
|
||||||
include_directories : include_dirs,
|
include_directories : include_dirs,
|
||||||
link_args: linker_export_flags,
|
link_args: linker_export_flags,
|
||||||
|
|
|
@ -14,6 +14,8 @@ cxx = meson.get_compiler('cpp')
|
||||||
|
|
||||||
subdir('nix-meson-build-support/deps-lists')
|
subdir('nix-meson-build-support/deps-lists')
|
||||||
|
|
||||||
|
configdata = configuration_data()
|
||||||
|
|
||||||
deps_private_maybe_subproject = [
|
deps_private_maybe_subproject = [
|
||||||
dependency('nix-util'),
|
dependency('nix-util'),
|
||||||
dependency('nix-store'),
|
dependency('nix-store'),
|
||||||
|
@ -25,6 +27,14 @@ deps_public_maybe_subproject = [
|
||||||
]
|
]
|
||||||
subdir('nix-meson-build-support/subprojects')
|
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(
|
add_project_arguments(
|
||||||
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
|
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
|
||||||
# It would be nice for our headers to be idempotent instead.
|
# It would be nice for our headers to be idempotent instead.
|
||||||
|
@ -34,6 +44,10 @@ add_project_arguments(
|
||||||
'-include', 'config-store.hh',
|
'-include', 'config-store.hh',
|
||||||
'-include', 'config-expr.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',
|
language : 'cpp',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -47,7 +61,7 @@ sources = files(
|
||||||
|
|
||||||
include_dirs = [include_directories('.')]
|
include_dirs = [include_directories('.')]
|
||||||
|
|
||||||
headers = files(
|
headers = [config_h] + files(
|
||||||
'nix_api_expr.h',
|
'nix_api_expr.h',
|
||||||
'nix_api_external.h',
|
'nix_api_external.h',
|
||||||
'nix_api_value.h',
|
'nix_api_value.h',
|
||||||
|
|
|
@ -41,6 +41,9 @@ add_project_arguments(
|
||||||
'-include', 'config-util.hh',
|
'-include', 'config-util.hh',
|
||||||
'-include', 'config-store.hh',
|
'-include', 'config-store.hh',
|
||||||
'-include', 'config-expr.hh',
|
'-include', 'config-expr.hh',
|
||||||
|
'-include', 'config-util.h',
|
||||||
|
'-include', 'config-store.h',
|
||||||
|
'-include', 'config-expr.h',
|
||||||
language : 'cpp',
|
language : 'cpp',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@ cxx = meson.get_compiler('cpp')
|
||||||
|
|
||||||
subdir('nix-meson-build-support/deps-lists')
|
subdir('nix-meson-build-support/deps-lists')
|
||||||
|
|
||||||
|
configdata = configuration_data()
|
||||||
|
|
||||||
deps_private_maybe_subproject = [
|
deps_private_maybe_subproject = [
|
||||||
dependency('nix-util'),
|
dependency('nix-util'),
|
||||||
dependency('nix-store'),
|
dependency('nix-store'),
|
||||||
|
@ -27,6 +29,14 @@ deps_public_maybe_subproject = [
|
||||||
]
|
]
|
||||||
subdir('nix-meson-build-support/subprojects')
|
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-flake.h',
|
||||||
|
)
|
||||||
|
|
||||||
add_project_arguments(
|
add_project_arguments(
|
||||||
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
|
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
|
||||||
# It would be nice for our headers to be idempotent instead.
|
# It would be nice for our headers to be idempotent instead.
|
||||||
|
@ -38,6 +48,11 @@ add_project_arguments(
|
||||||
# not generated (yet?)
|
# not generated (yet?)
|
||||||
# '-include', 'config-flake.hh',
|
# '-include', 'config-flake.hh',
|
||||||
|
|
||||||
|
# From C libraries, for our public, installed headers too
|
||||||
|
'-include', 'config-util.h',
|
||||||
|
'-include', 'config-store.h',
|
||||||
|
'-include', 'config-expr.h',
|
||||||
|
'-include', 'config-flake.h',
|
||||||
language : 'cpp',
|
language : 'cpp',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -49,7 +64,7 @@ sources = files(
|
||||||
|
|
||||||
include_dirs = [include_directories('.')]
|
include_dirs = [include_directories('.')]
|
||||||
|
|
||||||
headers = files(
|
headers = [config_h] + files(
|
||||||
'nix_api_flake.h',
|
'nix_api_flake.h',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@ cxx = meson.get_compiler('cpp')
|
||||||
|
|
||||||
subdir('nix-meson-build-support/deps-lists')
|
subdir('nix-meson-build-support/deps-lists')
|
||||||
|
|
||||||
|
configdata = configuration_data()
|
||||||
|
|
||||||
deps_private_maybe_subproject = [
|
deps_private_maybe_subproject = [
|
||||||
dependency('nix-util'),
|
dependency('nix-util'),
|
||||||
dependency('nix-store'),
|
dependency('nix-store'),
|
||||||
|
@ -25,6 +27,14 @@ deps_public_maybe_subproject = [
|
||||||
]
|
]
|
||||||
subdir('nix-meson-build-support/subprojects')
|
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-main.h',
|
||||||
|
)
|
||||||
|
|
||||||
add_project_arguments(
|
add_project_arguments(
|
||||||
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
|
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
|
||||||
# It would be nice for our headers to be idempotent instead.
|
# It would be nice for our headers to be idempotent instead.
|
||||||
|
@ -32,7 +42,12 @@ add_project_arguments(
|
||||||
# From C++ libraries, only for internals
|
# From C++ libraries, only for internals
|
||||||
'-include', 'config-util.hh',
|
'-include', 'config-util.hh',
|
||||||
'-include', 'config-store.hh',
|
'-include', 'config-store.hh',
|
||||||
|
'-include', 'config-main.hh',
|
||||||
|
|
||||||
|
# From C libraries, for our public, installed headers too
|
||||||
|
'-include', 'config-util.h',
|
||||||
|
'-include', 'config-store.h',
|
||||||
|
'-include', 'config-main.h',
|
||||||
language : 'cpp',
|
language : 'cpp',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -44,7 +59,7 @@ sources = files(
|
||||||
|
|
||||||
include_dirs = [include_directories('.')]
|
include_dirs = [include_directories('.')]
|
||||||
|
|
||||||
headers = files(
|
headers = [config_h] + files(
|
||||||
'nix_api_main.h',
|
'nix_api_main.h',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ endif
|
||||||
|
|
||||||
include_dirs = [include_directories('.')]
|
include_dirs = [include_directories('.')]
|
||||||
|
|
||||||
headers = files(
|
headers = [config_h] + files(
|
||||||
'common-args.hh',
|
'common-args.hh',
|
||||||
'loggers.hh',
|
'loggers.hh',
|
||||||
'plugin.hh',
|
'plugin.hh',
|
||||||
|
@ -88,7 +88,6 @@ subdir('nix-meson-build-support/windows-version')
|
||||||
this_library = library(
|
this_library = library(
|
||||||
'nixmain',
|
'nixmain',
|
||||||
sources,
|
sources,
|
||||||
config_h,
|
|
||||||
dependencies : deps_public + deps_private + deps_other,
|
dependencies : deps_public + deps_private + deps_other,
|
||||||
include_directories : include_dirs,
|
include_directories : include_dirs,
|
||||||
link_args: linker_export_flags,
|
link_args: linker_export_flags,
|
||||||
|
|
|
@ -14,6 +14,8 @@ cxx = meson.get_compiler('cpp')
|
||||||
|
|
||||||
subdir('nix-meson-build-support/deps-lists')
|
subdir('nix-meson-build-support/deps-lists')
|
||||||
|
|
||||||
|
configdata = configuration_data()
|
||||||
|
|
||||||
deps_private_maybe_subproject = [
|
deps_private_maybe_subproject = [
|
||||||
dependency('nix-util'),
|
dependency('nix-util'),
|
||||||
dependency('nix-store'),
|
dependency('nix-store'),
|
||||||
|
@ -23,6 +25,14 @@ deps_public_maybe_subproject = [
|
||||||
]
|
]
|
||||||
subdir('nix-meson-build-support/subprojects')
|
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-store.h',
|
||||||
|
)
|
||||||
|
|
||||||
add_project_arguments(
|
add_project_arguments(
|
||||||
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
|
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
|
||||||
# It would be nice for our headers to be idempotent instead.
|
# It would be nice for our headers to be idempotent instead.
|
||||||
|
@ -31,6 +41,9 @@ add_project_arguments(
|
||||||
'-include', 'config-util.hh',
|
'-include', 'config-util.hh',
|
||||||
'-include', 'config-store.hh',
|
'-include', 'config-store.hh',
|
||||||
|
|
||||||
|
# From C libraries, for our public, installed headers too
|
||||||
|
'-include', 'config-util.h',
|
||||||
|
'-include', 'config-store.h',
|
||||||
language : 'cpp',
|
language : 'cpp',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -42,7 +55,7 @@ sources = files(
|
||||||
|
|
||||||
include_dirs = [include_directories('.')]
|
include_dirs = [include_directories('.')]
|
||||||
|
|
||||||
headers = files(
|
headers = [config_h] + files(
|
||||||
'nix_api_store.h',
|
'nix_api_store.h',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,8 @@ add_project_arguments(
|
||||||
# It would be nice for our headers to be idempotent instead.
|
# It would be nice for our headers to be idempotent instead.
|
||||||
'-include', 'config-util.hh',
|
'-include', 'config-util.hh',
|
||||||
'-include', 'config-store.hh',
|
'-include', 'config-store.hh',
|
||||||
|
'-include', 'config-util.h',
|
||||||
|
'-include', 'config-store.h',
|
||||||
language : 'cpp',
|
language : 'cpp',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,6 @@ endforeach
|
||||||
has_acl_support = cxx.has_header('sys/xattr.h') \
|
has_acl_support = cxx.has_header('sys/xattr.h') \
|
||||||
and cxx.has_function('llistxattr') \
|
and cxx.has_function('llistxattr') \
|
||||||
and cxx.has_function('lremovexattr')
|
and cxx.has_function('lremovexattr')
|
||||||
# TODO: used in header - make proper public header and make sure it's included. Affects ABI!
|
|
||||||
configdata.set('HAVE_ACL_SUPPORT', has_acl_support.to_int())
|
configdata.set('HAVE_ACL_SUPPORT', has_acl_support.to_int())
|
||||||
|
|
||||||
if host_machine.system() == 'darwin'
|
if host_machine.system() == 'darwin'
|
||||||
|
|
|
@ -23,6 +23,7 @@ deps_public_maybe_subproject = [
|
||||||
]
|
]
|
||||||
subdir('nix-meson-build-support/subprojects')
|
subdir('nix-meson-build-support/subprojects')
|
||||||
|
|
||||||
|
# TODO rename, because it will conflict with downstream projects
|
||||||
configdata.set_quoted('PACKAGE_VERSION', meson.project_version())
|
configdata.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||||
|
|
||||||
config_h = configure_file(
|
config_h = configure_file(
|
||||||
|
@ -37,6 +38,8 @@ add_project_arguments(
|
||||||
# From C++ libraries, only for internals
|
# From C++ libraries, only for internals
|
||||||
'-include', 'config-util.hh',
|
'-include', 'config-util.hh',
|
||||||
|
|
||||||
|
# From C libraries, for our public, installed headers too
|
||||||
|
'-include', 'config-util.h',
|
||||||
language : 'cpp',
|
language : 'cpp',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -48,7 +51,7 @@ sources = files(
|
||||||
|
|
||||||
include_dirs = [include_directories('.')]
|
include_dirs = [include_directories('.')]
|
||||||
|
|
||||||
headers = files(
|
headers = [config_h] + files(
|
||||||
'nix_api_util.h',
|
'nix_api_util.h',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -61,7 +64,6 @@ subdir('nix-meson-build-support/windows-version')
|
||||||
this_library = library(
|
this_library = library(
|
||||||
'nixutilc',
|
'nixutilc',
|
||||||
sources,
|
sources,
|
||||||
config_h,
|
|
||||||
dependencies : deps_public + deps_private + deps_other,
|
dependencies : deps_public + deps_private + deps_other,
|
||||||
include_directories : include_dirs,
|
include_directories : include_dirs,
|
||||||
link_args: linker_export_flags,
|
link_args: linker_export_flags,
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
#include <cxxabi.h>
|
#include <cxxabi.h>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
|
||||||
#include "config-util.h"
|
|
||||||
|
|
||||||
nix_c_context * nix_c_context_create()
|
nix_c_context * nix_c_context_create()
|
||||||
{
|
{
|
||||||
return new nix_c_context();
|
return new nix_c_context();
|
||||||
|
|
|
@ -32,16 +32,11 @@ deps_private += rapidcheck
|
||||||
gtest = dependency('gtest', main : true)
|
gtest = dependency('gtest', main : true)
|
||||||
deps_private += gtest
|
deps_private += gtest
|
||||||
|
|
||||||
configdata = configuration_data()
|
|
||||||
configdata.set_quoted('PACKAGE_VERSION', meson.project_version())
|
|
||||||
|
|
||||||
config_h = configure_file(
|
|
||||||
configuration : configdata,
|
|
||||||
output : 'config-util-tests.hh',
|
|
||||||
)
|
|
||||||
|
|
||||||
add_project_arguments(
|
add_project_arguments(
|
||||||
'-include', 'config-util-tests.hh',
|
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
|
||||||
|
# It would be nice for our headers to be idempotent instead.
|
||||||
|
'-include', 'config-util.hh',
|
||||||
|
'-include', 'config-util.h',
|
||||||
language : 'cpp',
|
language : 'cpp',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -84,7 +79,6 @@ include_dirs = [include_directories('.')]
|
||||||
this_exe = executable(
|
this_exe = executable(
|
||||||
meson.project_name(),
|
meson.project_name(),
|
||||||
sources,
|
sources,
|
||||||
config_h,
|
|
||||||
dependencies : deps_private_subproject + deps_private + deps_other,
|
dependencies : deps_private_subproject + deps_private + deps_other,
|
||||||
include_directories : include_dirs,
|
include_directories : include_dirs,
|
||||||
# TODO: -lrapidcheck, see ../libutil-support/build.meson
|
# TODO: -lrapidcheck, see ../libutil-support/build.meson
|
||||||
|
|
|
@ -33,14 +33,12 @@ check_funcs = [
|
||||||
'pipe2',
|
'pipe2',
|
||||||
# Optionally used to preallocate files to be large enough before
|
# Optionally used to preallocate files to be large enough before
|
||||||
# writing to them.
|
# writing to them.
|
||||||
# WARNING: define also used in libstore
|
|
||||||
'posix_fallocate',
|
'posix_fallocate',
|
||||||
# Optionally used to get more information about processes failing due
|
# Optionally used to get more information about processes failing due
|
||||||
# to a signal on Unix.
|
# to a signal on Unix.
|
||||||
'strsignal',
|
'strsignal',
|
||||||
# Optionally used to try to close more file descriptors (e.g. before
|
# Optionally used to try to close more file descriptors (e.g. before
|
||||||
# forking) on Unix.
|
# forking) on Unix.
|
||||||
# WARNING: also used in libexpr
|
|
||||||
'sysconf',
|
'sysconf',
|
||||||
# Optionally used for changing the mtime of files and symlinks.
|
# Optionally used for changing the mtime of files and symlinks.
|
||||||
'utimensat',
|
'utimensat',
|
||||||
|
|
|
@ -57,6 +57,9 @@ add_project_arguments(
|
||||||
'-include', 'config-util.hh',
|
'-include', 'config-util.hh',
|
||||||
'-include', 'config-store.hh',
|
'-include', 'config-store.hh',
|
||||||
'-include', 'config-expr.hh',
|
'-include', 'config-expr.hh',
|
||||||
|
#'-include', 'config-fetchers.hh',
|
||||||
|
'-include', 'config-main.hh',
|
||||||
|
'-include', 'config-cmd.hh',
|
||||||
'-include', 'config-nix-cli.hh',
|
'-include', 'config-nix-cli.hh',
|
||||||
language : 'cpp',
|
language : 'cpp',
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,6 +6,7 @@ libplugintest = shared_module(
|
||||||
# It would be nice for our headers to be idempotent instead.
|
# It would be nice for our headers to be idempotent instead.
|
||||||
'-include', 'config-util.hh',
|
'-include', 'config-util.hh',
|
||||||
'-include', 'config-store.hh',
|
'-include', 'config-store.hh',
|
||||||
|
# '-include', 'config-fetchers.hh',
|
||||||
'-include', 'config-expr.hh',
|
'-include', 'config-expr.hh',
|
||||||
],
|
],
|
||||||
dependencies : [
|
dependencies : [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue