Module: wine Branch: master Commit: 4c7a2b4cbbba5a76008d4c836f601d7da3642110 URL: https://source.winehq.org/git/wine.git/?a=commit;h=4c7a2b4cbbba5a76008d4c836...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Jan 21 09:50:12 2022 +0100
makefiles: Compare the full path when looking for generated include files.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
tools/makedep.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tools/makedep.c b/tools/makedep.c index 04cb14504b5..e7a71cb85d2 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -756,7 +756,16 @@ static struct incl_file *find_include_file( const struct makefile *make, const c struct incl_file *file;
LIST_FOR_EACH_ENTRY( file, &make->includes, struct incl_file, entry ) - if (!strcmp( name, file->name )) return file; + { + const char *filename = file->filename; + if (!filename) continue; + if (make->obj_dir && strlen(make->obj_dir) < strlen(filename)) + { + filename += strlen(make->obj_dir); + while (*filename == '/') filename++; + } + if (!strcmp( name, filename )) return file; + } return NULL; }