Mercurial > emacs
changeset 57609:5aefaad0a5f1
(init_environment): Set emacs_dir correctly when running
emacs from the build directory.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Tue, 19 Oct 2004 19:08:58 +0000 |
parents | e0b59ff186d0 |
children | daa7d844014b |
files | src/w32.c |
diffstat | 1 files changed, 26 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w32.c Tue Oct 19 16:58:30 2004 +0000 +++ b/src/w32.c Tue Oct 19 19:08:58 2004 +0000 @@ -1005,6 +1005,32 @@ _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname); _putenv (strdup (buf)); } + /* Handle running emacs from the build directory: src/oo-spd/i386/ */ + + /* FIXME: should use substring of get_emacs_configuration (). + But I don't think the Windows build supports alpha, mips etc + anymore, so have taken the easy option for now. */ + else if (p && stricmp (p, "\\i386") == 0) + { + *p = 0; + p = strrchr (modname, '\\'); + if (p != NULL) + { + *p = 0; + p = strrchr (modname, '\\'); + if (p && stricmp (p, "\\src") == 0) + { + char buf[SET_ENV_BUF_SIZE]; + + *p = 0; + for (p = modname; *p; p++) + if (*p == '\\') *p = '/'; + + _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname); + _putenv (strdup (buf)); + } + } + } } for (i = 0; i < (sizeof (env_vars) / sizeof (env_vars[0])); i++)