guile.in 1.7 KB

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