make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU make 4.2 (and 4.2.1) failing due to length of command-line


From: Paul Smith
Subject: Re: GNU make 4.2 (and 4.2.1) failing due to length of command-line
Date: Wed, 22 Jun 2016 15:57:28 -0400

On Wed, 2016-06-22 at 19:47 +0000, Adrian Muresan wrote:
> In config.h, I uncommented the line
> /* #define BATCH_MODE_ONLY_SHELL 1 */
> 
> this affects job.c
> 
>   static const char *sh_cmds_sh[] =
>     { "cd", "eval", "exec", "exit", "login", "logout", "set",
> "umask", "wait",
>       "while", "for", "case", "if", ":", ".", "break", "continue",
> "export",
>       "read", "readonly", "shift", "times", "trap", "switch", "test",
> #ifdef BATCH_MODE_ONLY_SHELL
>       "echo",
> #endif
>       0 };

I can see where you might think this makes a difference, but really
this is not relevant.  These are used to decide whether or not to use
the "fast path" or require a shell to run the recipe.  Your script is
complex enough that make will always decide to run the shell so having
"echo" in this list won't make any difference.

The thing that is relevant to your situation is in main.c:

    if (!unixy_shell && sh_found
        && (strstr (default_shell, "sh") || strstr (default_shell, "SH")))
      {
        unixy_shell = 1;
        batch_mode_shell = 0;
      }

  #ifdef BATCH_MODE_ONLY_SHELL
    batch_mode_shell = 1;
  #endif

Here we first decide that we have a UNIX-like shell (because make finds
your sh.exe); if that's true then we disable batch_mode_shell because a
UNIX shell should be sufficiently powerful to not need it.

Setting that config.h option causes batch_mode_shell to be set to 1
(true) always, in all situations.

That change is what's working around your broken shell.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]