tools/cnvwindeps.c: Omit dependency paths that include spaces

This commit is contained in:
Gregory Nutt
2016-01-11 08:01:42 -06:00
parent 586b31abc5
commit a0c4c071ed
4 changed files with 41 additions and 32 deletions

14
TODO
View File

@@ -1,4 +1,4 @@
NuttX TODO List (Last updated January 3, 2016) NuttX TODO List (Last updated January 11, 2016)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This file summarizes known NuttX bugs, limitations, inconsistencies with This file summarizes known NuttX bugs, limitations, inconsistencies with
@@ -24,7 +24,7 @@ nuttx/
(11) File system/Generic drivers (fs/, drivers/) (11) File system/Generic drivers (fs/, drivers/)
(8) Graphics subsystem (graphics/) (8) Graphics subsystem (graphics/)
(1) Pascal add-on (pcode/) (1) Pascal add-on (pcode/)
(2) Build system / Toolchains (1) Build system / Toolchains
(3) Linux/Cywgin simulation (arch/sim) (3) Linux/Cywgin simulation (arch/sim)
(5) ARM (arch/arm/) (5) ARM (arch/arm/)
@@ -1586,16 +1586,6 @@ o Pascal Add-On (pcode/)
o Build system o Build system
^^^^^^^^^^^^ ^^^^^^^^^^^^
Title: WINDOWS DEPENDENCY GENERATION
Description: Dependency generation is currently disabled when a Windows native
toolchain is used in a POSIX-like environment (like Cygwin). The
issue is that the Windows tool generates dependencies use Windows
path formatting and this fails with the dependency file (Make.dep)
is include). Perhaps the only issue is that all of the Windows
dependencies needed to be quoted in the Make.dep files.
Status: Open
Priority: Low -- unless some dependency-related build issues is discovered.
Title: MAKE EXPORT LIMITATIONS Title: MAKE EXPORT LIMITATIONS
Description: The top-level Makefile 'export' target that will bundle up all of the Description: The top-level Makefile 'export' target that will bundle up all of the
NuttX libraries, header files, and the startup object into an export-able NuttX libraries, header files, and the startup object into an export-able

2
arch

Submodule arch updated: 1a314699cf...ad4ca80846

Submodule configs updated: 097e95b685...5eb7ce1631

View File

@@ -99,6 +99,15 @@ static char *find_spaces(char *ptr)
return ptr; return ptr;
} }
static bool scour_path(const char *path)
{
/* KLUDGE: GNU make cannot handle dependencies with spaces in them.
* There may be addition characters that cause problems too.
*/
return strchr(path, ' ') != NULL;
}
static bool dequote_path(const char *winpath) static bool dequote_path(const char *winpath)
{ {
char *dest = g_dequoted; char *dest = g_dequoted;
@@ -175,6 +184,7 @@ int main(int argc, char **argv, char **envp)
FILE *stream; FILE *stream;
bool begin; bool begin;
bool quoted; bool quoted;
bool scouring;
if (argc != 2) if (argc != 2)
{ {
@@ -189,7 +199,8 @@ int main(int argc, char **argv, char **envp)
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
begin = true; begin = true;
scouring = false;
g_lineno = 0; g_lineno = 0;
while (fgets(g_line, MAX_LINE, stream) != NULL) while (fgets(g_line, MAX_LINE, stream) != NULL)
@@ -214,15 +225,19 @@ int main(int argc, char **argv, char **envp)
*next++ = '\0'; *next++ = '\0';
} }
quoted = convert_path(path); scouring = scour_path(path);
if (quoted) if (!scouring)
{ {
printf("\"%s\":", g_posix); quoted = convert_path(path);
} if (quoted)
else {
{ printf("\"%s\":", g_posix);
printf("%s:", g_posix); }
} else
{
printf("%s:", g_posix);
}
}
begin = false; begin = false;
} }
@@ -238,7 +253,8 @@ int main(int argc, char **argv, char **envp)
else if (strcmp(path, "") == 0) else if (strcmp(path, "") == 0)
{ {
printf("\n\n"); printf("\n\n");
begin = true; begin = true;
scouring = false;
break; break;
} }
else else
@@ -248,15 +264,18 @@ int main(int argc, char **argv, char **envp)
*next++ = '\0'; *next++ = '\0';
} }
quoted = convert_path(path); if (!scouring && !scour_path(path))
if (quoted)
{ {
printf(" \\\n\t\"%s\"", g_posix); quoted = convert_path(path);
} if (quoted)
else {
{ printf(" \\\n\t\"%s\"", g_posix);
printf(" \\\n\t%s", g_posix); }
} else
{
printf(" \\\n\t%s", g_posix);
}
}
} }
} }
} }