build: ./pre-inst-env MES_PREFIX fixup.

* build-aux/pre-inst-env.in: Set MES_PREFIX to abs_top_srcdir.
* src/mes.c (open_boot): Cater for MES_PREFIX/mes and ${srcdest}.
This commit is contained in:
Jan Nieuwenhuizen 2019-07-27 09:19:53 +02:00
parent c03807b78f
commit e8626841f3
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 7 additions and 3 deletions

View File

@ -26,7 +26,7 @@ prefix=${prefix-@prefix@}
export prefix
program_prefix=${program_prefix-@program_prefix@}
MES_PREFIX=${MES_PREFIX-${abs_top_srcdir}/mes}
MES_PREFIX=${MES_PREFIX-${abs_top_srcdir}}
export MES_PREFIX
GUILE_LOAD_COMPILED_PATH="$abs_top_builddir/scripts:$abs_top_builddir/module${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"

View File

@ -1788,6 +1788,7 @@ open_boot ()
if (getenv ("MES_PREFIX"))
{
strcpy (g_datadir, getenv ("MES_PREFIX"));
strcpy (g_datadir + strlen (g_datadir), "/mes");
strcpy (file_name, g_datadir);
strcpy (file_name + strlen (file_name), "/module/mes/");
__stdin = try_open_boot (file_name, boot, "MES_PREFIX");
@ -1809,10 +1810,13 @@ open_boot ()
}
if (__stdin < 0)
{
strcpy (g_datadir, "mes");
g_datadir[0] = 0;
if (getenv ("srcdest"))
strcpy (g_datadir, getenv ("srcdest"));
strcpy (g_datadir + strlen (g_datadir), "mes");
strcpy (file_name, g_datadir);
strcpy (file_name + strlen (file_name), "/module/mes/");
__stdin = try_open_boot (file_name, boot, "mes");
__stdin = try_open_boot (file_name, boot, "${srcdest}mes");
}
if (__stdin < 0)
{