makefiles: Generate the winetest rules from the WINE_CONFIG_TEST macro.

This commit is contained in:
Alexandre Julliard 2010-02-08 21:27:54 +01:00
parent 9644d1dcd7
commit d5addea279
4 changed files with 652 additions and 40 deletions

10
aclocal.m4 vendored
View File

@ -222,7 +222,15 @@ dnl
dnl Usage: WINE_CONFIG_TEST(dir)
dnl
AC_DEFUN([WINE_CONFIG_TEST],
[WINE_CONFIG_MAKEFILE([$1/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])])
[m4_pushdef([ac_name],m4_bpatsubst([$1],[.*/\(.*\)/tests$],[\1_test]))dnl
ALL_WINETEST_DEPENDS="$ALL_WINETEST_DEPENDS
ac_name.exe: \$(TOPOBJDIR)/$1/ac_name.exe$DLLEXT
cp \$(TOPOBJDIR)/$1/ac_name.exe$DLLEXT \$[@] && \$(STRIP) \$[@]
ac_name.rc:
echo \"ac_name.exe TESTRES \\\"ac_name.exe\\\"\" >\$[@] || (\$(RM) \$[@] && false)
ac_name.res: ac_name.rc ac_name.exe"
WINE_CONFIG_MAKEFILE([$1/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])dnl
m4_popdef([ac_name])])
dnl **** Create a static lib makefile from config.status ****
dnl

658
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -2098,6 +2098,7 @@ AC_SUBST(ALL_MAKERULES,"")
AC_SUBST(ALL_MAKEFILES,"")
AC_SUBST(ALL_SYMLINKS,"")
AC_SUBST(ALL_MAKEFILE_DEPENDS,["# Makefile dependencies"])
AC_SUBST(ALL_WINETEST_DEPENDS,["# Test binaries"])
AC_SUBST(ALL_TOP_DIRS,"")
AC_SUBST(ALL_DLL_DIRS,"")
@ -2674,24 +2675,7 @@ WINE_CONFIG_MAKEFILE([tools/winedump/Makefile],[Make.rules],[],[ALL_TOOL_DIRS],[
WINE_CONFIG_MAKEFILE([tools/winegcc/Makefile],[Make.rules],[],[ALL_TOOL_DIRS],[enable_tools])
WINE_CONFIG_MAKEFILE([tools/wmc/Makefile],[Make.rules],[],[ALL_TOOL_DIRS],[enable_tools])
WINE_CONFIG_MAKEFILE([tools/wrc/Makefile],[Make.rules],[],[ALL_TOOL_DIRS],[enable_tools])
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
ALL_WINETEST_DEPENDS="$ALL_WINETEST_DEPENDS
$testname.exe: \$(DLLDIR)/$dir/$testname.exe\$(DLLEXT)
cp \$(DLLDIR)/$dir/$testname.exe\$(DLLEXT) \$@ && \$(STRIP) \$@
$testname.rc:
echo \"$testname.exe TESTRES \\\"$testname.exe\\\"\" >\$@ || (\$(RM) \$@ && false)
$testname.res: $testname.rc $testname.exe"
fi
done
dnl End of auto-generated output commands
dnl Don't install in bin dir for Windows build
test -n "$DLLEXT" || ALL_PROGRAM_BIN_INSTALL_DIRS=""

View File

@ -417,8 +417,8 @@ sub update_makefiles(@)
replace_makefile_variable( $file, "RC_SRCS" );
}
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);
push @lines, "dnl End of auto-generated output commands\n";
replace_in_file( "configure.ac", '^WINE_CONFIG_MAKERULES', '^dnl End of auto-generated output commands\n$', @lines);
}