How to detect install during dist

10 views
Skip to first unread message

Lorenzo Cappelletti

unread,
Oct 18, 2024, 1:58:29 AM10/18/24
to The Meson Build System
Hi everyone,

I'd like to know if meson has a reliable flag to use in a `add_install_script` for detecting that the install phase is running because of a command `meson dist`.

Because when executing dist, install phase sees:
 - MESON_SOURCE_ROOT=<user-build>/meson-private/dist-unpack/<name>-<ver>
 - MESON_BUILD_ROOT =<user-build>/meson-private/dist-build

at the moment I'm using something like:
```sh
[[ basename $MESON_BUILD_ROOT = dist-build
   basename $MESON_SOURCE_ROOT = dist-unpack
   realpath $MESON_SOURCE_ROOT/../.. = realpath $MESON_BUILD_ROOT/.. ]]
```

PS: I want to pack the compiled and tested binaries when dist'ing and avoid the packing with `meson install`.
Reply all
Reply to author
Forward
0 new messages