mirror of https://notabug.org/mthl/cuirass.git
cuirass: Hard code Guile load paths.
* configure.ac (bin/cuirass, bin/evaluate): Let 'make' generate them. * bin/cuirass.in: Hard code load paths to find Cuirass modules. * Makefile.am (do_subst): Update substitution. (bin/cuirass, bin/evaluate): New rules. (EXTRA_DIST): Distribute 'bin/cuirass.in' and 'bin/evaluate.in'. (MOSTLYCLEANFILES): Add '$(bin_SCRIPTS)'. (install-exec-hook): New target. (local_load_path, local_load_compiled_path): New variables. (AM_TESTS_ENVIRONMENT): Set Guile load paths. * build-aux/pre-inst-env.in: Don't modify Guile load paths.pull/3/head
parent
1e5012ca80
commit
4f0d665746
36
Makefile.am
36
Makefile.am
|
@ -1,5 +1,9 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
|
||||
# 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
|
||||
noinst_SCRIPTS = pre-inst-env
|
||||
|
||||
|
@ -26,7 +30,9 @@ TEST_EXTENSIONS = .scm .sh
|
|||
AM_TESTS_ENVIRONMENT = \
|
||||
env GUILE_AUTO_COMPILE='0' \
|
||||
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 = \
|
||||
$(builddir)/pre-inst-env $(GUILE) \
|
||||
|
@ -85,6 +91,8 @@ sql-check: src/schema.sql
|
|||
|
||||
EXTRA_DIST = \
|
||||
.dir-locals.el \
|
||||
bin/cuirass.in \
|
||||
bin/evaluate.in \
|
||||
bootstrap \
|
||||
src/cuirass/config.scm.in \
|
||||
tests/gnu-system.scm \
|
||||
|
@ -93,7 +101,7 @@ EXTRA_DIST = \
|
|||
tests/hello-subset.scm \
|
||||
$(TESTS)
|
||||
|
||||
MOSTLYCLEANFILES = src/cuirass/config.scm
|
||||
MOSTLYCLEANFILES = $(bin_SCRIPTS) src/cuirass/config.scm
|
||||
CLEANFILES = \
|
||||
$(nodist_guilesite_DATA) \
|
||||
$(dist_pkgmodule_DATA:%.scm=%.go) \
|
||||
|
@ -113,7 +121,11 @@ CLEANFILES = \
|
|||
do_subst = ( $(SED) \
|
||||
-e "s,@configure_input[@],Generated from $$in. Do not edit by hand.,g" \
|
||||
-e 's,@datadir[@],$(datadir),g' \
|
||||
-e 's,@datadir[@],$(datadir),g' \
|
||||
-e 's,@GUILE[@],$(GUILE),g' \
|
||||
-e 's,@localstatedir[@],$(localstatedir),g' \
|
||||
-e 's,@PACKAGE_LOAD_COMPILED_PATH[@],$(local_load_compiled_path),g' \
|
||||
-e 's,@PACKAGE_LOAD_PATH[@],$(local_load_path),g' \
|
||||
| $(SHELL) ./config.status --file=- )
|
||||
|
||||
# Generic instructions to perform the substitution. Generated files shouldn't
|
||||
|
@ -130,8 +142,12 @@ generate_file = \
|
|||
fi; \
|
||||
chmod a-w $@-t; mv -f $@-t $@
|
||||
|
||||
# This file depends on Makefile so it is rebuilt if $(VERSION),
|
||||
# These files depend on Makefile so they are rebuilt if $(VERSION),
|
||||
# $(datadir) or other do_subst'ituted variables change.
|
||||
bin/cuirass: $(srcdir)/bin/cuirass.in
|
||||
bin/evaluate: $(srcdir)/bin/evaluate.in
|
||||
$(bin_SCRIPTS): Makefile
|
||||
$(generate_file); chmod +x $@
|
||||
src/cuirass/config.scm: $(srcdir)/src/cuirass/config.scm.in Makefile
|
||||
$(generate_file)
|
||||
|
||||
|
@ -140,6 +156,20 @@ src/cuirass/config.scm: $(srcdir)/src/cuirass/config.scm.in Makefile
|
|||
go_files = $(nodist_guilesite_DATA) $(dist_pkgmodule_DATA:%.scm=%.go)
|
||||
$(go_files): src/cuirass/config.scm
|
||||
|
||||
## -------------- ##
|
||||
## Installation. ##
|
||||
## -------------- ##
|
||||
|
||||
# Relocate the script---i.e., have them refer to the installed module
|
||||
# directory.
|
||||
install-exec-hook:
|
||||
$(SED) \
|
||||
## XXX: Beware of the order of these two substitutions, because one is a
|
||||
## substring of the other.
|
||||
-e 's,$(local_load_path),$(guilesitedir),g' \
|
||||
-e 's,$(local_load_compiled_path),$(guilesitedir),g' \
|
||||
-i $(DESTDIR)$(bindir)/cuirass
|
||||
|
||||
## -------------- ##
|
||||
## Silent rules. ##
|
||||
## -------------- ##
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
#!/bin/sh
|
||||
# -*- scheme -*-
|
||||
# @configure_input@
|
||||
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"
|
||||
exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
|
||||
!#
|
||||
;;; cuirass -- continuous integration tool
|
||||
;;;; cuirass -- continuous integration tool
|
||||
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of Cuirass.
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#!/bin/sh
|
||||
# -*- scheme -*-
|
||||
# @configure_input@
|
||||
GUILE_LOAD_PATH="$1${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
|
||||
export GUILE_LOAD_PATH
|
||||
exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
|
||||
!#
|
||||
;;; evaluate -- convert a specification to a job list
|
||||
;;;; evaluate -- convert a specification to a job list
|
||||
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
|
||||
;;;
|
||||
|
|
|
@ -20,10 +20,6 @@
|
|||
abs_top_srcdir="`cd "@abs_top_srcdir@" > /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"
|
||||
export CUIRASS_DATADIR
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@ GUILE_MODULE_REQUIRED([json])
|
|||
GUILE_MODULE_REQUIRED([sqlite3])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_CONFIG_FILES([bin/cuirass], [chmod +x bin/cuirass])
|
||||
AC_CONFIG_FILES([bin/evaluate], [chmod +x bin/evaluate])
|
||||
AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in],
|
||||
[chmod +x pre-inst-env])
|
||||
AC_OUTPUT
|
||||
|
|
Loading…
Reference in New Issue