diff options
author | Paul Smith <psmith@gnu.org> | 2004-09-21 12:07:12 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2004-09-21 12:07:12 +0000 |
commit | 704c60cec021d75164c8a7c34bcd667e45f184e3 (patch) | |
tree | f910a966cede38013d111434ecf8e08e6547acd3 /commands.c | |
parent | 9714e501fb356adb043c77a3180a7f8c16c1484d (diff) | |
download | gunmake-704c60cec021d75164c8a7c34bcd667e45f184e3.tar.gz |
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.
Diffstat (limited to 'commands.c')
-rw-r--r-- | commands.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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; |