mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 14:30:21 +00:00
make_makefiles: Generate the tests list in programs/winetest/Makefile.in.
This commit is contained in:
parent
34618113f4
commit
27959bebd7
|
@ -18,6 +18,10 @@ RC_SRCS = \
|
|||
RC_BINSRC = winetest.rc
|
||||
RC_BINARIES = wine.ico
|
||||
|
||||
@MAKE_PROG_RULES@
|
||||
|
||||
# List of test executables (auto-generated by make_makefiles)
|
||||
|
||||
TESTBINS = \
|
||||
advapi32_test.exe$(DLLEXT) \
|
||||
advpack_test.exe$(DLLEXT) \
|
||||
|
@ -72,43 +76,10 @@ TESTBINS = \
|
|||
winspool.drv_test.exe$(DLLEXT) \
|
||||
ws2_32_test.exe$(DLLEXT)
|
||||
|
||||
@MAKE_PROG_RULES@
|
||||
|
||||
# Special rules
|
||||
|
||||
tests.rc: maketest Makefile.in
|
||||
$(SRCDIR)/maketest $(TOPSRCDIR) $(TESTBINS) > $@ || ( $(RM) $@ && exit 1 )
|
||||
|
||||
winetest.res: tests.rc $(TESTBINS)
|
||||
|
||||
clean::
|
||||
$(RM) tests.rc dist.res winetest-dist winetest-dist.exe $(TESTBINS)
|
||||
|
||||
depend: tests.rc
|
||||
|
||||
# Rules for building distributable executable
|
||||
|
||||
.PHONY: dist
|
||||
|
||||
dist: winetest-dist.exe$(DLLEXT) winetest-dist$(EXEEXT)
|
||||
|
||||
winetest-dist.exe.so: $(OBJS) dist.res Makefile.in
|
||||
$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild $(APPMODE) $(OBJS) dist.res -o $@ -L$(DLLDIR) $(DELAYIMPORTS:%=-Wb,-d%) $(ALL_LIBS)
|
||||
|
||||
winetest-dist: $(WINEWRAPPER)
|
||||
$(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
|
||||
|
||||
winetest-dist.exe: $(OBJS) dist.res.o Makefile.in
|
||||
$(CC) $(APPMODE) $(OBJS) dist.res.o -o $@ $(DELAYIMPORTS:%=-l%) $(ALL_LIBS)
|
||||
|
||||
dist.res: winetest.rc tests.rc build.id build.nfo tests.url $(TESTBINS) $(RC_BINARIES)
|
||||
|
||||
# Rules for stripping the test executables
|
||||
|
||||
advpack_test.exe$(DLLEXT): $(DLLDIR)/advpack/tests/advpack_test.exe$(DLLEXT)
|
||||
cp $(DLLDIR)/advpack/tests/advpack_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||
advapi32_test.exe$(DLLEXT): $(DLLDIR)/advapi32/tests/advapi32_test.exe$(DLLEXT)
|
||||
cp $(DLLDIR)/advapi32/tests/advapi32_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||
advpack_test.exe$(DLLEXT): $(DLLDIR)/advpack/tests/advpack_test.exe$(DLLEXT)
|
||||
cp $(DLLDIR)/advpack/tests/advpack_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||
cabinet_test.exe$(DLLEXT): $(DLLDIR)/cabinet/tests/cabinet_test.exe$(DLLEXT)
|
||||
cp $(DLLDIR)/cabinet/tests/cabinet_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||
comcat_test.exe$(DLLEXT): $(DLLDIR)/comcat/tests/comcat_test.exe$(DLLEXT)
|
||||
|
@ -199,10 +170,10 @@ usp10_test.exe$(DLLEXT): $(DLLDIR)/usp10/tests/usp10_test.exe$(DLLEXT)
|
|||
cp $(DLLDIR)/usp10/tests/usp10_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||
uxtheme_test.exe$(DLLEXT): $(DLLDIR)/uxtheme/tests/uxtheme_test.exe$(DLLEXT)
|
||||
cp $(DLLDIR)/uxtheme/tests/uxtheme_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||
wininet_test.exe$(DLLEXT): $(DLLDIR)/wininet/tests/wininet_test.exe$(DLLEXT)
|
||||
cp $(DLLDIR)/wininet/tests/wininet_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||
version_test.exe$(DLLEXT): $(DLLDIR)/version/tests/version_test.exe$(DLLEXT)
|
||||
cp $(DLLDIR)/version/tests/version_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||
wininet_test.exe$(DLLEXT): $(DLLDIR)/wininet/tests/wininet_test.exe$(DLLEXT)
|
||||
cp $(DLLDIR)/wininet/tests/wininet_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||
winmm_test.exe$(DLLEXT): $(DLLDIR)/winmm/tests/winmm_test.exe$(DLLEXT)
|
||||
cp $(DLLDIR)/winmm/tests/winmm_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||
winspool.drv_test.exe$(DLLEXT): $(DLLDIR)/winspool.drv/tests/winspool.drv_test.exe$(DLLEXT)
|
||||
|
@ -210,4 +181,33 @@ winspool.drv_test.exe$(DLLEXT): $(DLLDIR)/winspool.drv/tests/winspool.drv_test.e
|
|||
ws2_32_test.exe$(DLLEXT): $(DLLDIR)/ws2_32/tests/ws2_32_test.exe$(DLLEXT)
|
||||
cp $(DLLDIR)/ws2_32/tests/ws2_32_test.exe$(DLLEXT) $@ && $(STRIP) $@
|
||||
|
||||
# Special rules
|
||||
|
||||
tests.rc: maketest Makefile.in
|
||||
$(SRCDIR)/maketest $(TOPSRCDIR) $(TESTBINS) > $@ || ( $(RM) $@ && exit 1 )
|
||||
|
||||
winetest.res: tests.rc $(TESTBINS)
|
||||
|
||||
clean::
|
||||
$(RM) tests.rc dist.res winetest-dist winetest-dist.exe $(TESTBINS)
|
||||
|
||||
depend: tests.rc
|
||||
|
||||
# Rules for building distributable executable
|
||||
|
||||
.PHONY: dist
|
||||
|
||||
dist: winetest-dist.exe$(DLLEXT) winetest-dist$(EXEEXT)
|
||||
|
||||
winetest-dist.exe.so: $(OBJS) dist.res Makefile.in
|
||||
$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild $(APPMODE) $(OBJS) dist.res -o $@ -L$(DLLDIR) $(DELAYIMPORTS:%=-Wb,-d%) $(ALL_LIBS)
|
||||
|
||||
winetest-dist: $(WINEWRAPPER)
|
||||
$(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
|
||||
|
||||
winetest-dist.exe: $(OBJS) dist.res.o Makefile.in
|
||||
$(CC) $(APPMODE) $(OBJS) dist.res.o -o $@ $(DELAYIMPORTS:%=-l%) $(ALL_LIBS)
|
||||
|
||||
dist.res: winetest.rc tests.rc build.id build.nfo tests.url $(TESTBINS) $(RC_BINARIES)
|
||||
|
||||
### Dependencies:
|
||||
|
|
|
@ -92,6 +92,36 @@ replace_in_file( "configure.ac", '^AC_CONFIG_FILES\(', '\]\)$',
|
|||
join ("\n", (sort @makerules), (sort @makefiles) ), "])\n" );
|
||||
|
||||
|
||||
################################################################
|
||||
# update the tests list in programs/winetest/Makefile.in
|
||||
|
||||
my %modules = ( "kernel" => "kernel32", "gdi" => "gdi32", "user" => "user32" );
|
||||
my %tests;
|
||||
my @lines = ( "TESTBINS =" );
|
||||
|
||||
foreach my $file (sort grep /^dlls\/.*\/tests\/Makefile/, @makefiles)
|
||||
{
|
||||
if ($file =~ /^dlls\/(.*)\/tests\/Makefile/)
|
||||
{
|
||||
my $dir = $1;
|
||||
my $mod = $modules{$dir} || $dir;
|
||||
$tests{$mod} = $dir;
|
||||
push @lines, " \\\n\t${mod}_test.exe\$(DLLEXT)";
|
||||
}
|
||||
}
|
||||
push @lines, "\n\n";
|
||||
|
||||
foreach my $test (sort keys %tests)
|
||||
{
|
||||
my $dir = $tests{$test};
|
||||
push @lines, "${test}_test.exe\$(DLLEXT): \$(DLLDIR)/$dir/tests/${test}_test.exe\$(DLLEXT)\n";
|
||||
push @lines, "\tcp \$(DLLDIR)/$dir/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 );
|
||||
|
||||
|
||||
################################################################
|
||||
# update dlls/Makefile.in
|
||||
|
||||
|
|
Loading…
Reference in a new issue