samples: Use -std=c99 -pedantic when building
[libjio.git] / tests / util / build_lib_env.sh
blobffa870c8e1e866f751c7173914970419326b8c98
1 #!/usr/bin/env bash
3 # Apply the environment changes needed to use the built (and not the
4 # installed) versions of the library and Python bindings.
6 # They are useful for running tests before installing.
8 # Is intended use is to be sourced in the shell, for example:
10 # $ source build_lib_env.sh
11 # $ ./some-binary-using-the-library
13 # Although the most common users will be the other test scripts.
15 # We assume we're in the tests/util directory of the libjio source tree.
16 OURDIR=$(readlink -f $(dirname $0))
18 LIBBIN=$(readlink -f "$OURDIR"/../../libjio/build/libjio.so)
20 if ! [ -x "$LIBBIN" ]; then
21 echo "Can't find library (run make)"
22 exit 1
25 export "LD_LIBRARY_PATH=$(dirname $LIBBIN):$LD_LIBRARY_PATH"