Commit 67828b60 authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Build the winetest dependencies in configure instead of make_makefiles.

parent f5e9a01c
......@@ -781,6 +781,7 @@ ALL_TEST_DIRS
ALL_PROGRAM_DIRS
ALL_PROGRAM_INSTALL_DIRS
ALL_PROGRAM_BIN_INSTALL_DIRS
ALL_WINETEST_DEPENDS
LIBOBJS
LTLIBOBJS'
ac_subst_files='MAKE_RULES
......@@ -25648,6 +25649,20 @@ tools/wrc/Makefile: tools/wrc/Makefile.in Make.rules"
ac_config_files="$ac_config_files tools/wrc/Makefile"
ALL_WINETEST_DEPENDS="# Test binaries"
for dir in $ALL_TEST_DIRS
do
if test "$dir" != "\\"
then
testname=`expr $dir : '\(.*\)/tests'`_test.exe
ALL_WINETEST_DEPENDS="$ALL_WINETEST_DEPENDS
$testname: \$(DLLDIR)/$dir/$testname\$(DLLEXT)
cp \$(DLLDIR)/$dir/$testname\$(DLLEXT) \$@ && \$(STRIP) \$@"
fi
done
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
......@@ -26932,11 +26947,12 @@ ALL_TEST_DIRS!$ALL_TEST_DIRS$ac_delim
ALL_PROGRAM_DIRS!$ALL_PROGRAM_DIRS$ac_delim
ALL_PROGRAM_INSTALL_DIRS!$ALL_PROGRAM_INSTALL_DIRS$ac_delim
ALL_PROGRAM_BIN_INSTALL_DIRS!$ALL_PROGRAM_BIN_INSTALL_DIRS$ac_delim
ALL_WINETEST_DEPENDS!$ALL_WINETEST_DEPENDS$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 86; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 87; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
......
......@@ -2121,6 +2121,20 @@ WINE_CONFIG_MAKEFILE([tools/winegcc/Makefile],[Make.rules])
WINE_CONFIG_MAKEFILE([tools/wmc/Makefile],[Make.rules])
WINE_CONFIG_MAKEFILE([tools/wrc/Makefile],[Make.rules])
dnl Build dependencies for test files compiled into winetest
AC_SUBST(ALL_WINETEST_DEPENDS,["# Test binaries"])
for dir in $ALL_TEST_DIRS
do
if test "$dir" != "\\"
then
testname=`expr $dir : '\(.*\)/tests'`_test.exe
ALL_WINETEST_DEPENDS="$ALL_WINETEST_DEPENDS
$testname: \$(DLLDIR)/$dir/$testname\$(DLLEXT)
cp \$(DLLDIR)/$dir/$testname\$(DLLEXT) \$@ && \$(STRIP) \$@"
fi
done
AC_OUTPUT
if test "$no_create" = "yes"
......
......@@ -218,7 +218,7 @@ sub parse_makefile($)
################################################################
# update the tests list in programs/winetest/Makefile.in and programs/winetest/winetest.rc
# update the tests list in programs/winetest/winetest.rc
sub update_winetest(@)
{
......@@ -228,18 +228,6 @@ sub update_winetest(@)
{
if ($file =~ /^dlls\/(.*)\/tests\/Makefile/) { push @tests, $1; }
}
push @lines, "TESTBINS =";
push @lines, map { " \\\n\t" . $_ . "_test.exe"; } sort @tests;
push @lines, "\n\n";
foreach my $test (sort @tests)
{
push @lines, "${test}_test.exe: \$(DLLDIR)/$test/tests/${test}_test.exe\$(DLLEXT)\n";
push @lines, "\tcp \$(DLLDIR)/$test/tests/${test}_test.exe\$(DLLEXT) \$\@ && \$(STRIP) \$\@\n";
}
push @lines, "\n# Special rules\n";
replace_in_file( "programs/winetest/Makefile.in", '^TESTBINS\s*=', '^# Special rules', @lines );
replace_in_file( "programs/winetest/winetest.rc", ' TESTRES ', undef,
map { $_ . "_test.exe TESTRES \"" . $_ . "_test.exe\"\n"; } sort @tests );
......@@ -285,8 +273,8 @@ sub update_makefiles(@)
push @lines, "WINE_CONFIG_MAKEFILE([$file],[$rules]$args)\n";
}
push @lines, "\nAC_OUTPUT\n";
replace_in_file( "configure.ac", '^WINE_CONFIG_MAKERULES', '^AC_OUTPUT$', @lines);
push @lines, "\ndnl Build dependencies for test files compiled into winetest\n";
replace_in_file( "configure.ac", '^WINE_CONFIG_MAKERULES', '^dnl Build dependencies for test files compiled into winetest$', @lines);
}
......
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