diff --git a/Makefile.am b/Makefile.am index bcbb58f..63ac36d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -76,6 +76,15 @@ MODULES = \ bin_SCRIPTS = \ scripts/geesh +do_subst = sed \ + -e 's,[@]GUILE[@],$(GUILE),g' \ + -e 's,[@]MODDIR[@],$(moddir),g' \ + -e 's,[@]GODIR[@],$(godir),g' + +scripts/geesh: scripts/geesh.in Makefile + $(do_subst) < $(srcdir)/scripts/geesh.in > scripts/geesh + chmod a+x scripts/geesh + TESTS = \ tests/lexer.scm \ tests/parser.scm \ @@ -83,8 +92,12 @@ TESTS = \ tests/shell.scm \ tests/word.scm +EXTRA_DIST = \ + scripts/geesh.in + CLEANFILES = \ $(GOBJECTS) \ + $(bin_SCRIPTS) \ $(TESTS:tests/%.scm=%.log) \ $(TESTS:tests/%.scm=%.trs) diff --git a/configure.ac b/configure.ac index cea23ae..180143d 100644 --- a/configure.ac +++ b/configure.ac @@ -12,7 +12,6 @@ AM_CONDITIONAL([HAVE_GENHTML], [test -n $GENHTML]) AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env]) -AC_CONFIG_FILES([scripts/geesh], [chmod +x scripts/geesh]) AC_CONFIG_FILES([tests/config.scm]) AC_CONFIG_FILES([tests/spec/Makefile]) AC_CONFIG_FILES([tools/coverage], [chmod +x tools/coverage]) diff --git a/scripts/geesh.in b/scripts/geesh.in index 738c053..fa8001f 100644 --- a/scripts/geesh.in +++ b/scripts/geesh.in @@ -20,6 +20,9 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with Geesh. If not, see . +(add-to-load-path "@MODDIR@") +(set! %load-compiled-path (cons "@GODIR@" %load-compiled-path)) + (use-modules (geesh repl) (ice-9 getopt-long))