Adapt fixdep to support Windows.
Text files on windows are be created with a different format for line endings. This commit improves the host tool 'fixdep' to support files with the windows-style line endings. Change-Id: I1d120790c5cbb1f1e7df6761821bc7e01c99b988 Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
This commit is contained in:
parent
b8a0d15784
commit
2ccaed8720
1 changed files with 5 additions and 3 deletions
|
@ -328,11 +328,12 @@ static void parse_dep_file(void *map, size_t len)
|
|||
|
||||
while (m < end) {
|
||||
/* Skip any "white space" */
|
||||
while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))
|
||||
while (m < end && (*m == ' ' || *m == '\\' || *m == '\n' || *m == '\r'))
|
||||
m++;
|
||||
/* Find next "white space" */
|
||||
p = m;
|
||||
while (p < end && *p != ' ' && *p != '\\' && *p != '\n')
|
||||
while (p < end && *p != ' ' && !(*p == '\\' && *(p+1) == '\r')
|
||||
&& *p != '\r' && *p != '\n')
|
||||
p++;
|
||||
/* Is the token we found a target name? */
|
||||
is_target = (*(p-1) == ':');
|
||||
|
@ -346,7 +347,8 @@ static void parse_dep_file(void *map, size_t len)
|
|||
s[p - m] = 0;
|
||||
|
||||
/* Ignore certain dependencies */
|
||||
if (strrcmp(s, "include/generated/autoconf.h") &&
|
||||
if ((m < end) &&
|
||||
strrcmp(s, "include/generated/autoconf.h") &&
|
||||
strrcmp(s, "arch/um/include/uml-config.h") &&
|
||||
strrcmp(s, "include/linux/kconfig.h") &&
|
||||
strrcmp(s, ".ver")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue