Commit 0e40db8a authored by Juan Manuel Cruz Alcaraz's avatar Juan Manuel Cruz Alcaraz Committed by Anas Nashif
Browse files

build: fixes issue in windows Kconfig support



It allows to silently ignore non-existent files.
When using wildcards in Kconfig source files
(e.g. source folder/*/Kconfig), it is possible to refer files
that does not exist. In the previous example, it is possible
that Kconfig files do not exist in one of the folder's
subfolders and it is not a requirement for the file to exist
in each one of the subfolders.

Additionally, it fixes an issue for wildcards in the file name.
If the name contains a wildcard, Kconfig should iterate
over each file included in the wildcard
(e.g source folder/myKconfig.*)

Jira: ZEP-177
Change-Id: I5aa192ca1e2df83461b12a86fe29a98cd95c4256
Signed-off-by: default avatarJuan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
parent 51503a23
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -407,8 +407,13 @@ void win_process_files(const char *files_path)

	if (hFind != INVALID_HANDLE_VALUE) {
		do {
			char *strfile;
			GetFullPathName(fullname, PATH_MAX, path, lppPart);
			strcpy(fullname, path);
			strfile = strrchr(fullname, '\\');
			if(strfile){
				sprintf(strfile, "\\%s", FindFileData.cFileName);
			}
			zconf_nextfile(fullname);
		} while (FindNextFile(hFind, &FindFileData) != 0);

@@ -417,8 +422,6 @@ void win_process_files(const char *files_path)
		if (dwError != ERROR_NO_MORE_FILES) {
			printf ("Error processing '%s' #%lu.\n", fullname, dwError);
		}
	} else {
		printf ("Error processing '%s' #%lu.\n", fullname, GetLastError());
	}
}

+5 −2
Original line number Diff line number Diff line
@@ -2462,8 +2462,13 @@ void win_process_files(const char *files_path)

	if (hFind != INVALID_HANDLE_VALUE) {
		do {
			char *strfile;
			GetFullPathName(fullname, PATH_MAX, path, lppPart);
			strcpy(fullname, path);
			strfile = strrchr(fullname, '\\');
			if(strfile){
				sprintf(strfile, "\\%s", FindFileData.cFileName);
			}
			zconf_nextfile(fullname);
		} while (FindNextFile(hFind, &FindFileData) != 0);

@@ -2472,8 +2477,6 @@ void win_process_files(const char *files_path)
		if (dwError != ERROR_NO_MORE_FILES) {
			printf ("Error processing '%s' #%lu.\n", fullname, dwError);
		}
	} else {
		printf ("Error processing '%s' #%lu.\n", fullname, GetLastError());
	}
}