mirror of https://notabug.org/mthl/cuirass.git
build: Set Guile load paths in 'pre-inst-env'.
This reverts most of 4f0d665746
. The load paths
are still hard coded after installation, however 'pre-inst-env' wrapper is
used for defining them in the local build environment. This is more
convenient for running the tests manually or launching a Guile REPL with all
the Cuirass modules accessible.
* build-aux/pre-inst-env.in (GUILE_LOAD_PATH, GUILE_LOAD_COMPILED_PATH): New
variables.
* bin/cuirass.in: Comment Guile load paths.
* Makefile.am (local_load_path, local_load_compiled_path): Delete.
(AM_TESTS_ENVIRONMENT): Don't set Guile load paths.
(do_subst): Use install directories for Guile load paths.
(install-exec-hook): Uncomment 'cuirass' hard coded load paths.
pull/3/head
parent
16aec469d4
commit
57e10c6056
20
Makefile.am
20
Makefile.am
|
@ -18,10 +18,6 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with Cuirass. If not, see <http://www.gnu.org/licenses/>.
|
# along with Cuirass. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Guile local load paths.
|
|
||||||
local_load_path = $(abs_top_builddir)/src:$(abs_top_srcdir)/src
|
|
||||||
local_load_compiled_path = $(abs_top_builddir)/src
|
|
||||||
|
|
||||||
bin_SCRIPTS = bin/cuirass bin/evaluate
|
bin_SCRIPTS = bin/cuirass bin/evaluate
|
||||||
noinst_SCRIPTS = pre-inst-env
|
noinst_SCRIPTS = pre-inst-env
|
||||||
|
|
||||||
|
@ -49,9 +45,7 @@ TEST_EXTENSIONS = .scm .sh
|
||||||
AM_TESTS_ENVIRONMENT = \
|
AM_TESTS_ENVIRONMENT = \
|
||||||
env GUILE_AUTO_COMPILE='0' \
|
env GUILE_AUTO_COMPILE='0' \
|
||||||
testsrcdir='$(abs_top_srcdir)/tests' \
|
testsrcdir='$(abs_top_srcdir)/tests' \
|
||||||
testbuilddir='$(abs_top_builddir)/tests' \
|
testbuilddir='$(abs_top_builddir)/tests'
|
||||||
GUILE_LOAD_PATH="$(local_load_path)$${GUILE_LOAD_PATH:+:}$$GUILE_LOAD_PATH" \
|
|
||||||
GUILE_LOAD_COMPILED_PATH="$(local_load_compiled_path)$${GUILE_LOAD_COMPILED_PATH:+:}$$GUILE_LOAD_COMPILED_PATH"
|
|
||||||
|
|
||||||
SCM_LOG_DRIVER = \
|
SCM_LOG_DRIVER = \
|
||||||
$(builddir)/pre-inst-env $(GUILE) \
|
$(builddir)/pre-inst-env $(GUILE) \
|
||||||
|
@ -139,8 +133,8 @@ do_subst = ( $(SED) \
|
||||||
-e 's,@datadir[@],$(datadir),g' \
|
-e 's,@datadir[@],$(datadir),g' \
|
||||||
-e 's,@GUILE[@],$(GUILE),g' \
|
-e 's,@GUILE[@],$(GUILE),g' \
|
||||||
-e 's,@localstatedir[@],$(localstatedir),g' \
|
-e 's,@localstatedir[@],$(localstatedir),g' \
|
||||||
-e 's,@PACKAGE_LOAD_COMPILED_PATH[@],$(local_load_compiled_path),g' \
|
-e 's,@PACKAGE_LOAD_COMPILED_PATH[@],$(guilesitedir),g' \
|
||||||
-e 's,@PACKAGE_LOAD_PATH[@],$(local_load_path),g' \
|
-e 's,@PACKAGE_LOAD_PATH[@],$(guilesitedir),g' \
|
||||||
| $(SHELL) ./config.status --file=- )
|
| $(SHELL) ./config.status --file=- )
|
||||||
|
|
||||||
# Generic instructions to perform the substitution. Generated files shouldn't
|
# Generic instructions to perform the substitution. Generated files shouldn't
|
||||||
|
@ -188,14 +182,10 @@ nobase_dist_pkgdata_DATA = \
|
||||||
## Installation. ##
|
## Installation. ##
|
||||||
## -------------- ##
|
## -------------- ##
|
||||||
|
|
||||||
# Relocate the script---i.e., have them refer to the installed module
|
# Ensure that the scripts will find their module directories.
|
||||||
# directory.
|
|
||||||
install-exec-hook:
|
install-exec-hook:
|
||||||
$(SED) \
|
$(SED) \
|
||||||
## XXX: Beware of the order of these two substitutions, because one is a
|
-e 's,^#GUILE_LOAD,GUILE_LOAD,g' \
|
||||||
## substring of the other.
|
|
||||||
-e 's,$(local_load_path),$(guilesitedir),g' \
|
|
||||||
-e 's,$(local_load_compiled_path),$(guilesitedir),g' \
|
|
||||||
-i $(DESTDIR)$(bindir)/cuirass
|
-i $(DESTDIR)$(bindir)/cuirass
|
||||||
|
|
||||||
## -------------- ##
|
## -------------- ##
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- scheme -*-
|
# -*- scheme -*-
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
GUILE_LOAD_PATH="@PACKAGE_LOAD_PATH@${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
|
#GUILE_LOAD_PATH="@PACKAGE_LOAD_PATH@${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
|
||||||
GUILE_LOAD_COMPILED_PATH="@PACKAGE_LOAD_COMPILED_PATH@${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
|
#GUILE_LOAD_COMPILED_PATH="@PACKAGE_LOAD_COMPILED_PATH@${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
|
||||||
exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
|
exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
|
||||||
!#
|
!#
|
||||||
;;;; cuirass -- continuous integration tool
|
;;;; cuirass -- continuous integration tool
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
abs_top_srcdir="`cd "@abs_top_srcdir@" > /dev/null; pwd`"
|
abs_top_srcdir="`cd "@abs_top_srcdir@" > /dev/null; pwd`"
|
||||||
abs_top_builddir="`cd "@abs_top_builddir@" > /dev/null; pwd`"
|
abs_top_builddir="`cd "@abs_top_builddir@" > /dev/null; pwd`"
|
||||||
|
|
||||||
|
GUILE_LOAD_COMPILED_PATH="$abs_top_builddir/src${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
|
||||||
|
GUILE_LOAD_PATH="$abs_top_builddir/src:$abs_top_srcdir/src${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
|
||||||
|
export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH
|
||||||
|
|
||||||
CUIRASS_DATADIR="$abs_top_srcdir/src"
|
CUIRASS_DATADIR="$abs_top_srcdir/src"
|
||||||
export CUIRASS_DATADIR
|
export CUIRASS_DATADIR
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue