Skip to content

Commit 5d8fe99

Browse files
pks-tgitster
authored andcommitted
meson: wire up development environments
The Meson build system is able to wire up development environments. The intent is to make build artifacts of the project available. This is typically used to export e.g. paths to linkable libraries, which isn't all that interesting in our context given that we don't have an official library interface. But what we can use this mechanism for is to expose the built Git executables as well as the build directory. This allows users to play around with the built Git version in the devenv, and allows them to execute our test scripts directly with the built distribution. Wire up this feature, which can then be used via `meson devenv` in the build directory. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 502d069 commit 5d8fe99

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

meson.build

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,6 +1932,14 @@ configure_file(
19321932
configuration: build_options_config,
19331933
)
19341934

1935+
# Development environments can be used via `meson devenv -C <builddir>`. This
1936+
# allows you to execute test scripts directly with the built Git version and
1937+
# puts the built version of Git in your PATH.
1938+
devenv = environment()
1939+
devenv.set('GIT_BUILD_DIR', meson.current_build_dir())
1940+
devenv.prepend('PATH', meson.current_build_dir() / 'bin-wrappers')
1941+
meson.add_devenv(devenv)
1942+
19351943
summary({
19361944
'curl': curl.found(),
19371945
'expat': expat.found(),

0 commit comments

Comments
 (0)