diff options
Diffstat (limited to 'tools')
36 files changed, 1518 insertions, 170 deletions
diff --git a/tools/Makefile.in b/tools/Makefile.in index 5d2a203..9e408d4 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -349,14 +349,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la +# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below +# has been removed. According to the official description of DESTDIR by Gnu at +# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is +# prepended to the normal and complete install path that it precedes for the +# purpose of installing in a temporary directory which is useful for building +# rpms and other packages. The '/' after ${DESTDIR} will be followed by another +# '/' at the beginning of the normal install path. When DESTDIR is empty the +# path then begins with '//', which is incorrect and causes problems at least for +# Cygwin. + # Scripts used to build examples # If only shared libraries have been installed, have h5cc build examples with # shared libraries instead of static libraries -H5CC = $(bindir)/h5cc -H5CC_PP = $(bindir)/h5pcc -H5FC = $(bindir)/h5fc -H5FC_PP = $(bindir)/h5pfc -H5CPP = $(bindir)/h5c++ +H5CC = ${DESTDIR}$(bindir)/h5cc +H5CC_PP = ${DESTDIR}$(bindir)/h5pcc +H5FC = ${DESTDIR}$(bindir)/h5fc +H5FC_PP = ${DESTDIR}$(bindir)/h5pfc +H5CPP = ${DESTDIR}$(bindir)/h5c++ ACLOCAL_AMFLAGS = "-I m4" # The trace script; this is used on source files from the C library to diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index afdd582..17dd7a5 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -131,15 +131,23 @@ IF (BUILD_TESTING) SET (HDF_EXT_SRC_FILE h5copy_extlinks_src) SET (HDF_EXT_TRG_FILE h5copy_extlinks_trg) -############# COPY OBJECTS ############## - # Remove any output file left over from previous test run ADD_TEST ( - NAME H5COPY-clear-objects + NAME H5COPY-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${HDF_FILE1}.out.h5 + ./testfiles/${HDF_FILE1}.out.ls ./testfiles/${HDF_FILE1}.out.out + ./testfiles/${HDF_FILE1}.out.out.err + ./testfiles/${HDF_FILE2}.out.h5 + ./testfiles/${HDF_FILE2}.out.ls + ./testfiles/${HDF_FILE2}.out.out + ./testfiles/${HDF_FILE2}.out.out.err + ./testfiles/${HDF_EXT_SRC_FILE}.out.h5 + ./testfiles/${HDF_EXT_SRC_FILE}.out.ls + ./testfiles/${HDF_EXT_SRC_FILE}.out.out + ./testfiles/${HDF_EXT_SRC_FILE}.out.out.err ) # "Test copying various forms of datasets" @@ -166,17 +174,17 @@ IF (BUILD_TESTING) ADD_H5_TEST (simple_group 0 ${HDF_FILE1} v /grp_dsets/simple /grp_dsets/simple_group) # "Test copying & renaming group" - ADD_H5_TEST (grp_rename 1 ${HDF_FILE1} v grp_dsets grp_rename) + ADD_H5_TEST (grp_rename 0 ${HDF_FILE1} v grp_dsets grp_rename) # "Test copying 'full' group hierarchy into group in destination file" - ADD_H5_TEST (grp_dsets_rename 1 ${HDF_FILE1} v grp_dsets /grp_rename/grp_dsets) + ADD_H5_TEST (grp_dsets_rename 0 ${HDF_FILE1} v grp_dsets /grp_rename/grp_dsets) # "Test copying objects into group hier. that doesn't exist yet in destination file" ADD_H5_TEST (A_B1_simple 0 ${HDF_FILE1} vp simple /A/B1/simple) ADD_H5_TEST (A_B2_simple2 0 ${HDF_FILE1} vp simple /A/B2/simple2) ADD_H5_TEST (C_D_simple 0 ${HDF_FILE1} vp /grp_dsets/simple /C/D/simple) - ADD_H5_TEST (E_F_grp_dsets 1 ${HDF_FILE1} vp /grp_dsets /E/F/grp_dsets) - ADD_H5_TEST (G_H_grp_nested 1 ${HDF_FILE1} vp /grp_nested /G/H/grp_nested) + ADD_H5_TEST (E_F_grp_dsets 0 ${HDF_FILE1} vp /grp_dsets /E/F/grp_dsets) + ADD_H5_TEST (G_H_grp_nested 0 ${HDF_FILE1} vp /grp_nested /G/H/grp_nested) # Verify that the file created above is correct ADD_H5LS_TEST (${HDF_FILE1}) @@ -190,6 +198,7 @@ IF (BUILD_TESTING) -E remove ./testfiles/${HDF_FILE2}.out.h5 ./testfiles/${HDF_FILE2}.out.out + ./testfiles/${HDF_FILE2}.out.out.err ) # "Test copying object and region references" @@ -207,6 +216,7 @@ IF (BUILD_TESTING) -E remove ./testfiles/${HDF_EXT_SRC_FILE}.out.h5 ./testfiles/${HDF_EXT_SRC_FILE}.out.out + ./testfiles/${HDF_EXT_SRC_FILE}.out.out.err ) # "Test copying external link directly without -f ext" @@ -251,7 +261,7 @@ INSTALL ( TARGETS h5copy RUNTIME DESTINATION - bin/tools + ${HDF5_INSTALL_BIN_DIR}/tools COMPONENT toolsapplications ) diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 9e382d1..83fb97d 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -341,14 +341,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la +# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below +# has been removed. According to the official description of DESTDIR by Gnu at +# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is +# prepended to the normal and complete install path that it precedes for the +# purpose of installing in a temporary directory which is useful for building +# rpms and other packages. The '/' after ${DESTDIR} will be followed by another +# '/' at the beginning of the normal install path. When DESTDIR is empty the +# path then begins with '//', which is incorrect and causes problems at least for +# Cygwin. + # Scripts used to build examples # If only shared libraries have been installed, have h5cc build examples with # shared libraries instead of static libraries -H5CC = $(bindir)/h5cc -H5CC_PP = $(bindir)/h5pcc -H5FC = $(bindir)/h5fc -H5FC_PP = $(bindir)/h5pfc -H5CPP = $(bindir)/h5c++ +H5CC = ${DESTDIR}$(bindir)/h5cc +H5CC_PP = ${DESTDIR}$(bindir)/h5pcc +H5FC = ${DESTDIR}$(bindir)/h5fc +H5FC_PP = ${DESTDIR}$(bindir)/h5pfc +H5CPP = ${DESTDIR}$(bindir)/h5c++ ACLOCAL_AMFLAGS = "-I m4" # The trace script; this is used on source files from the C library to diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index 924c4ec..a784ae7 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -118,6 +118,7 @@ IF (BUILD_TESTING) h5diff_481.txt h5diff_482.txt h5diff_483.txt + h5diff_484.txt h5diff_50.txt h5diff_51.txt h5diff_52.txt @@ -129,6 +130,7 @@ IF (BUILD_TESTING) h5diff_58.txt h5diff_500.txt h5diff_501.txt + h5diff_502.txt h5diff_503.txt h5diff_504.txt h5diff_505.txt @@ -137,9 +139,14 @@ IF (BUILD_TESTING) h5diff_508.txt h5diff_509.txt h5diff_510.txt + h5diff_511.txt h5diff_512.txt h5diff_513.txt h5diff_514.txt + h5diff_515.txt + h5diff_516.txt + h5diff_517.txt + h5diff_518.txt h5diff_600.txt h5diff_601.txt h5diff_603.txt @@ -206,7 +213,7 @@ IF (BUILD_TESTING) FOREACH (txt_file ${HDF5_REFERENCE_FILES}) SET (txtdest "${PROJECT_BINARY_DIR}/${txt_file}") - #MESSAGE (STATUS " Translating ${txt_file}") + #MESSAGE (STATUS " Copying ${txt_file}") ADD_CUSTOM_COMMAND ( TARGET h5diff POST_BUILD @@ -226,7 +233,7 @@ IF (BUILD_TESTING) ) ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - IF (WIN32) + IF (WIN32 AND NOT CYGWIN) ADD_CUSTOM_COMMAND ( TARGET h5diff POST_BUILD @@ -240,7 +247,7 @@ IF (BUILD_TESTING) COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102w.txt ${PROJECT_BINARY_DIR}/h5diff_102.txt ) - ELSE (WIN32) + ELSE (WIN32 AND NOT CYGWIN) ADD_CUSTOM_COMMAND ( TARGET h5diff POST_BUILD @@ -254,7 +261,7 @@ IF (BUILD_TESTING) COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102.txt ${PROJECT_BINARY_DIR}/h5diff_102.txt ) - ENDIF (WIN32) + ENDIF (WIN32 AND NOT CYGWIN) ############################################################################## ############################################################################## @@ -286,40 +293,314 @@ IF (BUILD_TESTING) # -------------------------------------------------------------------- # test file names # -------------------------------------------------------------------- -SET (FILE1 h5diff_basic1.h5) -SET (FILE2 h5diff_basic2.h5) -SET (FILE3 h5diff_types.h5) -SET (FILE4 h5diff_dtypes.h5) -SET (FILE5 h5diff_attr1.h5) -SET (FILE6 h5diff_attr2.h5) -SET (FILE7 h5diff_dset1.h5) -SET (FILE8 h5diff_dset2.h5) -SET (FILE9 h5diff_hyper1.h5) -SET (FILE10 h5diff_hyper2.h5) -SET (FILE11 h5diff_empty.h5) -SET (FILE12 h5diff_links.h5) -SET (FILE13 h5diff_softlinks.h5) -SET (FILE14 h5diff_linked_softlink.h5) -SET (FILE15 h5diff_extlink_src.h5) -SET (FILE16 h5diff_extlink_trg.h5) -SET (FILE17 h5diff_ext2softlink_src.h5) -SET (FILE18 h5diff_ext2softlink_trg.h5) -SET (DANGLE_LINK_FILE1 h5diff_danglelinks1.h5) -SET (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5) -SET (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5) -SET (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5) -# group recursive - same structure via external links through files -SET (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5) -SET (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5) -SET (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5) -SET (GRP_RECURSE2_EXT3 h5diff_grp_recurse_ext2-3.h5) -# same structure, same obj name with different value -SET (EXCLUDE_FILE1_1 h5diff_exclude1-1.h5) -SET (EXCLUDE_FILE1_2 h5diff_exclude1-2.h5) -# different structure and obj names -SET (EXCLUDE_FILE2_1 h5diff_exclude2-1.h5) -SET (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5) - + SET (FILE1 h5diff_basic1.h5) + SET (FILE2 h5diff_basic2.h5) + SET (FILE3 h5diff_types.h5) + SET (FILE4 h5diff_dtypes.h5) + SET (FILE5 h5diff_attr1.h5) + SET (FILE6 h5diff_attr2.h5) + SET (FILE7 h5diff_dset1.h5) + SET (FILE8 h5diff_dset2.h5) + SET (FILE9 h5diff_hyper1.h5) + SET (FILE10 h5diff_hyper2.h5) + SET (FILE11 h5diff_empty.h5) + SET (FILE12 h5diff_links.h5) + SET (FILE13 h5diff_softlinks.h5) + SET (FILE14 h5diff_linked_softlink.h5) + SET (FILE15 h5diff_extlink_src.h5) + SET (FILE16 h5diff_extlink_trg.h5) + SET (FILE17 h5diff_ext2softlink_src.h5) + SET (FILE18 h5diff_ext2softlink_trg.h5) + SET (DANGLE_LINK_FILE1 h5diff_danglelinks1.h5) + SET (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5) + SET (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5) + SET (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5) + # group recursive - same structure via external links through files + SET (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5) + SET (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5) + SET (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5) + SET (GRP_RECURSE2_EXT3 h5diff_grp_recurse_ext2-3.h5) + # same structure, same obj name with different value + SET (EXCLUDE_FILE1_1 h5diff_exclude1-1.h5) + SET (EXCLUDE_FILE1_2 h5diff_exclude1-2.h5) + # different structure and obj names + SET (EXCLUDE_FILE2_1 h5diff_exclude2-1.h5) + SET (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5) + + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5DIFF-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + h5diff_10.out + h5diff_10.out.err + h5diff_100.out + h5diff_100.out.err + h5diff_101.out + h5diff_101.out.err + h5diff_102.out + h5diff_102.out.err + h5diff_11.out + h5diff_11.out.err + h5diff_12.out + h5diff_12.out.err + h5diff_13.out + h5diff_13.out.err + h5diff_14.out + h5diff_14.out.err + h5diff_15.out + h5diff_15.out.err + h5diff_16_1.out + h5diff_16_1.out.err + h5diff_16_2.out + h5diff_16_2.out.err + h5diff_16_3.out + h5diff_16_3.out.err + h5diff_17.out + h5diff_17.out.err + h5diff_171.out + h5diff_171.out.err + h5diff_172.out + h5diff_172.out.err + h5diff_18_1.out + h5diff_18_1.out.err + h5diff_18.out + h5diff_18.out.err + h5diff_20.out + h5diff_20.out.err + h5diff_200.out + h5diff_200.out.err + h5diff_201.out + h5diff_201.out.err + h5diff_202.out + h5diff_202.out.err + h5diff_203.out + h5diff_203.out.err + h5diff_204.out + h5diff_204.out.err + h5diff_205.out + h5diff_205.out.err + h5diff_206.out + h5diff_206.out.err + h5diff_207.out + h5diff_207.out.err + h5diff_21.out + h5diff_21.out.err + h5diff_22.out + h5diff_22.out.err + h5diff_23.out + h5diff_23.out.err + h5diff_24.out + h5diff_24.out.err + h5diff_25.out + h5diff_25.out.err + h5diff_26.out + h5diff_26.out.err + h5diff_27.out + h5diff_27.out.err + h5diff_28.out + h5diff_28.out.err + h5diff_300.out + h5diff_300.out.err + h5diff_400.out + h5diff_400.out.err + h5diff_401.out + h5diff_401.out.err + h5diff_402.out + h5diff_402.out.err + h5diff_403.out + h5diff_403.out.err + h5diff_404.out + h5diff_404.out.err + h5diff_405.out + h5diff_405.out.err + h5diff_406.out + h5diff_406.out.err + h5diff_407.out + h5diff_407.out.err + h5diff_408.out + h5diff_408.out.err + h5diff_409.out + h5diff_409.out.err + h5diff_410.out + h5diff_410.out.err + h5diff_411.out + h5diff_411.out.err + h5diff_412.out + h5diff_412.out.err + h5diff_413.out + h5diff_413.out.err + h5diff_414.out + h5diff_414.out.err + h5diff_415.out + h5diff_415.out.err + h5diff_416.out + h5diff_416.out.err + h5diff_417.out + h5diff_417.out.err + h5diff_418.out + h5diff_418.out.err + h5diff_419.out + h5diff_419.out.err + h5diff_420.out + h5diff_420.out.err + h5diff_421.out + h5diff_421.out.err + h5diff_422.out + h5diff_422.out.err + h5diff_423.out + h5diff_423.out.err + h5diff_424.out + h5diff_424.out.err + h5diff_425.out + h5diff_425.out.err + h5diff_450.out + h5diff_450.out.err + h5diff_451.out + h5diff_451.out.err + h5diff_452.out + h5diff_452.out.err + h5diff_453.out + h5diff_453.out.err + h5diff_454.out + h5diff_454.out.err + h5diff_455.out + h5diff_455.out.err + h5diff_456.out + h5diff_456.out.err + h5diff_457.out + h5diff_457.out.err + h5diff_458.out + h5diff_458.out.err + h5diff_459.out + h5diff_459.out.err + h5diff_480.out + h5diff_480.out.err + h5diff_481.out + h5diff_481.out.err + h5diff_482.out + h5diff_482.out.err + h5diff_483.out + h5diff_483.out.err + h5diff_484.out + h5diff_484.out.err + h5diff_50.out + h5diff_50.out.err + h5diff_51.out + h5diff_51.out.err + h5diff_52.out + h5diff_52.out.err + h5diff_53.out + h5diff_53.out.err + h5diff_54.out + h5diff_54.out.err + h5diff_55.out + h5diff_55.out.err + h5diff_56.out + h5diff_56.out.err + h5diff_57.out + h5diff_57.out.err + h5diff_58.out + h5diff_58.out.err + h5diff_500.out + h5diff_500.out.err + h5diff_501.out + h5diff_501.out.err + h5diff_502.out + h5diff_502.out.err + h5diff_503.out + h5diff_503.out.err + h5diff_504.out + h5diff_504.out.err + h5diff_505.out + h5diff_505.out.err + h5diff_506.out + h5diff_506.out.err + h5diff_507.out + h5diff_507.out.err + h5diff_508.out + h5diff_508.out.err + h5diff_509.out + h5diff_509.out.err + h5diff_510.out + h5diff_510.out.err + h5diff_511.out + h5diff_511.out.err + h5diff_512.out + h5diff_512.out.err + h5diff_513.out + h5diff_513.out.err + h5diff_514.out + h5diff_514.out.err + h5diff_515.out + h5diff_515.out.err + h5diff_516.out + h5diff_516.out.err + h5diff_517.out + h5diff_517.out.err + h5diff_518.out + h5diff_518.out.err + h5diff_600.out + h5diff_600.out.err + h5diff_601.out + h5diff_601.out.err + h5diff_603.out + h5diff_603.out.err + h5diff_604.out + h5diff_604.out.err + h5diff_605.out + h5diff_605.out.err + h5diff_606.out + h5diff_606.out.err + h5diff_607.out + h5diff_607.out.err + h5diff_608.out + h5diff_608.out.err + h5diff_609.out + h5diff_609.out.err + h5diff_610.out + h5diff_610.out.err + h5diff_612.out + h5diff_612.out.err + h5diff_613.out + h5diff_613.out.err + h5diff_614.out + h5diff_614.out.err + h5diff_615.out + h5diff_615.out.err + h5diff_616.out + h5diff_616.out.err + h5diff_617.out + h5diff_617.out.err + h5diff_618.out + h5diff_618.out.err + h5diff_619.out + h5diff_619.out.err + h5diff_621.out + h5diff_621.out.err + h5diff_622.out + h5diff_622.out.err + h5diff_623.out + h5diff_623.out.err + h5diff_624.out + h5diff_624.out.err + h5diff_625.out + h5diff_625.out.err + h5diff_626.out + h5diff_626.out.err + h5diff_627.out + h5diff_627.out.err + h5diff_628.out + h5diff_628.out.err + h5diff_629.out + h5diff_629.out.err + h5diff_70.out + h5diff_70.out.err + h5diff_80.out + h5diff_80.out.err + h5diff_90.out + h5diff_90.out.err + ) # ############################################################################ # # Common usage @@ -395,7 +676,7 @@ ADD_H5_TEST (h5diff_24 0 -v ${FILE3} ${FILE3} t1 t1) ADD_H5_TEST (h5diff_25 0 -v ${FILE3} ${FILE3} l1 l1) # 2.6 -ADD_H5_TEST (h5diff_26 1 -v ${FILE3} ${FILE3} g1 g2) +ADD_H5_TEST (h5diff_26 0 -v ${FILE3} ${FILE3} g1 g2) # 2.7 ADD_H5_TEST (h5diff_27 1 -v ${FILE3} ${FILE3} t1 t2) @@ -642,7 +923,7 @@ ADD_H5_TEST (h5diff_414 1 --follow-symlinks -v ${FILE14} ${FILE14} /target_group ADD_H5_TEST (h5diff_415 1 --follow-symlinks -v ${FILE14} ${FILE14} /softlink3_to_slink2 /target_group) # linked_softlink_to_group1 vs linked_softlink_to_group2" -ADD_H5_TEST (h5diff_416 1 --follow-symlinks -v ${FILE14} ${FILE14} /softlink3_to_slink2 /softlink4_to_slink2) +ADD_H5_TEST (h5diff_416 0 --follow-symlinks -v ${FILE14} ${FILE14} /softlink3_to_slink2 /softlink4_to_slink2) # non-exist-softlink vs softlink" ADD_H5_TEST (h5diff_417 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_noexist /softlink_dset2) @@ -709,37 +990,37 @@ ADD_H5_TEST (h5diff_459 2 --follow-symlinks -v --no-dangling-links ${FILE15} $ # # test for group diff recursivly # ############################################################################## # root -ADD_H5_TEST (h5diff_500 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /) -ADD_H5_TEST (h5diff_501 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /) +ADD_H5_TEST (h5diff_500 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /) +ADD_H5_TEST (h5diff_501 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /) # root vs group -ADD_H5_TEST (h5diff_502 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /grp1/grp2/grp3) +ADD_H5_TEST (h5diff_502 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /grp1/grp2/grp3) # group vs group (same name and structure) -ADD_H5_TEST (h5diff_503 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /grp1) +ADD_H5_TEST (h5diff_503 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /grp1) # group vs group (different name and structure) -ADD_H5_TEST (h5diff_504 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1/grp2 /grp1/grp2/grp3) +ADD_H5_TEST (h5diff_504 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1/grp2 /grp1/grp2/grp3) # groups vs soft-link -ADD_H5_TEST (h5diff_505 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /slink_grp1) -ADD_H5_TEST (h5diff_506 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1/grp2 /slink_grp2) +ADD_H5_TEST (h5diff_505 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /slink_grp1) +ADD_H5_TEST (h5diff_506 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1/grp2 /slink_grp2) # groups vs ext-link -ADD_H5_TEST (h5diff_507 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /elink_grp1) -ADD_H5_TEST (h5diff_508 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /elink_grp1) +ADD_H5_TEST (h5diff_507 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /elink_grp1) +ADD_H5_TEST (h5diff_508 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /elink_grp1) # soft-link vs ext-link -ADD_H5_TEST (h5diff_509 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp1 /elink_grp1) -ADD_H5_TEST (h5diff_510 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp1 /elink_grp1) +ADD_H5_TEST (h5diff_509 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp1 /elink_grp1) +ADD_H5_TEST (h5diff_510 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp1 /elink_grp1) # circled ext links -ADD_H5_TEST (h5diff_511 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp10 /grp11) -ADD_H5_TEST (h5diff_512 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp10 /grp11) +ADD_H5_TEST (h5diff_511 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp10 /grp11) +ADD_H5_TEST (h5diff_512 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp10 /grp11) # circled soft2ext-link vs soft2ext-link -ADD_H5_TEST (h5diff_513 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11) -ADD_H5_TEST (h5diff_514 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11) +ADD_H5_TEST (h5diff_513 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11) +ADD_H5_TEST (h5diff_514 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11) ############################################################################### # Test for group recursive diff via multi-linked external links @@ -747,11 +1028,11 @@ ADD_H5_TEST (h5diff_514 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_ # be same with the external links. ############################################################################### # file vs file -ADD_H5_TEST (h5diff_515 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1}) -ADD_H5_TEST (h5diff_516 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1}) +ADD_H5_TEST (h5diff_515 1 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1}) +ADD_H5_TEST (h5diff_516 0 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1}) # group vs group -ADD_H5_TEST (h5diff_517 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1) -ADD_H5_TEST (h5diff_518 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1) +ADD_H5_TEST (h5diff_517 1 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1) +ADD_H5_TEST (h5diff_518 0 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1) # ############################################################################## @@ -773,6 +1054,9 @@ ADD_H5_TEST (h5diff_482 0 -v --exclude-path "/group1" --exclude-path "/dset1" ${ # Exclude only some different objects. Expect return - diff ADD_H5_TEST (h5diff_483 1 -v --exclude-path "/group1" ${EXCLUDE_FILE2_1} ${EXCLUDE_FILE2_2}) +# Exclude from group compare +ADD_H5_TEST (h5diff_484 0 -v --exclude-path "/dset3" ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2} /group1) + ENDIF (BUILD_TESTING) @@ -789,7 +1073,7 @@ INSTALL ( TARGETS h5diff RUNTIME DESTINATION - bin/tools + ${HDF5_INSTALL_BIN_DIR}/tools COMPONENT toolsapplications ) diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index ce3acd9..3bfbf8e 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -348,14 +348,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la +# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below +# has been removed. According to the official description of DESTDIR by Gnu at +# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is +# prepended to the normal and complete install path that it precedes for the +# purpose of installing in a temporary directory which is useful for building +# rpms and other packages. The '/' after ${DESTDIR} will be followed by another +# '/' at the beginning of the normal install path. When DESTDIR is empty the +# path then begins with '//', which is incorrect and causes problems at least for +# Cygwin. + # Scripts used to build examples # If only shared libraries have been installed, have h5cc build examples with # shared libraries instead of static libraries -H5CC = $(bindir)/h5cc -H5CC_PP = $(bindir)/h5pcc -H5FC = $(bindir)/h5fc -H5FC_PP = $(bindir)/h5pfc -H5CPP = $(bindir)/h5c++ +H5CC = ${DESTDIR}$(bindir)/h5cc +H5CC_PP = ${DESTDIR}$(bindir)/h5pcc +H5FC = ${DESTDIR}$(bindir)/h5fc +H5FC_PP = ${DESTDIR}$(bindir)/h5pfc +H5CPP = ${DESTDIR}$(bindir)/h5c++ ACLOCAL_AMFLAGS = "-I m4" # The trace script; this is used on source files from the C library to diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index a678b2f..84eb49a 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -453,6 +453,30 @@ void usage(void) printf(" comparing floating point values.\n"); printf(" By default, strict equality is used. Use -p or -d to\n"); printf(" set specific tolerance.\n"); + printf(" --exclude-path \"path\" Exclude the specified path to an object when\n"); + printf(" comparing files or groups. If a group is excluded,\n"); + printf(" all member objects will also be excluded.\n"); + printf(" The specified path is excluded wherever it occurs.\n"); + printf(" This flexibility enables the same option to exclude\n"); + printf(" either objects that exist only in one file or\n"); + printf(" common objects that are known to differ.\n"); + printf("\n"); + printf(" When comparing files, \"path\" is the absolute path to\n"); + printf(" the excluded object; when comparing groups, \"path\" is\n"); + printf(" similar to the relative path from the group to the\n"); + printf(" excluded object. This \"path\" can be taken from the\n"); + printf(" first section of the output of the --verbose option.\n"); + printf(" For example, if you are comparing the group /groupA\n"); + printf(" in two files and you want to exclude\n"); + printf(" /groupA/groupB/groupC in both files, the exclude\n"); + printf(" option would read as follows:\n"); + printf(" --exclude-path \"/groupB/groupC\"\n"); + printf("\n"); + printf(" If there are multiple paths to an object, only the\n"); + printf(" specified path(s) will be excluded; the comparison\n"); + printf(" will include any path not explicitly excluded.\n"); + printf(" This option can be used repeatedly to exclude\n"); + printf(" multiple paths.\n"); printf("\n"); printf(" Modes of output:\n"); diff --git a/tools/h5diff/testfiles/h5diff_10.txt b/tools/h5diff/testfiles/h5diff_10.txt index 224f9bc..4dae480 100644 --- a/tools/h5diff/testfiles/h5diff_10.txt +++ b/tools/h5diff/testfiles/h5diff_10.txt @@ -62,6 +62,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] comparing floating point values. By default, strict equality is used. Use -p or -d to set specific tolerance. + --exclude-path "path" Exclude the specified path to an object when + comparing files or groups. If a group is excluded, + all member objects will also be excluded. + The specified path is excluded wherever it occurs. + This flexibility enables the same option to exclude + either objects that exist only in one file or + common objects that are known to differ. + + When comparing files, "path" is the absolute path to + the excluded object; when comparing groups, "path" is + similar to the relative path from the group to the + excluded object. This "path" can be taken from the + first section of the output of the --verbose option. + For example, if you are comparing the group /groupA + in two files and you want to exclude + /groupA/groupB/groupC in both files, the exclude + option would read as follows: + --exclude-path "/groupB/groupC" + + If there are multiple paths to an object, only the + specified path(s) will be excluded; the comparison + will include any path not explicitly excluded. + This option can be used repeatedly to exclude + multiple paths. Modes of output: Default mode: print the number of differences found and where they occured diff --git a/tools/h5diff/testfiles/h5diff_484.txt b/tools/h5diff/testfiles/h5diff_484.txt new file mode 100644 index 0000000..87d9c7c --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_484.txt @@ -0,0 +1,11 @@ + +group1 group2 +--------------------------------------- + x x + x x /dset2 + +group : </group1> and </group1> +0 differences found +dataset: </group1/dset2> and </group1/dset2> +0 differences found +EXIT CODE: 0 diff --git a/tools/h5diff/testfiles/h5diff_600.txt b/tools/h5diff/testfiles/h5diff_600.txt index b096ab5..ea767fc 100644 --- a/tools/h5diff/testfiles/h5diff_600.txt +++ b/tools/h5diff/testfiles/h5diff_600.txt @@ -62,6 +62,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] comparing floating point values. By default, strict equality is used. Use -p or -d to set specific tolerance. + --exclude-path "path" Exclude the specified path to an object when + comparing files or groups. If a group is excluded, + all member objects will also be excluded. + The specified path is excluded wherever it occurs. + This flexibility enables the same option to exclude + either objects that exist only in one file or + common objects that are known to differ. + + When comparing files, "path" is the absolute path to + the excluded object; when comparing groups, "path" is + similar to the relative path from the group to the + excluded object. This "path" can be taken from the + first section of the output of the --verbose option. + For example, if you are comparing the group /groupA + in two files and you want to exclude + /groupA/groupB/groupC in both files, the exclude + option would read as follows: + --exclude-path "/groupB/groupC" + + If there are multiple paths to an object, only the + specified path(s) will be excluded; the comparison + will include any path not explicitly excluded. + This option can be used repeatedly to exclude + multiple paths. Modes of output: Default mode: print the number of differences found and where they occured diff --git a/tools/h5diff/testfiles/h5diff_603.txt b/tools/h5diff/testfiles/h5diff_603.txt index 2b37530..1c48c8b 100644 --- a/tools/h5diff/testfiles/h5diff_603.txt +++ b/tools/h5diff/testfiles/h5diff_603.txt @@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] comparing floating point values. By default, strict equality is used. Use -p or -d to set specific tolerance. + --exclude-path "path" Exclude the specified path to an object when + comparing files or groups. If a group is excluded, + all member objects will also be excluded. + The specified path is excluded wherever it occurs. + This flexibility enables the same option to exclude + either objects that exist only in one file or + common objects that are known to differ. + + When comparing files, "path" is the absolute path to + the excluded object; when comparing groups, "path" is + similar to the relative path from the group to the + excluded object. This "path" can be taken from the + first section of the output of the --verbose option. + For example, if you are comparing the group /groupA + in two files and you want to exclude + /groupA/groupB/groupC in both files, the exclude + option would read as follows: + --exclude-path "/groupB/groupC" + + If there are multiple paths to an object, only the + specified path(s) will be excluded; the comparison + will include any path not explicitly excluded. + This option can be used repeatedly to exclude + multiple paths. Modes of output: Default mode: print the number of differences found and where they occured diff --git a/tools/h5diff/testfiles/h5diff_606.txt b/tools/h5diff/testfiles/h5diff_606.txt index 63a1d53..8f3bbd6 100644 --- a/tools/h5diff/testfiles/h5diff_606.txt +++ b/tools/h5diff/testfiles/h5diff_606.txt @@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] comparing floating point values. By default, strict equality is used. Use -p or -d to set specific tolerance. + --exclude-path "path" Exclude the specified path to an object when + comparing files or groups. If a group is excluded, + all member objects will also be excluded. + The specified path is excluded wherever it occurs. + This flexibility enables the same option to exclude + either objects that exist only in one file or + common objects that are known to differ. + + When comparing files, "path" is the absolute path to + the excluded object; when comparing groups, "path" is + similar to the relative path from the group to the + excluded object. This "path" can be taken from the + first section of the output of the --verbose option. + For example, if you are comparing the group /groupA + in two files and you want to exclude + /groupA/groupB/groupC in both files, the exclude + option would read as follows: + --exclude-path "/groupB/groupC" + + If there are multiple paths to an object, only the + specified path(s) will be excluded; the comparison + will include any path not explicitly excluded. + This option can be used repeatedly to exclude + multiple paths. Modes of output: Default mode: print the number of differences found and where they occured diff --git a/tools/h5diff/testfiles/h5diff_612.txt b/tools/h5diff/testfiles/h5diff_612.txt index 6141495..e348caa 100644 --- a/tools/h5diff/testfiles/h5diff_612.txt +++ b/tools/h5diff/testfiles/h5diff_612.txt @@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] comparing floating point values. By default, strict equality is used. Use -p or -d to set specific tolerance. + --exclude-path "path" Exclude the specified path to an object when + comparing files or groups. If a group is excluded, + all member objects will also be excluded. + The specified path is excluded wherever it occurs. + This flexibility enables the same option to exclude + either objects that exist only in one file or + common objects that are known to differ. + + When comparing files, "path" is the absolute path to + the excluded object; when comparing groups, "path" is + similar to the relative path from the group to the + excluded object. This "path" can be taken from the + first section of the output of the --verbose option. + For example, if you are comparing the group /groupA + in two files and you want to exclude + /groupA/groupB/groupC in both files, the exclude + option would read as follows: + --exclude-path "/groupB/groupC" + + If there are multiple paths to an object, only the + specified path(s) will be excluded; the comparison + will include any path not explicitly excluded. + This option can be used repeatedly to exclude + multiple paths. Modes of output: Default mode: print the number of differences found and where they occured diff --git a/tools/h5diff/testfiles/h5diff_615.txt b/tools/h5diff/testfiles/h5diff_615.txt index eaa2078..1bb0eb5 100644 --- a/tools/h5diff/testfiles/h5diff_615.txt +++ b/tools/h5diff/testfiles/h5diff_615.txt @@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] comparing floating point values. By default, strict equality is used. Use -p or -d to set specific tolerance. + --exclude-path "path" Exclude the specified path to an object when + comparing files or groups. If a group is excluded, + all member objects will also be excluded. + The specified path is excluded wherever it occurs. + This flexibility enables the same option to exclude + either objects that exist only in one file or + common objects that are known to differ. + + When comparing files, "path" is the absolute path to + the excluded object; when comparing groups, "path" is + similar to the relative path from the group to the + excluded object. This "path" can be taken from the + first section of the output of the --verbose option. + For example, if you are comparing the group /groupA + in two files and you want to exclude + /groupA/groupB/groupC in both files, the exclude + option would read as follows: + --exclude-path "/groupB/groupC" + + If there are multiple paths to an object, only the + specified path(s) will be excluded; the comparison + will include any path not explicitly excluded. + This option can be used repeatedly to exclude + multiple paths. Modes of output: Default mode: print the number of differences found and where they occured diff --git a/tools/h5diff/testfiles/h5diff_621.txt b/tools/h5diff/testfiles/h5diff_621.txt index 8319db9..172cade 100644 --- a/tools/h5diff/testfiles/h5diff_621.txt +++ b/tools/h5diff/testfiles/h5diff_621.txt @@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] comparing floating point values. By default, strict equality is used. Use -p or -d to set specific tolerance. + --exclude-path "path" Exclude the specified path to an object when + comparing files or groups. If a group is excluded, + all member objects will also be excluded. + The specified path is excluded wherever it occurs. + This flexibility enables the same option to exclude + either objects that exist only in one file or + common objects that are known to differ. + + When comparing files, "path" is the absolute path to + the excluded object; when comparing groups, "path" is + similar to the relative path from the group to the + excluded object. This "path" can be taken from the + first section of the output of the --verbose option. + For example, if you are comparing the group /groupA + in two files and you want to exclude + /groupA/groupB/groupC in both files, the exclude + option would read as follows: + --exclude-path "/groupB/groupC" + + If there are multiple paths to an object, only the + specified path(s) will be excluded; the comparison + will include any path not explicitly excluded. + This option can be used repeatedly to exclude + multiple paths. Modes of output: Default mode: print the number of differences found and where they occured diff --git a/tools/h5diff/testfiles/h5diff_622.txt b/tools/h5diff/testfiles/h5diff_622.txt index 1ccff92..beb04c5 100644 --- a/tools/h5diff/testfiles/h5diff_622.txt +++ b/tools/h5diff/testfiles/h5diff_622.txt @@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] comparing floating point values. By default, strict equality is used. Use -p or -d to set specific tolerance. + --exclude-path "path" Exclude the specified path to an object when + comparing files or groups. If a group is excluded, + all member objects will also be excluded. + The specified path is excluded wherever it occurs. + This flexibility enables the same option to exclude + either objects that exist only in one file or + common objects that are known to differ. + + When comparing files, "path" is the absolute path to + the excluded object; when comparing groups, "path" is + similar to the relative path from the group to the + excluded object. This "path" can be taken from the + first section of the output of the --verbose option. + For example, if you are comparing the group /groupA + in two files and you want to exclude + /groupA/groupB/groupC in both files, the exclude + option would read as follows: + --exclude-path "/groupB/groupC" + + If there are multiple paths to an object, only the + specified path(s) will be excluded; the comparison + will include any path not explicitly excluded. + This option can be used repeatedly to exclude + multiple paths. Modes of output: Default mode: print the number of differences found and where they occured diff --git a/tools/h5diff/testfiles/h5diff_623.txt b/tools/h5diff/testfiles/h5diff_623.txt index 2c15d98..56c0b4c 100644 --- a/tools/h5diff/testfiles/h5diff_623.txt +++ b/tools/h5diff/testfiles/h5diff_623.txt @@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] comparing floating point values. By default, strict equality is used. Use -p or -d to set specific tolerance. + --exclude-path "path" Exclude the specified path to an object when + comparing files or groups. If a group is excluded, + all member objects will also be excluded. + The specified path is excluded wherever it occurs. + This flexibility enables the same option to exclude + either objects that exist only in one file or + common objects that are known to differ. + + When comparing files, "path" is the absolute path to + the excluded object; when comparing groups, "path" is + similar to the relative path from the group to the + excluded object. This "path" can be taken from the + first section of the output of the --verbose option. + For example, if you are comparing the group /groupA + in two files and you want to exclude + /groupA/groupB/groupC in both files, the exclude + option would read as follows: + --exclude-path "/groupB/groupC" + + If there are multiple paths to an object, only the + specified path(s) will be excluded; the comparison + will include any path not explicitly excluded. + This option can be used repeatedly to exclude + multiple paths. Modes of output: Default mode: print the number of differences found and where they occured diff --git a/tools/h5diff/testfiles/h5diff_624.txt b/tools/h5diff/testfiles/h5diff_624.txt index 272b9fc..c0a95ed 100644 --- a/tools/h5diff/testfiles/h5diff_624.txt +++ b/tools/h5diff/testfiles/h5diff_624.txt @@ -63,6 +63,30 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] comparing floating point values. By default, strict equality is used. Use -p or -d to set specific tolerance. + --exclude-path "path" Exclude the specified path to an object when + comparing files or groups. If a group is excluded, + all member objects will also be excluded. + The specified path is excluded wherever it occurs. + This flexibility enables the same option to exclude + either objects that exist only in one file or + common objects that are known to differ. + + When comparing files, "path" is the absolute path to + the excluded object; when comparing groups, "path" is + similar to the relative path from the group to the + excluded object. This "path" can be taken from the + first section of the output of the --verbose option. + For example, if you are comparing the group /groupA + in two files and you want to exclude + /groupA/groupB/groupC in both files, the exclude + option would read as follows: + --exclude-path "/groupB/groupC" + + If there are multiple paths to an object, only the + specified path(s) will be excluded; the comparison + will include any path not explicitly excluded. + This option can be used repeatedly to exclude + multiple paths. Modes of output: Default mode: print the number of differences found and where they occured diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh index df793f0..0696340 100755 --- a/tools/h5diff/testh5diff.sh +++ b/tools/h5diff/testh5diff.sh @@ -56,10 +56,10 @@ FILE19=h5diff_dset_idx1.h5 FILE20=h5diff_dset_idx2.h5 DANGLE_LINK_FILE1=h5diff_danglelinks1.h5 DANGLE_LINK_FILE2=h5diff_danglelinks2.h5 -/* group recursive */ +# group recursive GRP_RECURSE_FILE1=h5diff_grp_recurse1.h5 GRP_RECURSE_FILE2=h5diff_grp_recurse2.h5 -/* group recursive - same structure via external links through files */ +# group recursive - same structure via external links through files GRP_RECURSE1_EXT=h5diff_grp_recurse_ext1.h5 GRP_RECURSE2_EXT1=h5diff_grp_recurse_ext2-1.h5 GRP_RECURSE2_EXT2=h5diff_grp_recurse_ext2-2.h5 @@ -778,6 +778,8 @@ TOOLTEST h5diff_482.txt -v --exclude-path "/group1" --exclude-path "/dset1" $EXC # Exclude only some different objects. Expect return - diff TOOLTEST h5diff_483.txt -v --exclude-path "/group1" $EXCLUDE_FILE2_1 $EXCLUDE_FILE2_2 +# Exclude from group compare +TOOLTEST h5diff_484.txt -v --exclude-path "/dset3" h5diff_exclude1-1.h5 h5diff_exclude1-2.h5 /group1 # ############################################################################## diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index e64bc48..5458b9d 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -372,17 +372,17 @@ IF (BUILD_TESTING) ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/tbin1LE.ddl ) - IF (WIN32 AND NOT MINGW) + IF (WIN32 AND NOT CYGWIN) FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM) FILE (WRITE ${PROJECT_BINARY_DIR}/tbinregR.exp "${TEST_STREAM}") - ELSE (WIN32 AND NOT MINGW) + ELSE (WIN32 AND NOT CYGWIN) ADD_CUSTOM_COMMAND ( TARGET h5dump POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/tbinregR.exp ) - ENDIF (WIN32 AND NOT MINGW) + ENDIF (WIN32 AND NOT CYGWIN) ############################################################################## ############################################################################## @@ -473,6 +473,225 @@ IF (BUILD_TESTING) ############################################################################## ############################################################################## + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5DUMP-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + tall-1.out + tall-1.out.err + tall-2.out + tall-2.out.err + tall-2A.out + tall-2A.out.err + tall-2B.out + tall-2B.out.err + tall-3.out + tall-3.out.err + tall-4s.out + tall-4s.out.err + tall-5s.out + tall-5s.out.err + tallfilters.out + tallfilters.out.err + tarray1.out + tarray1.out.err + tarray2.out + tarray2.out.err + tarray3.out + tarray3.out.err + tarray4.out + tarray4.out.err + tarray5.out + tarray5.out.err + tarray6.out + tarray6.out.err + tarray7.out + tarray7.out.err + tarray8.out + tarray8.out.err + tattr-1.out + tattr-1.out.err + tattr-2.out + tattr-2.out.err + tattr-3.out + tattr-3.out.err + tattrreg.out + tattrreg.out.err + tattrregR.out + tattrregR.out.err + tbinregR.out + tbinregR.out.err + tbigdims.out + tbigdims.out.err + tboot1.out + tboot1.out.err + tboot2.out + tboot2.out.err + tchar1.out + tchar1.out.err + tchunked.out + tchunked.out.err + tcomp-1.out + tcomp-1.out.err + tcomp-2.out + tcomp-2.out.err + tcomp-3.out + tcomp-3.out.err + tcomp-4.out + tcomp-4.out.err + tcompact.out + tcompact.out.err + tcontents.out + tcontents.out.err + tcontiguos.out + tcontiguos.out.err + tdatareg.out + tdatareg.out.err + tdataregR.out + tdataregR.out.err + tdeflate.out + tdeflate.out.err + tdset-1.out + tdset-1.out.err + tdset-2.out + tdset-2.out.err + tdset-3s.out + tdset-3s.out.err + tempty.out + tempty.out.err + texternal.out + texternal.out.err + textlinksrc.out + textlinksrc.out.err + textlinkfar.out + textlinkfar.out.err + tfamily.out + tfamily.out.err + tfill.out + tfill.out.err + tfletcher32.out + tfletcher32.out.err + tfpformat.out + tfpformat.out.err + tgroup-1.out + tgroup-1.out.err + tgroup-2.out + tgroup-2.out.err + tgrp_comments.out + tgrp_comments.out.err + thlink-1.out + thlink-1.out.err + thlink-2.out + thlink-2.out.err + thlink-3.out + thlink-3.out.err + thlink-4.out + thlink-4.out.err + thlink-5.out + thlink-5.out.err + thyperslab.out + thyperslab.out.err + tindicesno.out + tindicesno.out.err + tindicessub1.out + tindicessub1.out.err + tindicessub2.out + tindicessub2.out.err + tindicessub3.out + tindicessub3.out.err + tindicessub4.out + tindicessub4.out.err + tindicesyes.out + tindicesyes.out.err + tlarge_objname.out + tlarge_objname.out.err + tldouble.out + tldouble.out.err + tlonglinks.out + tlonglinks.out.err + tloop-1.out + tloop-1.out.err + tmulti.out + tmulti.out.err + tnamed_dtype_attr.out + tnamed_dtype_attr.out.err + tnestcomp-1.out + tnestcomp-1.out.err + tnbit.out + tnbit.out.err + tnofilename.out + tnofilename.out.err + tnullspace.out + tnullspace.out.err + tordergr1.out + tordergr1.out.err + tordergr2.out + tordergr2.out.err + tordergr3.out + tordergr3.out.err + tordergr4.out + tordergr4.out.err + tordergr5.out + tordergr5.out.err + torderattr1.out + torderattr1.out.err + torderattr2.out + torderattr2.out.err + torderattr3.out + torderattr3.out.err + torderattr4.out + torderattr4.out.err + tperror.out + tperror.out.err + treference.out + treference.out.err + tsaf.out + tsaf.out.err + tscaleoffset.out + tscaleoffset.out.err + tshuffle.out + tshuffle.out.err + tslink-1.out + tslink-1.out.err + tslink-2.out + tslink-2.out.err + tsplit_file.out + tsplit_file.out.err + tstr-1.out + tstr-1.out.err + tstr-2.out + tstr-2.out.err + tstring.out + tstring.out.err + tstring2.out + tstring2.out.err + tstringe.out + tstringe.out.err + tszip.out + tszip.out.err + tudlink-1.out + tudlink-1.out.err + tudlink-2.out + tudlink-2.out.err + tuserfilter.out + tuserfilter.out.err + tvldtypes1.out + tvldtypes1.out.err + tvldtypes2.out + tvldtypes2.out.err + tvldtypes3.out + tvldtypes3.out.err + tvldtypes4.out + tvldtypes4.out.err + tvldtypes5.out + tvldtypes5.out.err + tvlstr.out + tvlstr.out.err + tvms.out + tvms.out.err + ) + # test for displaying groups ADD_H5_TEST (tgroup-1 0 tgroup.h5) # test for displaying the selected groups @@ -583,11 +802,7 @@ IF (BUILD_TESTING) # test failure handling # Missing file name - IF (${USE_PACKED_BITS}) - ADD_H5_TEST (tnofilename-with-packed-bits 1) - ELSE (${USE_PACKED_BITS}) - ADD_H5_TEST (tnofilename 1) - ENDIF (${USE_PACKED_BITS}) + ADD_H5_TEST (tnofilename 1) # rev. 2004 @@ -774,13 +989,156 @@ IF (BUILD_TESTING) ADD_H5_TEST (textlinksrc 0 textlinksrc.h5) ADD_H5_TEST (textlinkfar 0 textlinkfar.h5) - # test for dataset packed bits - SET (TESTTYPE "TEST") - IF (NOT ${USE_PACKED_BITS}) - SET (TESTTYPE "SKIP") - ENDIF (NOT ${USE_PACKED_BITS}) - ADD_SKIP_H5_TEST (tpackedbits 0 ${TESTTYPE} -d /dset1 -M 0,2 tdset.h5) - ADD_SKIP_H5_TEST (tpackedbits2 0 ${TESTTYPE} -d /dset1 -M 0,2,2,1 tdset.h5) + ####### test for dataset packed bits ###### + IF (HDF5_USE_H5DUMP_PACKED_BITS) + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5DUMP_PACKED_BITS-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + tpackedbits.out + tpackedbits.out.err + tpackedbits2.out + tpackedbits2.out.err + ) + ADD_H5_TEST (tpackedbits 0 -d /dset1 -M 0,2 tdset.h5) + ADD_H5_TEST (tpackedbits2 0 -d /dset1 -M 0,2,2,1 tdset.h5) + ENDIF (HDF5_USE_H5DUMP_PACKED_BITS) + + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5DUMP-XML-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + tall.h5.out + tall.h5.out.err + tall-2A.h5.out + tall-2A.h5.out.err + tarray1.h5.out + tarray1.h5.out.err + tarray2.h5.out + tarray2.h5.out.err + tarray3.h5.out + tarray3.h5.out.err + tarray6.h5.out + tarray6.h5.out.err + tarray7.h5.out + tarray7.h5.out.err + tattr.h5.out + tattr.h5.out.err + tbitfields.h5.out + tbitfields.h5.out.err + tcompound.h5.out + tcompound.h5.out.err + tcompound2.h5.out + tcompound2.h5.out.err + tcompound_complex.h5.out + tcompound_complex.h5.out.err + tdatareg.h5.out + tdatareg.h5.out.err + tdset.h5.out + tdset.h5.out.err + tdset2.h5.out + tdset2.h5.out.err + tempty-dtd-2.h5.out + tempty-dtd-2.h5.out.err + tempty-dtd-uri.h5.out + tempty-dtd-uri.h5.out.err + tempty-dtd.h5.out + tempty-dtd.h5.out.err + tempty-nons-2.h5.out + tempty-nons-2.h5.out.err + tempty-nons-uri.h5.out + tempty-nons-uri.h5.out.err + tempty-nons.h5.out + tempty-nons.h5.out.err + tempty-ns-2.h5.out + tempty-ns-2.h5.out.err + tempty-ns.h5.out + tempty-ns.h5.out.err + tempty.h5.out + tempty.h5.out.err + tenum.h5.out + tenum.h5.out.err + textlink.h5.out + textlink.h5.out.err + tfpformat.h5.out + tfpformat.h5.out.err + tgroup.h5.out + tgroup.h5.out.err + thlink.h5.out + thlink.h5.out.err + tloop.h5.out + tloop.h5.out.err + tloop2.h5.out + tloop2.h5.out.err + tmany.h5.out + tmany.h5.out.err + tname-amp.h5.out + tname-amp.h5.out.err + tname-apos.h5.out + tname-apos.h5.out.err + tname-gt.h5.out + tname-gt.h5.out.err + tname-lt.h5.out + tname-lt.h5.out.err + tname-quot.h5.out + tname-quot.h5.out.err + tname-sp.h5.out + tname-sp.h5.out.err + tnamed_dtype_attr.h5.out + tnamed_dtype_attr.h5.out.err + tnestedcomp.h5.out + tnestedcomp.h5.out.err + tnodata.h5.out + tnodata.h5.out.err + tnoname.h5.out + tnoname.h5.out.err + tobjref.h5.out + tobjref.h5.out.err + topaque.h5.out + topaque.h5.out.err + torderattr1.h5.out + torderattr1.h5.out.err + torderattr2.h5.out + torderattr2.h5.out.err + torderattr3.h5.out + torderattr3.h5.out.err + torderattr4.h5.out + torderattr4.h5.out.err + tref-escapes-at.h5.out + tref-escapes-at.h5.out.err + tref-escapes.h5.out + tref-escapes.h5.out.err + tref.h5.out + tref.h5.out.err + tsaf.h5.out + tsaf.h5.out.err + tslink.h5.out + tslink.h5.out.err + tstr.h5.out + tstr.h5.out.err + tstr2.h5.out + tstr2.h5.out.err + tstring.h5.out + tstring.h5.out.err + tstring-at.h5.out + tstring-at.h5.out.err + tudlink.h5.out + tudlink.h5.out.err + tvldtypes1.h5.out + tvldtypes1.h5.out.err + tvldtypes2.h5.out + tvldtypes2.h5.out.err + tvldtypes3.h5.out + tvldtypes3.h5.out.err + tvldtypes4.h5.out + tvldtypes4.h5.out.err + tvldtypes5.h5.out + tvldtypes5.h5.out.err + tvlstr.h5.out + tvlstr.h5.out.err + ) ########## test XML ADD_XML_H5_TEST (tall.h5 0 tall.h5) @@ -885,7 +1243,7 @@ INSTALL ( TARGETS h5dump RUNTIME DESTINATION - bin/tools + ${HDF5_INSTALL_BIN_DIR}/tools COMPONENT toolsapplications ) diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 3e76f2d..338e08c 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -346,14 +346,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la +# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below +# has been removed. According to the official description of DESTDIR by Gnu at +# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is +# prepended to the normal and complete install path that it precedes for the +# purpose of installing in a temporary directory which is useful for building +# rpms and other packages. The '/' after ${DESTDIR} will be followed by another +# '/' at the beginning of the normal install path. When DESTDIR is empty the +# path then begins with '//', which is incorrect and causes problems at least for +# Cygwin. + # Scripts used to build examples # If only shared libraries have been installed, have h5cc build examples with # shared libraries instead of static libraries -H5CC = $(bindir)/h5cc -H5CC_PP = $(bindir)/h5pcc -H5FC = $(bindir)/h5fc -H5FC_PP = $(bindir)/h5pfc -H5CPP = $(bindir)/h5c++ +H5CC = ${DESTDIR}$(bindir)/h5cc +H5CC_PP = ${DESTDIR}$(bindir)/h5pcc +H5FC = ${DESTDIR}$(bindir)/h5fc +H5FC_PP = ${DESTDIR}$(bindir)/h5pfc +H5CPP = ${DESTDIR}$(bindir)/h5c++ ACLOCAL_AMFLAGS = "-I m4" # The trace script; this is used on source files from the C library to diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index 7d937bd..e2015dc 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -44,6 +44,22 @@ IF (BUILD_TESTING) ############################################################################## ############################################################################## + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5IMPORT-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + binfp64.bin + binin8.bin + binin8w.bin + binin16.bin + binin32.bin + binuin16.bin + binuin32.bin + txtin16.txt + txtin32.txt + ) + ADD_TEST (NAME h5importtest COMMAND $<TARGET_FILE:h5importtest>) ENDIF (BUILD_TESTING) @@ -60,7 +76,7 @@ INSTALL ( TARGETS h5import RUNTIME DESTINATION - bin/tools + ${HDF5_INSTALL_BIN_DIR}/tools COMPONENT toolsapplications ) diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index fb40139..7c81903 100755 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -341,14 +341,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la +# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below +# has been removed. According to the official description of DESTDIR by Gnu at +# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is +# prepended to the normal and complete install path that it precedes for the +# purpose of installing in a temporary directory which is useful for building +# rpms and other packages. The '/' after ${DESTDIR} will be followed by another +# '/' at the beginning of the normal install path. When DESTDIR is empty the +# path then begins with '//', which is incorrect and causes problems at least for +# Cygwin. + # Scripts used to build examples # If only shared libraries have been installed, have h5cc build examples with # shared libraries instead of static libraries -H5CC = $(bindir)/h5cc -H5CC_PP = $(bindir)/h5pcc -H5FC = $(bindir)/h5fc -H5FC_PP = $(bindir)/h5pfc -H5CPP = $(bindir)/h5c++ +H5CC = ${DESTDIR}$(bindir)/h5cc +H5CC_PP = ${DESTDIR}$(bindir)/h5pcc +H5FC = ${DESTDIR}$(bindir)/h5fc +H5FC_PP = ${DESTDIR}$(bindir)/h5pfc +H5CPP = ${DESTDIR}$(bindir)/h5c++ ACLOCAL_AMFLAGS = "-I m4" # The trace script; this is used on source files from the C library to diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt index 94f2e4b..69b3e75 100644 --- a/tools/h5jam/CMakeLists.txt +++ b/tools/h5jam/CMakeLists.txt @@ -83,7 +83,7 @@ INSTALL ( TARGETS h5jam h5unjam RUNTIME DESTINATION - bin/tools + ${HDF5_INSTALL_BIN_DIR}/tools COMPONENT toolsapplications ) diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 2850a08..aac8ece 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -355,14 +355,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la +# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below +# has been removed. According to the official description of DESTDIR by Gnu at +# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is +# prepended to the normal and complete install path that it precedes for the +# purpose of installing in a temporary directory which is useful for building +# rpms and other packages. The '/' after ${DESTDIR} will be followed by another +# '/' at the beginning of the normal install path. When DESTDIR is empty the +# path then begins with '//', which is incorrect and causes problems at least for +# Cygwin. + # Scripts used to build examples # If only shared libraries have been installed, have h5cc build examples with # shared libraries instead of static libraries -H5CC = $(bindir)/h5cc -H5CC_PP = $(bindir)/h5pcc -H5FC = $(bindir)/h5fc -H5FC_PP = $(bindir)/h5pfc -H5CPP = $(bindir)/h5c++ +H5CC = ${DESTDIR}$(bindir)/h5cc +H5CC_PP = ${DESTDIR}$(bindir)/h5pcc +H5FC = ${DESTDIR}$(bindir)/h5fc +H5FC_PP = ${DESTDIR}$(bindir)/h5pfc +H5CPP = ${DESTDIR}$(bindir)/h5c++ ACLOCAL_AMFLAGS = "-I m4" # The trace script; this is used on source files from the C library to diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index ddb0bfe..c81f42b 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -151,6 +151,111 @@ IF (BUILD_TESTING) ############################################################################## ############################################################################## + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5LS-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + help-1.out + help-1.out.err + help-2.out + help-2.out.err + help-3.out + help-3.out.err + nosuchfile.out + nosuchfile.out.err + tall-1.out + tall-1.out.err + tall-2.out + tall-2.out.err + tarray1.out + tarray1.out.err + tattr2.out + tattr2.out.err + tcomp-1.out + tcomp-1.out.err + tdataregbe.out + tdataregbe.out.err + tdataregle.out + tdataregle.out.err + tdset-1.out + tdset-1.out.err + tempty.out + tempty.out.err + textlink-1.out + textlink-1.out.err + textlinksrc-1.out + textlinksrc-1.out.err + textlinksrc-2.out + textlinksrc-2.out.err + textlinksrc-3.out + textlinksrc-3.out.err + textlinksrc-4.out + textlinksrc-4.out.err + textlinksrc-5.out + textlinksrc-5.out.err + textlinksrc-6.out + textlinksrc-6.out.err + textlinksrc-7.out + textlinksrc-7.out.err + textlinksrc-1-old.out + textlinksrc-1-old.out.err + textlinksrc-2-old.out + textlinksrc-2-old.out.err + textlinksrc-3-old.out + textlinksrc-3-old.out.err + textlinksrc-6-old.out + textlinksrc-6-old.out.err + textlinksrc-7-old.out + textlinksrc-7-old.out.err + tsoftlinks-1.out + tsoftlinks-1.out.err + tsoftlinks-2.out + tsoftlinks-2.out.err + tsoftlinks-3.out + tsoftlinks-3.out.err + tsoftlinks-4.out + tsoftlinks-4.out.err + tsoftlinks-5.out + tsoftlinks-5.out.err + textlinksrc-nodangle-1.out + textlinksrc-nodangle-1.out.err + textlinksrc-nodangle-2.out + textlinksrc-nodangle-2.out.err + tsoftlinks-nodangle-1.out + tsoftlinks-nodangle-1.out.err + thlinks-nodangle-1.out + thlinks-nodangle-1.out.err + tgroup.out + tgroup.out.err + tgroup-1.out + tgroup-1.out.err + tgroup-2.out + tgroup-2.out.err + tgroup-3.out + tgroup-3.out.err + thlink-1.out + thlink-1.out.err + tloop-1.out + tloop-1.out.err + tnestcomp-1.out + tnestcomp-1.out.err + tsaf.out + tsaf.out.err + tslink-1.out + tslink-1.out.err + tstr-1.out + tstr-1.out.err + tudlink-1.out + tudlink-1.out.err + tvldtypes1.out + tvldtypes1.out.err + tvldtypes2le.out + tvldtypes2le.out.err + tvldtypes2be.out + tvldtypes2be.out.err + ) + # test the help syntax ADD_H5_TEST (help-1 0 -w80 -h) ADD_H5_TEST (help-2 0 -w80 --help) @@ -270,7 +375,7 @@ INSTALL ( TARGETS h5ls RUNTIME DESTINATION - bin/tools + ${HDF5_INSTALL_BIN_DIR}/tools COMPONENT toolsapplications ) diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 93f8e97..6c3a01a 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -335,14 +335,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la +# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below +# has been removed. According to the official description of DESTDIR by Gnu at +# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is +# prepended to the normal and complete install path that it precedes for the +# purpose of installing in a temporary directory which is useful for building +# rpms and other packages. The '/' after ${DESTDIR} will be followed by another +# '/' at the beginning of the normal install path. When DESTDIR is empty the +# path then begins with '//', which is incorrect and causes problems at least for +# Cygwin. + # Scripts used to build examples # If only shared libraries have been installed, have h5cc build examples with # shared libraries instead of static libraries -H5CC = $(bindir)/h5cc -H5CC_PP = $(bindir)/h5pcc -H5FC = $(bindir)/h5fc -H5FC_PP = $(bindir)/h5pfc -H5CPP = $(bindir)/h5c++ +H5CC = ${DESTDIR}$(bindir)/h5cc +H5CC_PP = ${DESTDIR}$(bindir)/h5pcc +H5FC = ${DESTDIR}$(bindir)/h5fc +H5FC_PP = ${DESTDIR}$(bindir)/h5pfc +H5CPP = ${DESTDIR}$(bindir)/h5c++ ACLOCAL_AMFLAGS = "-I m4" # The trace script; this is used on source files from the C library to diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index be2844d..1fbc503 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -225,6 +225,72 @@ IF (BUILD_TESTING) ############################################################################## ############################################################################## + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5REPACK-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + h5repack_attr.h5.out + h5repack_attr.h5.out.err + h5repack_deflate.h5.out + h5repack_deflate.h5.out.err + h5repack_early.h5.out + h5repack_early.h5.out.err + h5repack_ext.h5.out + h5repack_ext.h5.out.err + h5repack_fill.h5.out + h5repack_fill.h5.out.err + h5repack_filters.h5.out + h5repack_filters.h5.out.err + h5repack_fletcher.h5.out + h5repack_fletcher.h5.out.err + h5repack_hlink.h5.out + h5repack_hlink.h5.out.err + h5repack_layout.h5.out + h5repack_layout.h5.out.err + h5repack_layout.h5-v.out + h5repack_layout.h5-v.out.err + h5repack_layouto.h5.out + h5repack_layouto.h5.out.err + h5repack_layout2.h5-v.out + h5repack_layout2.h5-v.out.err + h5repack_named_dtypes.h5.out + h5repack_named_dtypes.h5.out.err + h5repack_nbit.h5.out + h5repack_nbit.h5.out.err + h5repack_objs.h5.out + h5repack_objs.h5.out.err + h5repack_refs.h5.out + h5repack_refs.h5.out.err + h5repack_shuffle.h5.out + h5repack_shuffle.h5.out.err + h5repack_soffset.h5.out + h5repack_soffset.h5.out.err + h5repack_szip.h5.out + h5repack_szip.h5.out.err + h5repack_attr_out.h5 + h5repack_deflate_out.h5 + h5repack_early_out.h5 + h5repack_ext_out.h5 + h5repack_fill_out.h5 + h5repack_filters_out.h5 + h5repack_fletcher_out.h5 + h5repack_hlink_out.h5 + h5repack_layout_out.h5 + h5repack_layouto_out.h5 + h5repack_layout2_out.h5 + h5repack_named_dtypes_out.h5 + h5repack_nbit_out.h5 + h5repack_objs_out.h5 + h5repack_refs_out.h5 + h5repack_shuffle_out.h5 + h5repack_soffset_out.h5 + h5repack_szip_out.h5 + h5repack_ub.h5 + h5repack_ub_out.h5 + h5repack_attr_refs_out.h5 + ) + # -------------------------------------------------------------------- # test file names # -------------------------------------------------------------------- @@ -672,7 +738,7 @@ INSTALL ( TARGETS h5repack RUNTIME DESTINATION - bin/tools + ${HDF5_INSTALL_BIN_DIR}/tools COMPONENT toolsapplications ) diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 23f5844..b4e6b48 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -355,14 +355,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la +# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below +# has been removed. According to the official description of DESTDIR by Gnu at +# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is +# prepended to the normal and complete install path that it precedes for the +# purpose of installing in a temporary directory which is useful for building +# rpms and other packages. The '/' after ${DESTDIR} will be followed by another +# '/' at the beginning of the normal install path. When DESTDIR is empty the +# path then begins with '//', which is incorrect and causes problems at least for +# Cygwin. + # Scripts used to build examples # If only shared libraries have been installed, have h5cc build examples with # shared libraries instead of static libraries -H5CC = $(bindir)/h5cc -H5CC_PP = $(bindir)/h5pcc -H5FC = $(bindir)/h5fc -H5FC_PP = $(bindir)/h5pfc -H5CPP = $(bindir)/h5c++ +H5CC = ${DESTDIR}$(bindir)/h5cc +H5CC_PP = ${DESTDIR}$(bindir)/h5pcc +H5FC = ${DESTDIR}$(bindir)/h5fc +H5FC_PP = ${DESTDIR}$(bindir)/h5pfc +H5CPP = ${DESTDIR}$(bindir)/h5c++ ACLOCAL_AMFLAGS = "-I m4" # The trace script; this is used on source files from the C library to diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index 1640479..3fa2041 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -109,6 +109,41 @@ IF (BUILD_TESTING) ############################################################################## ############################################################################## + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5STAT-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + h5stat_help1.out + h5stat_help1.out.err + h5stat_help2.out + h5stat_help2.out.err + h5stat_filters.out + h5stat_filters.out.err + h5stat_filters-file.out + h5stat_filters-file.out.err + h5stat_filters-F.out + h5stat_filters-F.out.err + h5stat_filters-d.out + h5stat_filters-d.out.err + h5stat_filters-g.out + h5stat_filters-g.out.err + h5stat_filters-dT.out + h5stat_filters-dT.out.err + h5stat_filters-UD.out + h5stat_filters-UD.out.err + h5stat_filters-UT.out + h5stat_filters-UT.out.err + h5stat_tsohm.out + h5stat_tsohm.out.err + h5stat_newgrat.out + h5stat_newgrat.out.err + h5stat_newgrat-UG.out + h5stat_newgrat-UG.out.err + h5stat_newgrat-UA.out + h5stat_newgrat-UA.out.err + ) + # Test for help flag ADD_H5_TEST (h5stat_help1 0 -h) ADD_H5_TEST (h5stat_help2 0 --help) @@ -145,7 +180,7 @@ INSTALL ( TARGETS h5stat RUNTIME DESTINATION - bin/tools + ${HDF5_INSTALL_BIN_DIR}/tools COMPONENT toolsapplications ) diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 2e259c4..2fe9bc7 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -364,14 +364,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la +# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below +# has been removed. According to the official description of DESTDIR by Gnu at +# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is +# prepended to the normal and complete install path that it precedes for the +# purpose of installing in a temporary directory which is useful for building +# rpms and other packages. The '/' after ${DESTDIR} will be followed by another +# '/' at the beginning of the normal install path. When DESTDIR is empty the +# path then begins with '//', which is incorrect and causes problems at least for +# Cygwin. + # Scripts used to build examples # If only shared libraries have been installed, have h5cc build examples with # shared libraries instead of static libraries -H5CC = $(bindir)/h5cc -H5CC_PP = $(bindir)/h5pcc -H5FC = $(bindir)/h5fc -H5FC_PP = $(bindir)/h5pfc -H5CPP = $(bindir)/h5c++ +H5CC = ${DESTDIR}$(bindir)/h5cc +H5CC_PP = ${DESTDIR}$(bindir)/h5pcc +H5FC = ${DESTDIR}$(bindir)/h5fc +H5FC_PP = ${DESTDIR}$(bindir)/h5pfc +H5CPP = ${DESTDIR}$(bindir)/h5c++ ACLOCAL_AMFLAGS = "-I m4" # The trace script; this is used on source files from the C library to diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index 05fd607..879e30e 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -55,7 +55,7 @@ INSTALL ( FILES ${H5_TOOLS_LIB_HDRS} DESTINATION - include/tools + ${HDF5_INSTALL_INCLUDE_DIR}/tools COMPONENT toolsheaders ) @@ -84,8 +84,8 @@ IF (HDF5_EXPORTED_TARGETS) ${HDF5_TOOLS_LIB_TARGET} EXPORT ${HDF5_EXPORTED_TARGETS} - LIBRARY DESTINATION lib/tools COMPONENT toolslibraries - ARCHIVE DESTINATION lib/tools COMPONENT toolslibraries - RUNTIME DESTINATION bin/tools COMPONENT toolslibraries + LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR}/tools COMPONENT toolslibraries + ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR}/tools COMPONENT toolslibraries + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR}/tools COMPONENT toolslibraries ) ENDIF (HDF5_EXPORTED_TARGETS) diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 020dab5..5e8ac33 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -334,14 +334,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la +# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below +# has been removed. According to the official description of DESTDIR by Gnu at +# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is +# prepended to the normal and complete install path that it precedes for the +# purpose of installing in a temporary directory which is useful for building +# rpms and other packages. The '/' after ${DESTDIR} will be followed by another +# '/' at the beginning of the normal install path. When DESTDIR is empty the +# path then begins with '//', which is incorrect and causes problems at least for +# Cygwin. + # Scripts used to build examples # If only shared libraries have been installed, have h5cc build examples with # shared libraries instead of static libraries -H5CC = $(bindir)/h5cc -H5CC_PP = $(bindir)/h5pcc -H5FC = $(bindir)/h5fc -H5FC_PP = $(bindir)/h5pfc -H5CPP = $(bindir)/h5c++ +H5CC = ${DESTDIR}$(bindir)/h5cc +H5CC_PP = ${DESTDIR}$(bindir)/h5pcc +H5FC = ${DESTDIR}$(bindir)/h5fc +H5FC_PP = ${DESTDIR}$(bindir)/h5pfc +H5CPP = ${DESTDIR}$(bindir)/h5c++ ACLOCAL_AMFLAGS = "-I m4" # The trace script; this is used on source files from the C library to diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index d462b45..640a20a 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -14,8 +14,8 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <stdlib.h> -#include "h5diff.h" #include "H5private.h" +#include "h5diff.h" #include "ph5diff.h" #include "h5tools.h" #include "h5tools_utils.h" @@ -235,7 +235,7 @@ out: * Programmer: Jonathan Kim * Date: Aug 23, 2010 *------------------------------------------------------------------------*/ -static int is_exclude_path (trav_path_t * paths, diff_opt_t *options) +static int is_exclude_path (char * path, h5trav_type_t type, diff_opt_t *options) { struct exclude_path_list * exclude_path_ptr; int ret_cmp; @@ -255,7 +255,7 @@ static int is_exclude_path (trav_path_t * paths, diff_opt_t *options) /* if given object is group, exclude its members as well */ if (exclude_path_ptr->obj_type == H5TRAV_TYPE_GROUP) { - ret_cmp = HDstrncmp(exclude_path_ptr->obj_path, paths->path, + ret_cmp = HDstrncmp(exclude_path_ptr->obj_path, path, strlen(exclude_path_ptr->obj_path)); if (ret_cmp == 0) { @@ -265,7 +265,7 @@ static int is_exclude_path (trav_path_t * paths, diff_opt_t *options) * not under “/grp1xxx/” group. */ len_grp = HDstrlen(exclude_path_ptr->obj_path); - if (paths->path[len_grp] == '/') + if (path[len_grp] == '/') { /* belong to excluded group! */ ret = 1; @@ -276,14 +276,14 @@ static int is_exclude_path (trav_path_t * paths, diff_opt_t *options) /* exclude target is not group, just exclude the object */ else { - ret_cmp = HDstrcmp(exclude_path_ptr->obj_path, paths->path); + ret_cmp = HDstrcmp(exclude_path_ptr->obj_path, path); if (ret_cmp == 0) { /* excluded non-group object */ ret = 1; /* assign type as scan progress, which is sufficient to * determine type for excluding groups from the above if. */ - exclude_path_ptr->obj_type = paths->type; + exclude_path_ptr->obj_type = type; break; /* while */ } } @@ -342,6 +342,8 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch unsigned infile[2]; char * path1_lp; char * path2_lp; + h5trav_type_t type1_l; + h5trav_type_t type2_l; int path1_offset = 0; int path2_offset = 0; int cmp; @@ -371,12 +373,14 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch path1_lp = (info1->paths[curr1].path) + path1_offset; path2_lp = (info2->paths[curr2].path) + path2_offset; + type1_l = info1->paths[curr1].type; + type2_l = info2->paths[curr2].type; /* criteria is string compare */ cmp = HDstrcmp(path1_lp, path2_lp); if(cmp == 0) { - if(!is_exclude_path(&(info1->paths[curr1]), options)) + if(!is_exclude_path(path1_lp, type1_l, options)) { infile[0] = 1; infile[1] = 1; @@ -387,7 +391,7 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch } /* end if */ else if(cmp < 0) { - if(!is_exclude_path(&(info1->paths[curr1]), options)) + if(!is_exclude_path(path1_lp, type1_l, options)) { infile[0] = 1; infile[1] = 0; @@ -397,7 +401,7 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch } /* end else-if */ else { - if (!is_exclude_path(&(info2->paths[curr2]), options)) + if (!is_exclude_path(path2_lp, type2_l, options)) { infile[0] = 0; infile[1] = 1; @@ -412,7 +416,7 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch infile[1] = 0; while(curr1 < info1->nused) { - if(!is_exclude_path(&(info1->paths[curr1]), options)) + if(!is_exclude_path(path1_lp, type1_l, options)) { path1_lp = (info1->paths[curr1].path) + path1_offset; trav_table_addflags(infile, path1_lp, info1->paths[curr1].type, table); @@ -425,7 +429,7 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch infile[1] = 1; while(curr2 < info2->nused) { - if (!is_exclude_path(&(info2->paths[curr2]), options)) + if (!is_exclude_path(path2_lp, type2_l, options)) { path2_lp = (info2->paths[curr2].path) + path2_offset; trav_table_addflags(infile, path2_lp, info2->paths[curr2].type, table); diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index 1726ae1..a1e2e49 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -102,10 +102,36 @@ IF (BUILD_TESTING) ############################################################################## ############################################################################## + # Remove any output file left over from previous test run + ADD_TEST ( + NAME h5repart_20K-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + fst_family00000.h5 + ) # repartition family member size to 20,000 bytes. ADD_TEST (NAME h5repart_20K COMMAND $<TARGET_FILE:h5repart> -m 20000 family_file%05d.h5 fst_family%05d.h5) + + # Remove any output file left over from previous test run + ADD_TEST ( + NAME h5repart_5K-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + scd_family00000.h5 + scd_family00001.h5 + scd_family00002.h5 + scd_family00003.h5 + ) # repartition family member size to 5 KB. ADD_TEST (NAME h5repart_5K COMMAND $<TARGET_FILE:h5repart> -m 5k family_file%05d.h5 scd_family%05d.h5) + + # Remove any output file left over from previous test run + ADD_TEST ( + NAME h5repart_sec2-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + family_to_sec2.h5 + ) # convert family file to sec2 file of 20,000 bytes ADD_TEST (NAME h5repart_sec2 COMMAND $<TARGET_FILE:h5repart> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5) @@ -130,7 +156,7 @@ INSTALL ( TARGETS h5debug h5repart RUNTIME DESTINATION - bin/tools + ${HDF5_INSTALL_BIN_DIR}/tools COMPONENT toolsapplications ) diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 2627ce4..b33d14d 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -389,14 +389,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la +# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below +# has been removed. According to the official description of DESTDIR by Gnu at +# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is +# prepended to the normal and complete install path that it precedes for the +# purpose of installing in a temporary directory which is useful for building +# rpms and other packages. The '/' after ${DESTDIR} will be followed by another +# '/' at the beginning of the normal install path. When DESTDIR is empty the +# path then begins with '//', which is incorrect and causes problems at least for +# Cygwin. + # Scripts used to build examples # If only shared libraries have been installed, have h5cc build examples with # shared libraries instead of static libraries -H5CC = $(bindir)/h5cc -H5CC_PP = $(bindir)/h5pcc -H5FC = $(bindir)/h5fc -H5FC_PP = $(bindir)/h5pfc -H5CPP = $(bindir)/h5c++ +H5CC = ${DESTDIR}$(bindir)/h5cc +H5CC_PP = ${DESTDIR}$(bindir)/h5pcc +H5FC = ${DESTDIR}$(bindir)/h5fc +H5FC_PP = ${DESTDIR}$(bindir)/h5pfc +H5CPP = ${DESTDIR}$(bindir)/h5c++ ACLOCAL_AMFLAGS = "-I m4" # The trace script; this is used on source files from the C library to diff --git a/tools/misc/h5cc.in b/tools/misc/h5cc.in index c274f3f..a1421a2 100755 --- a/tools/misc/h5cc.in +++ b/tools/misc/h5cc.in @@ -34,6 +34,25 @@ HL="@HL@" ############################################################################ ## ## +## Things You Can Modify to Override HDF5 Library Build Components: ## +## ## +## (Advanced usage - know what you're doing - you're on your own here.) ## +## The four variables below can be used to insert paths and flags in ## +## CPPFLAGS, CFLAGS, LDFLAGS, or LIBS in the h5cc compile line: ## +## $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS ## +## $LIBS $clibpath $link_objs $link_args $shared_link ## +## ## +## These settings can be overriden by setting HDF5_CFLAGS, ## +## HDF5_CPPFLAGS, HDF5_LDFLAGS, or HDF5_LIBS in the environment. ## +## ## +############################################################################ +CFLAGSBASE="" +CPPFLAGSBASE="" +LDFLAGSBASE="" +LIBSBASE="" + +############################################################################ +## ## ## You shouldn't have to modify anything below this line. ## ## ## ############################################################################ @@ -62,13 +81,26 @@ get_output_file="no" SHOW="eval" CCBASE="@CC@" CLINKERBASE="@CC@" -CFLAGS="@AM_CFLAGS@ @CFLAGS@" -CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@" -LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@" -LIBS="@LIBS@" + +# CFLAGS, CPPFLAGS and LDFLAGS are reserved for use by the script user. +# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS. + +# User's CPPFLAGS and CFLAGS come after their H5BLD counterparts to override +# them. User's LDFLAGS come just before clibpath, user's LIBS come after +# $link_objs and before the hdf5 libraries in $link_args, followed by any +# external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS +# or LIBS carried in from the hdf5 build. +H5BLD_CFLAGS="@AM_CFLAGS@ @CFLAGS@" +H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@" +H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@" +H5BLD_LIBS="@LIBS@" CC="${HDF5_CC:-$CCBASE}" CLINKER="${HDF5_CLINKER:-$CLINKERBASE}" +CFLAGS="${HDF5_CFLAGS:-$CFLAGSBASE}" +CPPFLAGS="${HDF5_CPPFLAGS:-$CPPFLAGSBASE}" +LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}" +LIBS="${HDF5_LIBS:-$LIBSBASE}" USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}" @@ -80,6 +112,13 @@ usage() { echo " -echo Show all the shell commands executed" echo " -prefix=DIR Prefix directory to find HDF5 lib/ and include/" echo " subdirectories [default: $prefix]" + # A wonderfully informative "usage" message. + echo "usage: $prog_name [OPTIONS] <compile line>" + echo " OPTIONS:" + echo " -help This help message." + echo " -echo Show all the shell commands executed" + echo " -prefix=DIR Prefix directory to find HDF5 lib/ and include/" + echo " subdirectories [default: $prefix]" echo " -show Show the commands without executing them" echo " -showconfig Show the HDF5 library configuration summary" echo " -shlib Compile with shared HDF5 libraries" @@ -99,6 +138,19 @@ usage() { echo " HDF5_USE_SHLIB=[yes|no] - use shared or static version of the HDF5 library" echo " [default: no]" echo " " + echo " You can also add or change paths and flags to the compile line using" + echo " the following environment varibles or by assigning them to their counterparts" + echo " in the 'Things You Can Modify to Override...'" section of $prog_name + echo " " + echo " Variable Current value to be replaced" + echo " HDF5_CPPFLAGS \"$CPPFLAGSBASE\"" + echo " HDF5_CFLAGS \"$CFLAGSBASE\"" + echo " HDF5_LDFLAGS \"$LDFLAGSBASE\"" + echo " HDF5_LIBS \"$LIBSBASE\"" + echo " " + echo " Note that adding library paths to HDF5_LDFLAGS where another hdf5 version" + echo " is located may link your program with that other hdf5 library version." + echo " " exit $EXIT_FAILURE } @@ -251,7 +303,7 @@ if test "x$do_compile" = "xyes"; then compile_args="-c $compile_args" fi - $SHOW $CC -I$includedir $CPPFLAGS $CFLAGS $compile_args + $SHOW $CC -I$includedir $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $compile_args status=$? if test "$status" != "0"; then @@ -320,9 +372,14 @@ if test "x$do_link" = "xyes"; then # The LIBS are just a bunch of -l* libraries necessary for the HDF5 # module. It's okay if they're included twice in the compile line. - link_args="$link_args $LIBS" - - $SHOW $CLINKER $CFLAGS $clibpath $link_objs $link_args $shared_link $LDFLAGS + link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS" + + # User's CPPFLAGS and CFLAGS come after their H5BLD counterparts to override + # them. User's LDFLAGS come just before clibpath, user's LIBS come after + # $link_objs and before the hdf5 libraries in $link_args, followed by any + # external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS + # or LIBS carried in from the hdf5 build. + $SHOW $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link status=$? fi |