diff --git a/ChangeLog b/ChangeLog index 141409e93b2..d507b518941 100755 --- a/ChangeLog +++ b/ChangeLog @@ -11300,3 +11300,6 @@ * tools/mkdeps.c: Deleted mkdeps.sh and mkdeps.bat. The mkdeps executable generated from mkdeps.c is now that the only supported way to make dependencies (2016-01-09). + * tools/mkdeps.c: Extended/fixed support for --winpath option. + Dependencies now work under Cygwin with a native Windows toolchain + (2016-01-10). diff --git a/tools/mkdeps.c b/tools/mkdeps.c index 378deab28f1..fd4c8dc07d9 100644 --- a/tools/mkdeps.c +++ b/tools/mkdeps.c @@ -112,9 +112,9 @@ static bool g_winpath = false; #endif static char g_command[MAX_BUFFER]; -static char g_expand[MAX_EXPAND]; static char g_path[MAX_PATH]; #ifdef HOST_CYGWIN +static char g_expand[MAX_EXPAND]; static char g_dequoted[MAX_PATH]; static char g_posixpath[MAX_PATH]; #endif @@ -413,6 +413,7 @@ static void parse_args(int argc, char **argv) static const char *do_expand(const char *argument) { +#ifdef HOST_CYGWIN if (g_winpath) { const char *src; @@ -480,6 +481,7 @@ static const char *do_expand(const char *argument) return g_expand; } else +#endif { return argument; } @@ -591,7 +593,11 @@ static void do_dependency(const char *file) /* Initialize the separator */ +#ifdef HOST_CYGWIN separator = (g_winnative || g_winpath) ? '\\' : '/'; +#else + separator = g_winnative ? '\\' : '/'; +#endif /* Copy the compiler into the command buffer */