From 0dc951694bfeceebeacbb4148e66bb663ba87d1c Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sat, 4 Jul 2009 11:20:09 +0200 Subject: [PATCH] winetest: Build exe resources as separate .res files. --- .gitignore | 2 +- configure | 10 +++++++--- configure.ac | 10 +++++++--- programs/winetest/Makefile.in | 21 ++++++--------------- programs/winetest/winetest.rc | 2 -- tools/make_makefiles | 2 +- 6 files changed, 22 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index f096f4a6b4a..5303e1c11af 100644 --- a/.gitignore +++ b/.gitignore @@ -197,7 +197,7 @@ programs/winedbg/dbg.tab.h programs/winedbg/debug.yy.c programs/winedbg/winedbg.man programs/winetest/*_test.exe -programs/winetest/tests.rc +programs/winetest/*_test.rc programs/winhlp32/macro.lex.yy.c server/wineserver server/wineserver-installed diff --git a/configure b/configure index 97bb65a936a..9e59d113cba 100755 --- a/configure +++ b/configure @@ -28762,10 +28762,14 @@ for dir in $ALL_TEST_DIRS do if test "$dir" != "\\" then - testname=`expr $dir : '\(.*\)/tests'`_test.exe + testname=`expr $dir : '\(.*\)/tests'`_test ALL_WINETEST_DEPENDS="$ALL_WINETEST_DEPENDS -$testname: \$(DLLDIR)/$dir/$testname\$(DLLEXT) - cp \$(DLLDIR)/$dir/$testname\$(DLLEXT) \$@ && \$(STRIP) \$@" + +$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 diff --git a/configure.ac b/configure.ac index c6843d9a04f..23cf7fec33d 100644 --- a/configure.ac +++ b/configure.ac @@ -2527,10 +2527,14 @@ for dir in $ALL_TEST_DIRS do if test "$dir" != "\\" then - testname=`expr $dir : '\(.*\)/tests'`_test.exe + testname=`expr $dir : '\(.*\)/tests'`_test ALL_WINETEST_DEPENDS="$ALL_WINETEST_DEPENDS -$testname: \$(DLLDIR)/$dir/$testname\$(DLLEXT) - cp \$(DLLDIR)/$dir/$testname\$(DLLEXT) \$@ && \$(STRIP) \$@" + +$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 diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in index bd1251fda19..90cd983d75f 100644 --- a/programs/winetest/Makefile.in +++ b/programs/winetest/Makefile.in @@ -20,25 +20,18 @@ RC_SRCS = \ SVG_SRCS = winetest.svg -@MAKE_PROG_RULES@ - ALL_TEST_DIRS = @ALL_TEST_DIRS@ -TESTBINS = $(ALL_TEST_DIRS:%/tests=%_test.exe) - -@ALL_WINETEST_DEPENDS@ - -# Special rules +TESTBINS = $(ALL_TEST_DIRS:%/tests=%_test.exe) +TESTRCS = $(TESTBINS:.exe=.rc) +EXTRA_OBJS = $(TESTRCS:.rc=.res) -winetest.res: $(TESTBINS) +@MAKE_PROG_RULES@ -tests.rc: Makefile.in $(TOPOBJDIR)/config.status - (for i in $(TESTBINS); do echo "$$i TESTRES \"$$i\""; done) >$@ || ($(RM) $@ && false) +@ALL_WINETEST_DEPENDS@ clean:: - $(RM) tests.rc dist.res winetest-dist.exe $(TESTBINS) - -depend: tests.rc + $(RM) winetest-dist.exe $(TESTBINS) $(TESTRCS) # Rules for building distributable executable @@ -53,5 +46,3 @@ winetest-dist.exe winetest-dist.exe.so: $(OBJS) dist.res Makefile.in dist.res: build.nfo @DEPENDENCIES@ # everything below this line is overwritten by make depend - -winetest.res: tests.rc diff --git a/programs/winetest/winetest.rc b/programs/winetest/winetest.rc index 4d406f2f409..8056a25c42c 100644 --- a/programs/winetest/winetest.rc +++ b/programs/winetest/winetest.rc @@ -82,5 +82,3 @@ END /* @makedep: winetest.ico */ IDI_WINE ICON "winetest.ico" - -#include "tests.rc" diff --git a/tools/make_makefiles b/tools/make_makefiles index 99a120c1005..b1766a7a975 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -74,8 +74,8 @@ my @ignores = ( "dlls/*/tests/testlist.c", "include/config.h", "include/stamp-h", - "programs/winetest/tests.rc", "programs/winetest/*_test.exe", + "programs/winetest/*_test.rc", ); # Source files and their resulting target to ignore -- 2.11.4.GIT