summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am24
-rw-r--r--c++/Makefile.am8
-rw-r--r--configure.ac54
-rw-r--r--fortran/Makefile.am11
-rw-r--r--hl/Makefile.am12
-rw-r--r--hl/c++/Makefile.am8
-rw-r--r--hl/fortran/Makefile.am8
-rw-r--r--java/Makefile.am10
-rw-r--r--tools/Makefile.am8
9 files changed, 124 insertions, 19 deletions
diff --git a/Makefile.am b/Makefile.am
index 7f872b0..a3c4385 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,11 +49,6 @@ include $(top_srcdir)/config/commence.am
# Conditionals. These conditionals are defined during configure
# Define each variable to empty if it is not used to placate pmake
-if BUILD_PARALLEL_CONDITIONAL
- TESTPARALLEL_DIR =testpar
-else
- TESTPARALLEL_DIR=
-endif
if BUILD_CXX_CONDITIONAL
CXX_DIR =c++
else
@@ -74,9 +69,24 @@ if BUILD_HDF5_HL_CONDITIONAL
else
HDF5_HL_DIR=
endif
+if BUILD_TESTS_CONDITIONAL
+ TESTSERIAL_DIR =test
+else
+ TESTSERIAL_DIR=
+endif
+if BUILD_TESTS_PARALLEL_CONDITIONAL
+ TESTPARALLEL_DIR =testpar
+else
+ TESTPARALLEL_DIR=
+endif
+if BUILD_TOOLS_CONDITIONAL
+ TOOLS_DIR =tools
+else
+ TOOLS_DIR=
+endif
-SUBDIRS = src test $(TESTPARALLEL_DIR) tools . $(CXX_DIR) $(FORTRAN_DIR) \
- $(JAVA_DIR) $(HDF5_HL_DIR)
+SUBDIRS = src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR) $(TOOLS_DIR) . $(CXX_DIR) \
+ $(FORTRAN_DIR) $(JAVA_DIR) $(HDF5_HL_DIR)
DIST_SUBDIRS = src test testpar tools . c++ fortran hl examples java
# Some files generated during configure that should be cleaned
diff --git a/c++/Makefile.am b/c++/Makefile.am
index 3713901..319ce6e 100644
--- a/c++/Makefile.am
+++ b/c++/Makefile.am
@@ -18,9 +18,15 @@
include $(top_srcdir)/config/commence.am
+if BUILD_TESTS_CONDITIONAL
+ TEST_DIR = test
+else
+ TEST_DIR=
+endif
+
## Only recurse into subdirectories if C++ interface is enabled.
if BUILD_CXX_CONDITIONAL
- SUBDIRS=src test
+ SUBDIRS=src $(TEST_DIR)
# Test with just the native connector, with a single pass-through connector
# and with a doubly-stacked pass-through.
diff --git a/configure.ac b/configure.ac
index cf9cd64..7846357 100644
--- a/configure.ac
+++ b/configure.ac
@@ -943,6 +943,48 @@ fi
AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"])
## ----------------------------------------------------------------------
+## Check if they would like to disable building tests
+##
+
+## This needs to be exposed for the library info file.
+AC_SUBST([HDF5_TESTS])
+
+## Default is to build tests
+HDF5_TESTS=yes
+
+AC_MSG_CHECKING([if building tests is disabled])
+
+AC_ARG_ENABLE([tests],
+ [AS_HELP_STRING([--enable-tests],
+ [Compile the HDF5 tests [default=yes]])],
+ [HDF5_TESTS=$enableval])
+
+if test "X$HDF5_TESTS" = "Xno"; then
+ echo "Building HDF5 tests is disabled"
+fi
+
+## ----------------------------------------------------------------------
+## Check if they would like to disable building tools
+##
+
+## This needs to be exposed for the library info file.
+AC_SUBST([HDF5_TOOLS])
+
+## Default is to build tests and tools
+HDF5_TOOLS=yes
+
+AC_MSG_CHECKING([if building tools is disabled])
+
+AC_ARG_ENABLE([tools],
+ [AS_HELP_STRING([--enable-tools],
+ [Compile the HDF5 tools [default=yes]])],
+ [HDF5_TOOLS=$enableval])
+
+if test "X$HDF5_TOOLS" = "Xno"; then
+ echo "Building HDF5 tools is disabled"
+fi
+
+## ----------------------------------------------------------------------
## Create libtool. If shared/static libraries are going to be enabled
## or disabled, it should happen before these macros.
LT_PREREQ([2.2])
@@ -2511,8 +2553,10 @@ AC_SUBST([PARALLEL_FILTERED_WRITES])
AC_SUBST([LARGE_PARALLEL_IO])
if test -n "$PARALLEL"; then
- ## The 'testpar' directory should participate in the build
- TESTPARALLEL=testpar
+ if test "X$HDF5_TESTS" = "Xyes"; then
+ ## The 'testpar' directory should participate in the build
+ TESTPARALLEL=testpar
+ fi
## We are building a parallel library
AC_DEFINE([HAVE_PARALLEL], [1], [Define if we have parallel support])
@@ -3361,11 +3405,13 @@ LDFLAGS="$saved_user_LDFLAGS"
## need to be compiled
AM_CONDITIONAL([BUILD_CXX_CONDITIONAL], [test "X$HDF_CXX" = "Xyes"])
-AM_CONDITIONAL([BUILD_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"])
+AM_CONDITIONAL([BUILD_PARALLEL_CONDITIONAL], [test "X$PARALLEL" = "Xyes"])
AM_CONDITIONAL([BUILD_FORTRAN_CONDITIONAL], [test "X$HDF_FORTRAN" = "Xyes"])
AM_CONDITIONAL([BUILD_JAVA_CONDITIONAL], [test "X$HDF_JAVA" = "Xyes"])
AM_CONDITIONAL([BUILD_HDF5_HL_CONDITIONAL], [test "X$HDF5_HL" = "Xyes"])
-
+AM_CONDITIONAL([BUILD_TESTS_CONDITIONAL], [test "X$HDF5_TESTS" = "Xyes"])
+AM_CONDITIONAL([BUILD_TESTS_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"])
+AM_CONDITIONAL([BUILD_TOOLS_CONDITIONAL], [test "X$HDF5_TOOLS" = "Xyes"])
## ----------------------------------------------------------------------
## Build the Makefiles.
diff --git a/fortran/Makefile.am b/fortran/Makefile.am
index ca0733f..c07fa3e 100644
--- a/fortran/Makefile.am
+++ b/fortran/Makefile.am
@@ -22,14 +22,21 @@
include $(top_srcdir)/config/commence.am
-if BUILD_PARALLEL_CONDITIONAL
+if BUILD_TESTS_PARALLEL_CONDITIONAL
TESTPARALLEL_DIR=testpar
+else
+ TESTPARALLEL_DIR=
+endif
+if BUILD_TESTS_CONDITIONAL
+ TESTSERIAL_DIR=test
+else
+ TESTSERIAL_DIR=
endif
# Subdirectories in build order, not including examples directory
## Only recurse into subdirectories if HDF5 is configured to use Fortran.
if BUILD_FORTRAN_CONDITIONAL
- SUBDIRS=src test $(TESTPARALLEL_DIR)
+ SUBDIRS=src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR)
# Test with just the native connector, with a single pass-through connector
# and with a doubly-stacked pass-through.
diff --git a/hl/Makefile.am b/hl/Makefile.am
index 172d0e8..ded7aa0 100644
--- a/hl/Makefile.am
+++ b/hl/Makefile.am
@@ -31,11 +31,21 @@ endif
if BUILD_CXX_CONDITIONAL
CXX_DIR = c++
endif
+if BUILD_TESTS_CONDITIONAL
+ TEST_DIR = test
+else
+ TEST_DIR =
+endif
+if BUILD_TOOLS_CONDITIONAL
+ TOOLS_DIR = tools
+else
+ TOOLS_DIR =
+endif
## Don't recurse into any subdirectories if HDF5 is not configured to
## use the HL library
if BUILD_HDF5_HL_CONDITIONAL
- SUBDIRS=src test tools $(CXX_DIR) $(FORTRAN_DIR)
+ SUBDIRS=src $(TEST_DIR) $(TOOLS_DIR) $(CXX_DIR) $(FORTRAN_DIR)
# Test with just the native connector, with a single pass-through connector
# and with a doubly-stacked pass-through.
diff --git a/hl/c++/Makefile.am b/hl/c++/Makefile.am
index 1968bf5..f9ea328 100644
--- a/hl/c++/Makefile.am
+++ b/hl/c++/Makefile.am
@@ -18,7 +18,13 @@
include $(top_srcdir)/config/commence.am
-SUBDIRS=src test
+if BUILD_TESTS_CONDITIONAL
+ TESTSERIAL_DIR =test
+else
+ TESTSERIAL_DIR=
+endif
+
+SUBDIRS=src $(TESTSERIAL_DIR)
DIST_SUBDIRS=src test examples
# Install examples
diff --git a/hl/fortran/Makefile.am b/hl/fortran/Makefile.am
index ad18a21..7d24770 100644
--- a/hl/fortran/Makefile.am
+++ b/hl/fortran/Makefile.am
@@ -23,7 +23,13 @@
include $(top_srcdir)/config/commence.am
-SUBDIRS=src test
+if BUILD_TESTS_CONDITIONAL
+ TESTSERIAL_DIR =test
+else
+ TESTSERIAL_DIR=
+endif
+
+SUBDIRS=src $(TESTSERIAL_DIR)
DIST_SUBDIRS=src test examples
# Install examples
diff --git a/java/Makefile.am b/java/Makefile.am
index ed2414d..51398f2 100644
--- a/java/Makefile.am
+++ b/java/Makefile.am
@@ -23,13 +23,21 @@
include $(top_srcdir)/config/commence.am
+if BUILD_TESTS_CONDITIONAL
+ TESTSERIAL_DIR =test
+ TESTEXAMPLES_DIR =examples
+else
+ TESTSERIAL_DIR=
+ TESTEXAMPLES_DIR=
+endif
+
## Only recurse into subdirectories if the Java (JNI) interface is enabled.
if BUILD_JAVA_CONDITIONAL
# Mark this directory as part of the JNI API
JAVA_API=yes
-SUBDIRS=src test examples
+SUBDIRS=src $(TESTSERIAL_DIR) $(TESTEXAMPLES_DIR)
# Test with just the native connector, with a single pass-through connector
# and with a doubly-stacked pass-through.
diff --git a/tools/Makefile.am b/tools/Makefile.am
index c53ecd6..5877cef 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -19,10 +19,16 @@
include $(top_srcdir)/config/commence.am
+if BUILD_TESTS_CONDITIONAL
+ TESTSERIAL_DIR =test
+else
+ TESTSERIAL_DIR=
+endif
+
CONFIG=ordered
# All subdirectories
-SUBDIRS=lib src test
+SUBDIRS=lib src $(TESTSERIAL_DIR)
# Test with just the native connector, with a single pass-through connector
# and with a doubly-stacked pass-through.