mirror of
https://github.com/mirror/make.git
synced 2026-09-06 06:35:00 +08:00
Remove sindex() and replace with strstr().
Windows: allow users to set SHELL to cmd.exe and have it behave as if no UNIX shell were found.
This commit is contained in:
12
commands.c
12
commands.c
@@ -346,13 +346,11 @@ chop_commands (struct commands *cmds)
|
||||
flags |= COMMANDS_NOERROR;
|
||||
break;
|
||||
}
|
||||
if (!(flags & COMMANDS_RECURSE))
|
||||
{
|
||||
unsigned int len = strlen (p);
|
||||
if (sindex (p, len, "$(MAKE)", 7) != 0
|
||||
|| sindex (p, len, "${MAKE}", 7) != 0)
|
||||
flags |= COMMANDS_RECURSE;
|
||||
}
|
||||
|
||||
/* If no explicit '+' was given, look for MAKE variable references. */
|
||||
if (!(flags & COMMANDS_RECURSE)
|
||||
&& (strstr (p, "$(MAKE)") != 0 || strstr (p, "${MAKE}") != 0))
|
||||
flags |= COMMANDS_RECURSE;
|
||||
|
||||
cmds->lines_flags[idx] = flags;
|
||||
cmds->any_recurse |= flags & COMMANDS_RECURSE;
|
||||
|
||||
Reference in New Issue
Block a user