Commit acc6306b authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Generate the winetest resource list from makedep.

parent 2fa7ae05
...@@ -96,7 +96,6 @@ LIBWINE_INSTALL_LIB = @LIBWINE_INSTALL_LIB@ ...@@ -96,7 +96,6 @@ LIBWINE_INSTALL_LIB = @LIBWINE_INSTALL_LIB@
LIBWINE_INSTALL_DEV = @LIBWINE_INSTALL_DEV@ LIBWINE_INSTALL_DEV = @LIBWINE_INSTALL_DEV@
LIBWINE_LDFLAGS = @LIBWINE_LDFLAGS@ LIBWINE_LDFLAGS = @LIBWINE_LDFLAGS@
LIBWINE_DEPENDS = @LIBWINE_DEPENDS@ LIBWINE_DEPENDS = @LIBWINE_DEPENDS@
ALL_TEST_RESOURCES = @ALL_TEST_RESOURCES@
DISABLED_SUBDIRS = @DISABLED_SUBDIRS@ DISABLED_SUBDIRS = @DISABLED_SUBDIRS@
CONFIGURE_TARGETS = @CONFIGURE_TARGETS@ CONFIGURE_TARGETS = @CONFIGURE_TARGETS@
@ALL_VARS_RULES@ @ALL_VARS_RULES@
......
...@@ -218,7 +218,6 @@ rm -f $wine_rules_file ...@@ -218,7 +218,6 @@ rm -f $wine_rules_file
AC_SUBST(SUBDIRS,"") AC_SUBST(SUBDIRS,"")
AC_SUBST(DISABLED_SUBDIRS,"") AC_SUBST(DISABLED_SUBDIRS,"")
AC_SUBST(CONFIGURE_TARGETS,"") AC_SUBST(CONFIGURE_TARGETS,"")
AC_SUBST(ALL_TEST_RESOURCES,"")
wine_fn_append_file () wine_fn_append_file ()
{ {
...@@ -281,11 +280,7 @@ wine_fn_config_test () ...@@ -281,11 +280,7 @@ wine_fn_config_test ()
{ {
ac_dir=$[1] ac_dir=$[1]
ac_name=$[2] ac_name=$[2]
AS_VAR_IF([enable_tests],[no],[wine_fn_disabled_rules],[wine_fn_all_rules])
AS_VAR_IF([enable_tests],[no],[wine_fn_disabled_rules; return])
wine_fn_append_file ALL_TEST_RESOURCES $ac_name.res
wine_fn_all_rules
} }
wine_fn_config_tool () wine_fn_config_tool ()
...@@ -374,11 +369,7 @@ dnl ...@@ -374,11 +369,7 @@ dnl
dnl Usage: WINE_CONFIG_TEST(dir) dnl Usage: WINE_CONFIG_TEST(dir)
dnl dnl
AC_DEFUN([WINE_CONFIG_TEST],[AC_REQUIRE([WINE_CONFIG_HELPERS])dnl AC_DEFUN([WINE_CONFIG_TEST],[AC_REQUIRE([WINE_CONFIG_HELPERS])dnl
m4_pushdef([ac_suffix],m4_if(m4_substr([$1],0,9),[programs/],[.exe_test],[_test]))dnl wine_fn_config_test [$1]])
m4_pushdef([ac_name],[m4_bpatsubst([$1],[.*/\(.*\)/tests$],[\1])])dnl
wine_fn_config_test $1 ac_name[]ac_suffix[]dnl
m4_popdef([ac_suffix])dnl
m4_popdef([ac_name])])
dnl **** Create a static lib makefile from config.status **** dnl **** Create a static lib makefile from config.status ****
dnl dnl
......
...@@ -14,7 +14,7 @@ RC_SRCS = \ ...@@ -14,7 +14,7 @@ RC_SRCS = \
SVG_SRCS = winetest.svg SVG_SRCS = winetest.svg
EXTRA_OBJS = build.res $(ALL_TEST_RESOURCES) EXTRA_OBJS = build.res
EXTRA_TARGETS = build.rc build.nfo EXTRA_TARGETS = build.rc build.nfo
......
...@@ -134,6 +134,7 @@ static struct strarray extra_cflags; ...@@ -134,6 +134,7 @@ static struct strarray extra_cflags;
static struct strarray cpp_flags; static struct strarray cpp_flags;
static struct strarray unwind_flags; static struct strarray unwind_flags;
static struct strarray libs; static struct strarray libs;
static struct strarray enable_tests;
static struct strarray cmdline_vars; static struct strarray cmdline_vars;
static struct strarray disabled_dirs; static struct strarray disabled_dirs;
static const char *root_src_dir; static const char *root_src_dir;
...@@ -3613,6 +3614,18 @@ static void output_sources( struct makefile *make ) ...@@ -3613,6 +3614,18 @@ static void output_sources( struct makefile *make )
free( obj ); free( obj );
} }
/* special case for winetest: add resource files from other test dirs */
if (make->base_dir && !strcmp( make->base_dir, "programs/winetest" ))
{
struct strarray tests = enable_tests;
if (!tests.count)
for (i = 0; i < top_makefile->subdirs.count; i++)
if (top_makefile->submakes[i]->testdll && !top_makefile->submakes[i]->disabled)
strarray_add( &tests, top_makefile->submakes[i]->testdll );
for (i = 0; i < tests.count; i++)
strarray_add( &make->object_files, replace_extension( tests.str[i], ".dll", "_test.res" ));
}
if (make->dlldata_files.count) if (make->dlldata_files.count)
{ {
output( "%s: %s %s\n", obj_dir_path( make, "dlldata.c" ), output( "%s: %s %s\n", obj_dir_path( make, "dlldata.c" ),
...@@ -4140,6 +4153,7 @@ int main( int argc, char *argv[] ) ...@@ -4140,6 +4153,7 @@ int main( int argc, char *argv[] )
cpp_flags = get_expanded_make_var_array( top_makefile, "CPPFLAGS" ); cpp_flags = get_expanded_make_var_array( top_makefile, "CPPFLAGS" );
unwind_flags = get_expanded_make_var_array( top_makefile, "UNWINDFLAGS" ); unwind_flags = get_expanded_make_var_array( top_makefile, "UNWINDFLAGS" );
libs = get_expanded_make_var_array( top_makefile, "LIBS" ); libs = get_expanded_make_var_array( top_makefile, "LIBS" );
enable_tests = get_expanded_make_var_array( top_makefile, "ENABLE_TESTS" );
root_src_dir = get_expanded_make_variable( top_makefile, "srcdir" ); root_src_dir = get_expanded_make_variable( top_makefile, "srcdir" );
tools_dir = get_expanded_make_variable( top_makefile, "TOOLSDIR" ); tools_dir = get_expanded_make_variable( top_makefile, "TOOLSDIR" );
......
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