This avoids needlessly copying all the test binaries if they are not going to be used.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- configure.ac | 1 + tools/makedep.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac index 312c235bb1d..20c23dbfe3b 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,7 @@ dnl **** Command-line arguments **** AC_ARG_ENABLE(win16, AS_HELP_STRING([--disable-win16],[do not include Win16 support])) AC_ARG_ENABLE(win64, AS_HELP_STRING([--enable-win64],[build a Win64 emulator on AMD64 (won't run Win32 binaries)])) AC_ARG_ENABLE(tests, AS_HELP_STRING([--disable-tests],[do not build the regression tests])) +AC_ARG_ENABLE(winetest, AS_HELP_STRING([--disable-winetest],[do not build winetest])) AC_ARG_ENABLE(maintainer-mode, AS_HELP_STRING([--enable-maintainer-mode],[enable maintainer-specific build rules]))
AC_ARG_WITH(alsa, AS_HELP_STRING([--without-alsa],[do not use the Alsa sound support]), diff --git a/tools/makedep.c b/tools/makedep.c index 207c41e8578..46062b871a2 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -137,6 +137,7 @@ static struct strarray libs; static struct strarray enable_tests; static struct strarray cmdline_vars; static struct strarray disabled_dirs; +static int enable_winetest = 1; static const char *root_src_dir; static const char *tools_dir; static const char *tools_ext; @@ -3283,7 +3284,7 @@ static void output_test_module( struct makefile *make ) output_filename( tools_path( make, "winegcc" )); output( "\n" );
- if (!make->disabled) + if (enable_winetest && !make->disabled) output( "all: %s/%s\n", top_obj_dir_path( make, "programs/winetest" ), testres ); output( "%s/%s: %s%s\n", top_obj_dir_path( make, "programs/winetest" ), testres, obj_dir_path( make, stripped ), dll_ext ); @@ -4231,6 +4232,7 @@ int main( int argc, char *argv[] ) if (argc == 1) { disabled_dirs = get_expanded_make_var_array( top_makefile, "DISABLED_SUBDIRS" ); + enable_winetest = !strarray_exists( &disabled_dirs, "programs/winetest" ); top_makefile->subdirs = get_expanded_make_var_array( top_makefile, "SUBDIRS" ); top_makefile->submakes = xmalloc( top_makefile->subdirs.count * sizeof(*top_makefile->submakes) );