From fc2a0c2aba0a8526412869349683cb04f1038465 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 10 Feb 2021 14:28:32 +0530 Subject: Add pre-installation environment script. The pre-inst-env script is required to find freshly built libraries and scheme files before installation. * pre-inst-env.in: New file. * CMakeLists.txt: Configure pre-inst-env.in with correct paths. --- CMakeLists.txt | 3 +++ pre-inst-env.in | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100755 pre-inst-env.in diff --git a/CMakeLists.txt b/CMakeLists.txt index beae2ff..5c0adf2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,3 +69,6 @@ if(${GUILE_FOUND}) install(FILES ${CMAKE_BINARY_DIR}/${SCM_WRAPPER_GO_PATH} DESTINATION ${CMAKE_INSTALL_LIBDIR}/guile/site/${GUILE_MAJOR_VERSION}.${GUILE_MINOR_VERSION}/site-ccache/extent-sampling) endif() + +# Configure environment wrapper script. +configure_file(pre-inst-env.in pre-inst-env @ONLY) diff --git a/pre-inst-env.in b/pre-inst-env.in new file mode 100755 index 0000000..2f0dfed --- /dev/null +++ b/pre-inst-env.in @@ -0,0 +1,7 @@ +#! /bin/sh + +export GUILE_LOAD_PATH="@CMAKE_BINARY_DIR@/scm${GUILE_LOAD_PATH:+:}${GUILE_LOAD_PATH}" +export GUILE_LOAD_COMPILED_PATH="@CMAKE_BINARY_DIR@/scm${GUILE_LOAD_COMPILED_PATH:+:}${GUILE_LOAD_COMPILED_PATH}" +export LD_LIBRARY_PATH="@CMAKE_BINARY_DIR@${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}" + +exec "$@" -- cgit v1.2.3