dtc/pylibfdt/meson.build
Brandon Maier bb51223083 meson: fix dependencies of tests
If the tests are run without a full compile they will fail. For example
with the following.

> rm -rf build/
> meson setup build/
> meson test -C build/

This is because the tests rely on the devicetree tools and test
executables.

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2024-03-19 15:25:39 +11:00

13 lines
433 B
Meson

setup_py = find_program('../setup.py')
setup_py = [setup_py, '--quiet', '--top-builddir', meson.project_build_root()]
pylibfdt = custom_target(
'pylibfdt',
input: 'libfdt.i',
depends: libfdt,
output: '_libfdt.so',
command: [setup_py, 'build_ext', '--build-lib=' + meson.current_build_dir()],
build_by_default: true,
)
meson.add_install_script(setup_py, 'install', '--prefix=' + get_option('prefix'), '--root=$DESTDIR')