citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 7960a37cf2cd465a76993fe0fb1054e09aa64ccd
parent 37f3b429bd95681cb338b2a559de6d25dad6eb33
Author: kyle <kyle@0x30.net>
Date:   Tue, 17 Jan 2017 23:56:30 -0700

configure: try and get PREFIX working again

Diffstat:
Mconfigure | 17+++++++++++++----
Minst_fe.cc | 6++----
2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/configure b/configure @@ -9,8 +9,7 @@ echo Configuring... echo # These binaries are assumed throughout so make sure they are available. -type pkg-config -type jam +type pkg-config jam echo # Operating system specific variables. @@ -83,16 +82,26 @@ INST_LIBS="-lcurses -lLLVMCore -lLLVMSupport" +PREFIX=${PREFIX-`pwd`} +if [ ${PREFIX} == `pwd` ]; then + SHAREDIR=compilers + LIBDIR= +else + SHAREDIR=share/citrun + LIBDIR=lib +fi + # Write prefix.h cat <<EOF > prefix.h -static const char *prefix = R"(${PREFIX-`pwd`})"; +static const char *share_dir = R"(${PREFIX}/${SHAREDIR})"; +static const char *lib_dir = R"(${PREFIX}/${LIBDIR})"; EOF # Write citrun_wrap cat <<EOF > citrun_wrap #!/bin/sh -export PATH="${PREFIX-`pwd`}/compilers:\$PATH" +export PATH="${PREFIX}/${SHAREDIR}:\$PATH" exec \$@ EOF chmod +x citrun_wrap diff --git a/inst_fe.cc b/inst_fe.cc @@ -55,11 +55,9 @@ InstFrontend::log_identity() void InstFrontend::get_paths() { - m_compilers_path = prefix ; - m_compilers_path += dir_sep(); - m_compilers_path.append("compilers"); + m_compilers_path = share_dir ; - m_lib_path = prefix ; + m_lib_path = lib_dir ; m_lib_path += dir_sep(); m_lib_path += lib_name();