Statistics
| Branch: | Tag: | Revision:

root / setup_guile_test_env.in @ d1d80474

History | View | Annotate | Download (2.3 kB)

1
#!/bin/sh
2
3
# This is sourced by run_guile_tests to establish the environment
4
# variables required to run the tests in the build tree.
5
6
abs_top_srcdir=@abs_top_srcdir@
7
abs_top_builddir=@abs_top_builddir@
8
9
10
# FIXME add in OS/X DYLD_LIBRARY_PATH
11
# FIXME add in cywin*/win*/mingw* PATH
12
# FIXME add in withdirs
13
14
15
# 1st argument is absolute path to component C++ shared library build directory
16
# 2nd argument is absolute path to hand coded guile source directory
17
# 3nd argument is absolute path to component SWIG build directory
18
19
function add_local_paths(){
20
  if [ $# -ne 3 ]
21
  then
22
    echo "$0: requires 3 args" 1>&2
23
    exit 1
24
  fi
25
  echo FIXME: $0: implement add_local_paths
26
  # [ -n "$1" ] && prepend LTDL_LIBRARY_PATH "$1/.libs"
27
  # [ -n "$2" ] && prepend GUILE_LOAD_PATH "$2"
28
  # [ -n "$3" ] && prepend LTDL_LIBRARY_PATH "$3/.libs"
29
  # [ -n "$3" ] && prepend GUILE_LOAD_PATH "$3/guile"
30
}
31
32
# usage: prepend <path-varname> <dir>
33
function prepend(){
34
  if [ $# -ne 2 ]
35
  then
36
    echo "$0: prepend needs 2 args" 1>&2
37
    exit 1
38
  fi
39
  local path="$1" dir="$2" contents=""
40
  eval "contents=\$$path"
41
  #echo "path = $path"
42
  #echo "dir = $dir"
43
  #echo "contents = $contents"
44
  if [ "$dir" != "" ]
45
  then
46
    if [ "$contents" = "" ]
47
    then
48
      eval "$path=\"$dir\""
49
    else
50
      eval "$path=\"$dir:$contents\""
51
    fi
52
  fi
53
54
  #echo end-of-prepend: $path=${!path}
55
}
56
57
# ------------------------------------------------------------------------
58
# Everybody gets gruel and gnuradio-core for free.
59
# FIXME Eventually this should be gruel and gnuradio-runtime.
60
# ------------------------------------------------------------------------
61
62
# Where to search for not yet installed C++ shared libraries
63
prepend mylibdir $abs_top_builddir/gruel/src/lib/.libs
64
prepend mylibdir $abs_top_builddir/gnuradio-core/src/lib/.libs
65
66
# Where to search for not yet installed swig generated guile libs
67
prepend mylibdir $abs_top_builddir/gnuradio-core/src/lib/swig/.libs
68
69
# Where to seach for guile code.
70
prepend guile_load_path $abs_top_srcdir/gnuradio-core/src/guile
71
prepend guile_load_path $abs_top_builddir/gnuradio-core/src/lib/swig
72
73
#echo "mylibdir = $mylibdir"
74
#echo "guile_load_path = $guile_load_path"
75
76
prepend LTDL_LIBRARY_PATH "$mylibdir"
77
prepend GUILE_LOAD_PATH "$guile_load_path"
78
79
export LTDL_LIBRARY_PATH
80
export GUILE_LOAD_PATH
81
export GUILE_WARN_DEPRECATED=no