[PATCH] Make tests optional.

Michael Karcher karcher at physik.fu-berlin.de
Thu May 17 09:24:10 CDT 2007


The building of dll tests and the winetest executable can be skipped by
passing the argument --disable-tests to configure to speed up building.

Signed-off-by: Michael Karcher <wine at mkarcher.dialup.fu-berlin.de>
---
 configure            |   26 +++++++++++++++++++++++---
 configure.ac         |    9 +++++++++
 dlls/Makefile.in     |    4 ++--
 programs/Makefile.in |    2 +-
 4 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 59885a1..52159c6 100755
--- a/configure
+++ b/configure
@@ -662,6 +662,8 @@ host_vendor
 host_os
 WIN16_FILES
 WIN16_INSTALL
+TESTSUBDIRS
+WINETEST
 SET_MAKE
 CC
 CFLAGS
@@ -1367,6 +1369,7 @@ Optional Features:
   --disable-win16         do not include Win16 support
   --enable-win64          build a Win64 emulator on AMD64 (won't run Win32
                           binaries)
+  --disable-tests         do not build API tests
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1865,6 +1868,11 @@ if test "${enable_win64+set}" = set; then
   enableval=$enable_win64;
 fi
 
+# Check whether --enable-tests was given.
+if test "${enable_tests+set}" = set; then
+  enableval=$enable_tests;
+fi
+
 

 # Check whether --with-opengl was given.
@@ -2004,6 +2012,16 @@ You need to run 'make distclean' in the source tree first." >&2;}
     fi ;;
 esac
 
+TESTSUBDIRS="\$(TESTSUBDIRS)"
+
+WINETEST="winetest"
+
+if test "x$enable_tests" = "xno"
+then
+  TESTSUBDIRS=""
+  WINETEST=""
+fi
+
 
 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
@@ -22060,6 +22078,8 @@ host_vendor!$host_vendor$ac_delim
 host_os!$host_os$ac_delim
 WIN16_FILES!$WIN16_FILES$ac_delim
 WIN16_INSTALL!$WIN16_INSTALL$ac_delim
+TESTSUBDIRS!$TESTSUBDIRS$ac_delim
+WINETEST!$WINETEST$ac_delim
 SET_MAKE!$SET_MAKE$ac_delim
 CC!$CC$ac_delim
 CFLAGS!$CFLAGS$ac_delim
@@ -22093,8 +22113,6 @@ LN!$LN$ac_delim
 GREP!$GREP$ac_delim
 EGREP!$EGREP$ac_delim
 LDCONFIG!$LDCONFIG$ac_delim
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 82; then
@@ -22156,6 +22174,8 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
 INSTALL_DATA!$INSTALL_DATA$ac_delim
 LINT!$LINT$ac_delim
 LINTFLAGS!$LINTFLAGS$ac_delim
@@ -22229,7 +22249,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 73; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/configure.ac b/configure.ac
index 4edb7fb..841cd6e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,7 @@ dnl **** Command-line arguments ****
 
 AC_ARG_ENABLE(win16, AC_HELP_STRING([--disable-win16],[do not include Win16 support]))
 AC_ARG_ENABLE(win64, AC_HELP_STRING([--enable-win64], [build a Win64 emulator on AMD64 (won't run Win32 binaries)]))
+AC_ARG_ENABLE(tests, AC_HELP_STRING([--disable-tests],[do not build API tests]))
 
 AC_ARG_WITH(opengl,    AC_HELP_STRING([--without-opengl],[do not use OpenGL]))
 AC_ARG_WITH(wine-tools,AC_HELP_STRING([--with-wine-tools=<dir>],[use Wine tools from directory <dir>]))
@@ -58,6 +59,14 @@ You need to run 'make distclean' in the source tree first.])
     fi ;;
 esac
 
+AC_SUBST(TESTSUBDIRS, "\$(TESTSUBDIRS)")
+AC_SUBST(WINETEST, "winetest")
+if test "x$enable_tests" = "xno"
+then
+  TESTSUBDIRS=""
+  WINETEST=""
+fi
+
 dnl **** Check for some programs ****
 
 AC_PROG_MAKE_SET
diff --git a/dlls/Makefile.in b/dlls/Makefile.in
index 159bb2d..99a965b 100644
--- a/dlls/Makefile.in
+++ b/dlls/Makefile.in
@@ -293,14 +293,14 @@ TESTSUBDIRS = \
 SUBDIRS = \
 	$(BASEDIRS) \
 	$(IMPLIBSUBDIRS) \
-	$(TESTSUBDIRS) \
+	@TESTSUBDIRS@ \
 	glu32 \
 	opengl32 \
 	wined3d \
 	winequartz.drv \
 	winex11.drv
 
-BUILDSUBDIRS   = $(BASEDIRS) $(EXTRADIRS) $(TESTSUBDIRS)
+BUILDSUBDIRS   = $(BASEDIRS) $(EXTRADIRS) @TESTSUBDIRS@
 INSTALLSUBDIRS = $(BASEDIRS) $(EXTRADIRS) $(IMPLIBSUBDIRS)
 DOCSUBDIRS     = $(BASEDIRS) $(EXTRADIRS)
 
diff --git a/programs/Makefile.in b/programs/Makefile.in
index ee2d3c7..e5f0d2e 100644
--- a/programs/Makefile.in
+++ b/programs/Makefile.in
@@ -39,7 +39,7 @@ SUBDIRS = \
 	winemenubuilder \
 	winemine \
 	winepath \
-	winetest \
+	@WINETEST@ \
 	winevdm \
 	winhelp \
 	winver \
-- 
1.4.4.4




More information about the wine-patches mailing list