From 4c7a2b4cbbba5a76008d4c836f601d7da3642110 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 21 Jan 2022 09:50:12 +0100 Subject: [PATCH] makefiles: Compare the full path when looking for generated include files. Signed-off-by: Alexandre Julliard --- 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; }