Commit 2b59daf3 authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Generate the top-level test rules from makedep.

parent 1c31b75e
......@@ -309,23 +309,7 @@ wine_fn_config_test ()
wine_fn_append_file ALL_TEST_RESOURCES $ac_name.res
wine_fn_all_rules
wine_fn_append_rule \
"$ac_dir: __builddeps__
programs/winetest: $ac_dir
check test: $ac_dir/test
.PHONY: $ac_dir/test
$ac_dir/test: dummy
@cd $ac_dir && \$(MAKE) test"
if test -n "$CROSSTARGET"
then
wine_fn_append_rule \
"crosstest: $ac_dir/crosstest
.PHONY: $ac_dir/crosstest
$ac_dir/crosstest: __builddeps__ dummy
@cd $ac_dir && \$(MAKE) crosstest"
fi
wine_fn_append_rule "$ac_dir: __builddeps__"
}
wine_fn_config_tool ()
......
......@@ -7816,23 +7816,7 @@ fi
wine_fn_append_file ALL_TEST_RESOURCES $ac_name.res
wine_fn_all_rules
wine_fn_append_rule \
"$ac_dir: __builddeps__
programs/winetest: $ac_dir
check test: $ac_dir/test
.PHONY: $ac_dir/test
$ac_dir/test: dummy
@cd $ac_dir && \$(MAKE) test"
if test -n "$CROSSTARGET"
then
wine_fn_append_rule \
"crosstest: $ac_dir/crosstest
.PHONY: $ac_dir/crosstest
$ac_dir/crosstest: __builddeps__ dummy
@cd $ac_dir && \$(MAKE) crosstest"
fi
wine_fn_append_rule "$ac_dir: __builddeps__"
}
wine_fn_config_tool ()
......
......@@ -3406,6 +3406,8 @@ static void output_subdirs( struct makefile *make )
struct strarray testclean_files = empty_strarray;
struct strarray distclean_files = empty_strarray;
struct strarray tools_deps = empty_strarray;
struct strarray winetest_deps = empty_strarray;
struct strarray crosstest_deps = empty_strarray;
unsigned int i, j;
strarray_add( &tools_deps, tools_dir_path( make, "widl" ));
......@@ -3483,6 +3485,20 @@ static void output_subdirs( struct makefile *make )
}
if (submake->disabled) continue;
if (submake->testdll)
{
output( "check test::\n" );
output( "\t@cd %s && $(MAKE) test\n", subdir );
strarray_add( &winetest_deps, subdir );
if (crosstarget)
{
char *target = base_dir_path( submake, "crosstest" );
output( "crosstest: %s\n", target );
output( "%s: __builddeps__ dummy\n", target );
output( "\t@cd %s && $(MAKE) crosstest\n", subdir );
strarray_add( &crosstest_deps, target );
}
}
if (submake->install_rules[INSTALL_LIB].count)
{
output( "install install-lib:: %s\n", submake->base_dir );
......@@ -3499,14 +3515,23 @@ static void output_subdirs( struct makefile *make )
output( "\n" );
output_filenames( makefile_deps );
output( ":\n" );
output( "programs/winetest:" );
output_filenames( winetest_deps );
output( "\n" );
output( "crosstest:" );
output_filenames( crosstest_deps );
output( "\n" );
output( "clean::\n");
output_rm_filenames( clean_files );
output( "testclean::\n");
output_rm_filenames( testclean_files );
output( "distclean::\n");
output_rm_filenames( distclean_files );
strarray_add( &make->phony_targets, "check" );
strarray_add( &make->phony_targets, "test" );
strarray_add( &make->phony_targets, "distclean" );
strarray_add( &make->phony_targets, "testclean" );
strarray_addall( &make->phony_targets, crosstest_deps );
strarray_addall( &make->clean_files, symlinks );
strarray_addall( &build_deps, symlinks );
......
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