From 704c60cec021d75164c8a7c34bcd667e45f184e3 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Tue, 21 Sep 2004 12:07:12 +0000 Subject: 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. --- commands.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'commands.c') diff --git a/commands.c b/commands.c index b202f6c..6fdb5bb 100644 --- a/commands.c +++ b/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; -- cgit v1.2.3