core: %moduledir ends with /.

* make/install.make (MODULEDIR): Append /.
  (install): Remove /.
* src/mes.c (load_env, bload_env): Update.
This commit is contained in:
Jan Nieuwenhuizen 2017-06-12 17:18:31 +02:00
parent 4479540aed
commit 766cfeab9a
2 changed files with 5 additions and 5 deletions

View file

@ -34,7 +34,7 @@ LIBDIR:=$(PREFIX)/lib
GODIR:=$(LIBDIR)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache
GUILEDIR:=$(PREFIX)/share/guile/site/$(GUILE_EFFECTIVE_VERSION)
MODULEDIR:=$(DATADIR)/module
MODULEDIR:=$(DATADIR)/module/
.tarball-version: tree-clean-p
echo $(COMMIT) > $@
@ -79,7 +79,7 @@ endif
-e 's,@DOCDIR@,$(DOCDIR)/,g' \
-e 's,@GODIR@,$(GODIR)/,g' \
-e 's,@GUILEDIR@,$(GUILEDIR)/,g' \
-e 's,@MODULEDIR@,$(MODULEDIR)/,g' \
-e 's,@MODULEDIR@,$(MODULEDIR),g' \
-e 's,@PREFIX@,$(PREFIX)/,g' \
-e 's,@VERSION@,$(VERSION),g' \
$(DESTDIR)$(DATADIR)/module/mes/base-0.mes \

View file

@ -1240,7 +1240,7 @@ load_env (SCM a) ///((internal))
{
r0 = a;
g_stdin = open ("module/mes/read-0.mes", O_RDONLY);
g_stdin = g_stdin >= 0 ? g_stdin : open (MODULEDIR "/mes/read-0.mes", O_RDONLY);
g_stdin = g_stdin >= 0 ? g_stdin : open (MODULEDIR "mes/read-0.mes", O_RDONLY);
if (!g_function) r0 = mes_builtins (r0);
r2 = read_input_file_env (r0);
g_stdin = STDIN;
@ -1253,11 +1253,11 @@ bload_env (SCM a) ///((internal))
#if __MESC__
char *mo = "mes/read-0-32.mo";
g_stdin = open ("module/mes/read-0-32.mo", O_RDONLY);
g_stdin = g_stdin >= 0 ? g_stdin : open (MODULEDIR "/mes/read-0-32.mo", O_RDONLY);
g_stdin = g_stdin >= 0 ? g_stdin : open (MODULEDIR "mes/read-0-32.mo", O_RDONLY);
#else
char *mo ="mes/read-0.mo";
g_stdin = open ("module/mes/read-0.mo", O_RDONLY);
g_stdin = g_stdin >= 0 ? g_stdin : open (MODULEDIR "/mes/read-0.mo", O_RDONLY);
g_stdin = g_stdin >= 0 ? g_stdin : open (MODULEDIR "mes/read-0.mo", O_RDONLY);
#endif
if (g_stdin < 0) {eputs ("no such file: ");eputs (mo);eputs ("\n");return 1;}