diff -Nur make-3.80/job.c make-3.80-tresos/job.c --- make-3.80/job.c 2002-08-10 03:27:17.000000000 +0200 +++ make-3.80-tresos/job.c 2004-12-06 16:22:01.000000000 +0100 @@ -32,7 +32,7 @@ /* Default shell to use. */ #ifdef WINDOWS32 -char *default_shell = "sh.exe"; +char *default_shell = "command.com"; int no_default_sh_exe = 1; int batch_mode_shell = 1; #else /* WINDOWS32 */ @@ -2497,7 +2497,7 @@ #ifdef WINDOWS32 int slow_flag = 0; - if (no_default_sh_exe) { + if (1) { sh_cmds = sh_cmds_dos; sh_chars = sh_chars_dos; } else { @@ -2524,7 +2524,7 @@ char *s1 = _fullpath(NULL, shell, 0); char *s2 = _fullpath(NULL, default_shell, 0); - slow_flag = strcmp((s1 ? s1 : ""), (s2 ? s2 : "")); + slow_flag = 0; /* strcmp((s1 ? s1 : ""), (s2 ? s2 : "")); */ if (s1) free (s1); diff -Nur make-3.80/variable.c make-3.80-tresos/variable.c --- make-3.80/variable.c 2002-10-04 04:13:42.000000000 +0200 +++ make-3.80-tresos/variable.c 2004-11-08 13:09:34.000000000 +0100 @@ -579,7 +579,7 @@ ? "" : remote_description); (void) define_variable ("MAKE_VERSION", 12, buf, o_default, 0); -#ifdef __MSDOS__ +#if 1 /* Allow to specify a special shell just for Make, and use $COMSPEC as the default $SHELL when appropriate. */ { @@ -587,6 +587,8 @@ const int shlen = sizeof (shell_str) - 1; struct variable *mshp = lookup_variable ("MAKESHELL", 9); struct variable *comp = lookup_variable ("COMSPEC", 7); + char* comspec = getenv("COMSPEC"); + struct variable *shp = lookup_variable (shell_str, shlen); /* Make $MAKESHELL override $SHELL even if -e is in effect. */ if (mshp) @@ -595,11 +597,18 @@ else if (comp) { /* $COMSPEC shouldn't override $SHELL. */ - struct variable *shp = lookup_variable (shell_str, shlen); - if (!shp) + if (!shp) { (void) define_variable (shell_str, shlen, comp->value, o_env, 0); + } + } + else if (comspec) + { + if (!shp) { + (void) define_variable (shell_str, shlen, comspec, o_env, 0); + } } + } #endif @@ -611,7 +620,7 @@ /* On MSDOS we do use SHELL from environment, since it isn't a standard environment variable on MSDOS, so whoever sets it, does that on purpose. */ -#ifndef __MSDOS__ +#if 0 /* Don't let SHELL come from the environment. */ if (*v->value == '\0' || v->origin == o_env || v->origin == o_env_override) { @@ -621,6 +630,8 @@ } #endif + v = lookup_variable ("SHELL", strlen ("SHELL")); + /* Make sure MAKEFILES gets exported if it is set. */ v = define_variable ("MAKEFILES", 9, "", o_default, 0); v->export = v_ifset; diff -Nur make-3.80/w32/include/sub_proc.h make-3.80-tresos/w32/include/sub_proc.h --- make-3.80/w32/include/sub_proc.h 1997-08-27 22:34:23.000000000 +0200 +++ make-3.80-tresos/w32/include/sub_proc.h 2003-09-17 18:29:32.000000000 +0200 @@ -4,14 +4,14 @@ /* * Component Name: * - * $Date: 1997/08/27 20:34:23 $ + * $Date: 2003/09/17 16:29:32 $ * - * $Source: /cvsroot/make/make/w32/include/sub_proc.h,v $ + * $Source: /pro/CVS/TRESOS/TRESOS/dev/tools/make-3.80/w32/include/sub_proc.h,v $ * - * $Revision: 1.4 $ + * $Revision: 1.1 $ */ -/* $Id: sub_proc.h,v 1.4 1997/08/27 20:34:23 psmith Exp $ */ +/* $Id: sub_proc.h,v 1.1 2003/09/17 16:29:32 herrmanu Exp $ */ #ifdef WINDOWS32