diff --git a/aclocal.m4 b/aclocal.m4 index 4fc6cd4e57a..830ec2ff8f8 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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 () diff --git a/configure b/configure index 6c09a96529e..4dae327e4e9 100755 --- a/configure +++ b/configure @@ -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 () diff --git a/tools/makedep.c b/tools/makedep.c index b9f194851ba..a0b7ff595ad 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -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 );