diff options
author | Paul Smith <psmith@gnu.org> | 2007-10-13 14:46:04 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2007-10-13 14:46:04 +0000 |
commit | 0b17d143bad61827a5b6e54772fb3fc3a33f765d (patch) | |
tree | 94ec536959aa45cb056476d7163582ab01df4ffb /variable.c | |
parent | 2a23064da537eec5520495fa7033ab66cd8e5bfe (diff) | |
download | gunmake-0b17d143bad61827a5b6e54772fb3fc3a33f765d.tar.gz |
Windows: allow SHELL to be set to a more complex value by checking its
expansion to see if it's a valid shell, not just the unexpanded value.
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -1188,7 +1188,24 @@ do_variable_definition (const struct floc *flocp, const char *varname, no_default_sh_exe = 0; } else - v = lookup_variable (varname, strlen (varname)); + { + if (alloc_value) + free (alloc_value); + + alloc_value = allocated_variable_expand (p); + if (find_and_set_default_shell (alloc_value)) + { + v = define_variable_in_set (varname, strlen (varname), p, + origin, flavor == f_recursive, + (target_var + ? current_variable_set_list->set + : NULL), + flocp); + no_default_sh_exe = 0; + } + else + v = lookup_variable (varname, strlen (varname)); + } } else #endif |