citrun

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

commit 9b0838b7ffdb80b5e50d370a58aaafaba261ca65
parent 7764abe3e366d368a592e9986678af47e0f798a5
Author: Kyle Milz <kyle@0x30.net>
Date:   Fri,  8 Jul 2016 23:15:52 -0600

blow away CITRUN_PATH env var

Diffstat:
MTest/Project.pm | 3+--
MTest/Report.pm | 2+-
Msrc/inst_main.cc | 9+++------
Msrc/wrap.in | 9+--------
4 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/Test/Project.pm b/Test/Project.pm @@ -51,9 +51,8 @@ EOF # Use the tools in this source tree my $cwd = getcwd; - $ENV{CITRUN_PATH} = "$cwd/share"; $ENV{CITRUN_LIB} = "$cwd/lib/libcitrun.a"; - $ENV{PATH} = "$ENV{CITRUN_PATH}:$ENV{PATH}"; + $ENV{PATH} = "$cwd/share:$ENV{PATH}"; my $ret = system( "cd $tmp_dir && jam" ); die "make failed: $ret\n" if ($ret); diff --git a/Test/Report.pm b/Test/Report.pm @@ -48,7 +48,7 @@ SYSTEM INFO @<<<<<<<<<<<<<<<< @<<<<<<<<<<<<< "user:", `logname` @<<<<<<<<<<<<<<<< @<<<<<<<<<<<<< -"citrun version:", `citrun-wrap -v` +"citrun version:", 0 . write E2E_HEADER; diff --git a/src/inst_main.cc b/src/inst_main.cc @@ -30,12 +30,9 @@ static llvm::cl::OptionCategory ToolingCategory("instrument options"); void clean_path() { - char *citrun_path; char *path; - if ((citrun_path = getenv("CITRUN_PATH")) == NULL) - errx(1, "CITRUN_PATH not found in environment, exiting."); - else if ((path = getenv("PATH")) == NULL) + if ((path = getenv("PATH")) == NULL) errx(1, "PATH not set, your build system needs to use " "the PATH for this tool to be useful."); @@ -46,13 +43,13 @@ clean_path() bool first_component = 1; while (std::getline(path_ss, component, ':')) { - if (component.compare(citrun_path) == 0) + if (component.compare(STR(CITRUN_PATH)) == 0) continue; if (first_component == 0) new_path << ":"; - // It wasn't $CITRUN_PATH, keep it + // It wasn't CITRUN_PATH, keep it new_path << component; first_component = 0; } diff --git a/src/wrap.in b/src/wrap.in @@ -1,11 +1,4 @@ #!/bin/sh -if [ "${1}" = "-v" ]; then - echo %VERSION% - exit 0 -fi - -export CITRUN_PATH="%PREFIX%/share/citrun" -export PATH="$CITRUN_PATH:$PATH" - +export PATH="%PREFIX%/share:$PATH" exec $@