Source
681
681
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
682
682
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
683
683
684
684
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
685
685
$(EXTRA_PROG)
686
686
687
687
chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
688
688
TEST_EXTENSIONS = .sh
689
689
SH_LOG_COMPILER = $(SHELL)
690
690
AM_SH_LOG_FLAGS =
691
+
REALTIMEOUTPUT = $(realtimeOutput)
691
692
TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
692
693
TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
693
694
TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
694
695
TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_)
695
696
all: all-recursive
696
697
697
698
.SUFFIXES:
698
699
.SUFFIXES: .log .sh .sh$(EXEEXT) .trs
699
700
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
700
701
@for dep in $?; do \
1160
1161
# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
1161
1162
# This tells the Makefiles that these targets are not files to be built but
1162
1163
# commands that should be executed even if a file with the same name already
1163
1164
# exists.
1164
1165
.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \
1165
1166
build-tests check-clean check-install check-p check-s check-vfd \
1166
1167
install-doc lib progs tests uninstall-doc _exec_check-s _test help
1167
1168
1168
1169
help:
1169
1170
@$(top_srcdir)/bin/makehelp
1170
-
1171
1171
# lib/progs/tests targets recurse into subdirectories. build-* targets
1172
1172
# build files in this directory.
1173
1173
build-lib: $(LIB)
1174
1174
build-progs: $(LIB) $(PROGS)
1175
1175
build-tests: $(LIB) $(PROGS) $(chk_TESTS)
1176
1176
1177
1177
# General rule for recursive building targets.
1178
1178
# BUILT_SOURCES contain targets that need to be built before anything else
1179
1179
# in the directory (e.g., for Fortran type detection)
1180
1180
lib progs tests check-s check-p :: $(BUILT_SOURCES)
1248
1248
# $${log} is the log file.
1249
1249
# $${tname} is the name of test.
1250
1250
$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
1251
1251
@if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \
1252
1252
tname=$(@:.chkexe_=)$(EXEEXT);\
1253
1253
log=$(@:.chkexe_=.chklog); \
1254
1254
echo "============================"; \
1255
1255
if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \
1256
1256
echo "No need to test $${tname} again."; \
1257
1257
else \
1258
-
echo "============================" > $${log}; \
1259
-
if test "X$(FORTRAN_API)" = "Xyes"; then \
1260
-
echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
1261
-
echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
1262
-
elif test "X$(CXX_API)" = "Xyes"; then \
1263
-
echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
1264
-
echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
1265
-
else \
1266
-
echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
1267
-
echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
1268
-
fi; \
1269
-
echo "============================" >> $${log}; \
1270
-
srcdir="$(srcdir)" \
1271
-
$(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
1272
-
&& touch $(@:.chkexe_=.chkexe) || \
1273
-
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
1274
-
(cat $${log} && false) || exit 1; \
1258
+
if test -n "$(REALTIMEOUTPUT)"; then \
1259
+
echo "============================" | tee $${log}; \
1260
+
else \
1261
+
echo "============================" > $${log}; \
1262
+
fi; \
1263
+
if test "X$(FORTRAN_API)" = "Xyes"; then \
1264
+
echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
1265
+
if test -n "$(REALTIMEOUTPUT)"; then \
1266
+
echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
1267
+
else \
1268
+
echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
1269
+
fi; \
1270
+
elif test "X$(CXX_API)" = "Xyes"; then \
1271
+
echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
1272
+
if test -n "$(REALTIMEOUTPUT)"; then \
1273
+
echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
1274
+
else \
1275
+
echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
1276
+
fi; \
1277
+
else \
1278
+
echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
1279
+
if test -n "$(REALTIMEOUTPUT)"; then \
1280
+
echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
1281
+
else \
1282
+
echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
1283
+
fi; \
1284
+
fi; \
1285
+
if test -n "$(REALTIMEOUTPUT)"; then \
1286
+
echo "============================" | tee -a $${log}; \
1287
+
else \
1288
+
echo "============================" >> $${log}; \
1289
+
fi; \
1290
+
if test -n "$(REALTIMEOUTPUT)"; then \
1291
+
srcdir="$(srcdir)" \
1292
+
$(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) | tee -a $${log} 2>&1 \
1293
+
&& touch $(@:.chkexe_=.chkexe) || \
1294
+
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
1295
+
(cat $${log} && false) || exit 1; \
1296
+
else \
1297
+
srcdir="$(srcdir)" \
1298
+
$(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
1299
+
&& touch $(@:.chkexe_=.chkexe) || \
1300
+
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
1301
+
(cat $${log} && false) || exit 1; \
1302
+
fi; \
1275
1303
echo "" >> $${log}; \
1276
-
echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
1277
-
echo "============================" >> $${log}; \
1278
-
echo "Finished testing $${tname} $(TEST_FLAGS)"; \
1279
-
cat $${log}; \
1304
+
if test -n "$(REALTIMEOUTPUT)"; then \
1305
+
echo "Finished testing $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
1306
+
echo "============================" | tee -a $${log}; \
1307
+
else \
1308
+
echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
1309
+
echo "============================" >> $${log}; \
1310
+
fi; \
1311
+
if test -z "$(REALTIMEOUTPUT)"; then \
1312
+
cat $${log}; \
1313
+
fi; \
1280
1314
fi; \
1281
1315
fi
1282
1316
1283
1317
# The dummysh.chkexe here prevents the target from being
1284
1318
# empty if there are no tests in the current directory.
1285
1319
# $${log} is the log file.
1286
1320
# $${tname} is the name of test.
1287
1321
$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
1288
1322
@if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \
1289
1323
cmd=$(@:.chkexe_=);\