From 9da7d620efad6b14685f2c25a706affd4e5f7b53 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 11 Sep 2020 09:53:23 +0200 Subject: [PATCH] makefiles: Also store the basename without object dir for generated files. Signed-off-by: Alexandre Julliard --- tools/makedep.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index 62fa5163199..7a559302c01 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -76,6 +76,7 @@ struct incl_file struct file *file; char *name; char *filename; + char *basename; /* base target name for generated files */ char *sourcename; /* source file name for generated headers */ struct incl_file *included_by; /* file that included this one */ int included_line; /* line where this file was included */ @@ -975,7 +976,8 @@ static struct incl_file *add_generated_source( struct makefile *make, memset( file, 0, sizeof(*file) ); file->file = add_file( name ); file->name = xstrdup( name ); - file->filename = obj_dir_path( make, filename ? filename : name ); + file->basename = xstrdup( filename ? filename : name ); + file->filename = obj_dir_path( make, file->basename ); file->file->flags = FLAG_GENERATED; file->use_msvcrt = make->use_msvcrt; list_add_tail( &make->sources, &file->entry ); @@ -3122,7 +3124,7 @@ static void output_source_default( struct makefile *make, struct incl_file *sour if ((source->file->flags & FLAG_GENERATED) && (!make->testdll || !strendswith( source->filename, "testlist.c" ))) - strarray_add( &make->clean_files, source->filename ); + strarray_add( &make->clean_files, source->basename ); if (source->file->flags & FLAG_C_IMPLIB) strarray_add( &make->implib_objs, strmake( "%s.o", obj )); if (need_obj)