Commit ea9a113a authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Build the tests directly from the top-level makefile.

parent 86ab297b
......@@ -28,7 +28,9 @@ LIBEXT = @LIBEXT@
MODULE = none
ALL_STATICLIB_DIRS = @ALL_STATICLIB_DIRS@
ALL_TEST_DIRS = @ALL_TEST_DIRS@
ALL_TOOL_DIRS = @ALL_TOOL_DIRS@
ALL_TOP_DIRS = @ALL_TOP_DIRS@
# Sub-directories to run make depend/clean into
SUBDIRS = \
......@@ -43,16 +45,26 @@ SUBDIRS = \
programs \
server \
$(ALL_TOOL_DIRS) \
$(ALL_STATICLIB_DIRS)
$(ALL_STATICLIB_DIRS) \
$(ALL_TEST_DIRS)
# Sub-directories to run make all into
BUILDSUBDIRS = \
libs/wine \
$(ALL_TOOL_DIRS) \
$(ALL_TOP_DIRS) \
$(ALL_STATICLIB_DIRS) \
$(ALL_TEST_DIRS)
# Sub-directories to run make install/uninstall into
INSTALLSUBDIRS = @ALL_TOP_DIRS@ \
INSTALLSUBDIRS = \
libs/wine \
$(ALL_TOOL_DIRS) \
$(ALL_TOP_DIRS) \
$(ALL_STATICLIB_DIRS)
# Sub-directories to run make test into
TESTSUBDIRS = dlls
TESTSUBDIRS = $(ALL_TEST_DIRS)
# Sub-directories that don't have a makefile
EXTRASUBDIRS = libs
......@@ -94,7 +106,7 @@ implib: $(ALL_STATICLIB_DIRS) $(IMPORT_LIBS)
# Dependencies between directories
all: $(INSTALLSUBDIRS)
all: $(BUILDSUBDIRS)
# dependencies needed to build any dll or program
__builddeps__: libs/port libs/wine libs/wpp $(ALL_TOOL_DIRS) include $(ALL_STATICLIB_DIRS) $(IMPORT_LIBS)
......@@ -105,7 +117,7 @@ dlls programs: __builddeps__
loader server: libs/port libs/wine tools
fonts: tools
include: tools/widl
programs: dlls
programs: $(ALL_TEST_DIRS)
libs/wine $(ALL_TOOL_DIRS): libs/port
tools/wmc tools/wrc: tools
tools tools/wmc tools/wrc: libs/wine
......@@ -142,11 +154,6 @@ depend: $(MAKEDEP)
$(MAKEDEP): include/config.h tools/Makefile
@cd $(TOOLSDIR)/tools && $(MAKE) makedep$(TOOLSEXT)
# Test rules
$(TESTSUBDIRS:%=%/__test__): wine
$(TESTSUBDIRS:%=%/__crosstest__): __buildcrossdeps__
# Misc rules
TAGS etags:
......
......@@ -224,6 +224,9 @@ dnl Usage: WINE_CONFIG_TEST(dir)
dnl
AC_DEFUN([WINE_CONFIG_TEST],
[m4_pushdef([ac_name],m4_bpatsubst([$1],[.*/\(.*\)/tests$],[\1_test]))dnl
ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
$1: __builddeps__
$1/__crosstest__: __buildcrossdeps__"
ALL_TEST_BINARIES="$ALL_TEST_BINARIES \\
ac_name.exe"
ALL_WINETEST_DEPENDS="$ALL_WINETEST_DEPENDS
......@@ -232,7 +235,7 @@ ac_name.exe: \$(TOPOBJDIR)/$1/ac_name.exe$DLLEXT
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
WINE_CONFIG_MAKEFILE([$1/Makefile],[dlls/Maketest.rules],[],[ALL_TEST_DIRS],[enable_tests])dnl
m4_popdef([ac_name])])
dnl **** Create a static lib makefile from config.status ****
......
......@@ -6,9 +6,8 @@ VPATH = @srcdir@
INSTALLDIRS = $(DESTDIR)$(dlldir)
DLLSUBDIRS = @ALL_DLL_DIRS@
TESTSUBDIRS = @ALL_TEST_DIRS@
SUBDIRS = $(DLLSUBDIRS) $(TESTSUBDIRS)
BUILDSUBDIRS = $(DLLSUBDIRS) $(TESTSUBDIRS)
SUBDIRS = $(DLLSUBDIRS)
BUILDSUBDIRS = $(DLLSUBDIRS)
INSTALLSUBDIRS = $(DLLSUBDIRS)
DOCSUBDIRS = $(DLLSUBDIRS)
......
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