Commit 51b57133 authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Generate dummy dependencies for header files.

This allows building when a header file is removed. Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 431b6459
......@@ -200,6 +200,7 @@ struct makefile
struct strarray implib_objs;
struct strarray all_targets;
struct strarray phony_targets;
struct strarray dependencies;
struct strarray install_rules[NB_INSTALL_RULES];
};
......@@ -426,6 +427,17 @@ static void strarray_add_uniq( struct strarray *array, const char *str )
/*******************************************************************
* strarray_addall_uniq
*/
static void strarray_addall_uniq( struct strarray *array, struct strarray added )
{
unsigned int i;
for (i = 0; i < added.count; i++) strarray_add_uniq( array, added.str[i] );
}
/*******************************************************************
* strarray_get_value
*
* Find a value in a name/value pair string array.
......@@ -3643,7 +3655,7 @@ static void output_sources( struct makefile *make )
if (!strcmp( ext, output_source_funcs[j].ext )) break;
output_source_funcs[j].fn( make, source, obj );
free( obj );
strarray_addall_uniq( &make->dependencies, source->dependencies );
}
/* special case for winetest: add resource files from other test dirs */
......@@ -3705,9 +3717,14 @@ static void output_sources( struct makefile *make )
output_uninstall_rules( make );
}
if (make->dependencies.count)
{
output_filenames( make->dependencies );
output( ":\n" );
}
strarray_addall( &make->clean_files, make->object_files );
for (i = 0; i < make->crossobj_files.count; i++)
strarray_add_uniq( &make->clean_files, make->crossobj_files.str[i] );
strarray_addall_uniq( &make->clean_files, make->crossobj_files );
strarray_addall( &make->clean_files, make->all_targets );
strarray_addall( &make->clean_files, get_expanded_make_var_array( make, "EXTRA_TARGETS" ));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment