add `compile-time-environment'
[bpt/guile.git] / gdb-pre-inst-guile.in
CommitLineData
64da3c12
AW
1#!/bin/sh
2
3# Copyright (C) 2002, 2006, 2008 Free Software Foundation
4#
5# This file is part of GUILE.
6#
7# GUILE is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as
9# published by the Free Software Foundation; either version 2, or
10# (at your option) any later version.
11#
12# GUILE is distributed in the hope that it will be useful, but
13# WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public
18# License along with GUILE; see the file COPYING. If not, write
19# to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
20# Floor, Boston, MA 02110-1301 USA
21
22# Commentary:
23
24# Usage: pre-inst-guile [ARGS]
25#
26# This script arranges for the environment to support, and eventaully execs,
27# the uninstalled binary guile executable located somewhere under libguile/,
28# passing ARGS to it. In the process, env var GUILE is clobbered, and the
29# following env vars are modified (but not clobbered):
30# GUILE_LOAD_PATH
31# LTDL_LIBRARY_PATH
32#
33# This script can be used as a drop-in replacement for $bindir/guile;
34# if there is a discrepency in behavior, that's a bug.
35
36# Code:
37
38# env (set by configure)
39top_builddir="@top_builddir_absolute@"
40
41# set GUILE (clobber)
42GUILE=${top_builddir}/libguile/.libs/lt-guile
43export GUILE
44
45# do it
46exec ${top_builddir}/pre-inst-guile-env gdb --args $GUILE "$@"
47
48# never reached
49exit 1
50
51# pre-inst-guile ends here