Set search paths explicitly in the geesh script

* configure.ac: Do not treat scripts/geesh as an AC_CONFIG_FILE.
* Makefile.am: Do the substitutions here (at make-time).
* scripts/geesh.in: Update %load-path and %load-compiled-path
explicitly before loading anything.
This commit is contained in:
Timothy Sample 2018-12-04 22:33:36 -05:00
parent 79e5c6eafc
commit 9fd1eb9edf
3 changed files with 16 additions and 1 deletions

View File

@ -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)

View File

@ -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])

View File

@ -20,6 +20,9 @@
;;; You should have received a copy of the GNU General Public License
;;; along with Geesh. If not, see <http://www.gnu.org/licenses/>.
(add-to-load-path "@MODDIR@")
(set! %load-compiled-path (cons "@GODIR@" %load-compiled-path))
(use-modules (geesh repl)
(ice-9 getopt-long))