Compare commits
241 Commits
hdf5-1_13_
...
DLS_201306
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5923ee4ca | ||
|
|
080a7ebb37 | ||
|
|
297ed85ea1 | ||
|
|
5845fed5cb | ||
|
|
d9517c14af | ||
|
|
4cccb339bc | ||
|
|
e1e913f87c | ||
|
|
eae9a5c1ce | ||
|
|
b3526d3b90 | ||
|
|
6e46183e35 | ||
|
|
d01b40e439 | ||
|
|
a33955d60f | ||
|
|
72931be7e8 | ||
|
|
908c946a23 | ||
|
|
5802eec5d4 | ||
|
|
e962355bda | ||
|
|
a35d6c95a9 | ||
|
|
c7b5d11320 | ||
|
|
30cd06b6e1 | ||
|
|
39a3d4aa3e | ||
|
|
d8b37d28a3 | ||
|
|
3413c2e10f | ||
|
|
0e1e79f0e0 | ||
|
|
14d8e1c2b5 | ||
|
|
6ee0e05fb9 | ||
|
|
94f8991154 | ||
|
|
4ce17c9aa6 | ||
|
|
5185d3a76a | ||
|
|
f56cc4156e | ||
|
|
0b7490e7e4 | ||
|
|
ea1e90f95a | ||
|
|
ebebe2dd93 | ||
|
|
cec83436f2 | ||
|
|
adc36c3b4b | ||
|
|
c481032c1b | ||
|
|
ac0f446734 | ||
|
|
a2aba62fe0 | ||
|
|
55d3172d22 | ||
|
|
751eb7610b | ||
|
|
b624395cca | ||
|
|
ddced9ab1d | ||
|
|
7a6c0fc682 | ||
|
|
5683217169 | ||
|
|
0725d04506 | ||
|
|
ad18b90759 | ||
|
|
dd2207f210 | ||
|
|
75cdc2dedf | ||
|
|
d2f3c1b991 | ||
|
|
d179489d46 | ||
|
|
f5afdf8e2a | ||
|
|
6edac6e2df | ||
|
|
6de27c1497 | ||
|
|
200ff7fa83 | ||
|
|
88ebfc6dcd | ||
|
|
2ada9c8628 | ||
|
|
3427f6b172 | ||
|
|
495b8de002 | ||
|
|
4e44c3b7e2 | ||
|
|
515d6ccc8e | ||
|
|
f517376cca | ||
|
|
cd5ad177a2 | ||
|
|
cd3f42096b | ||
|
|
434643dd4d | ||
|
|
f0e0137b61 | ||
|
|
e0319e8423 | ||
|
|
046f1d7b1f | ||
|
|
3fef275c89 | ||
|
|
2d3bf69c77 | ||
|
|
35f98ad8b6 | ||
|
|
ce04965208 | ||
|
|
c21ceb956c | ||
|
|
f5ebc95d0d | ||
|
|
9786c0e5cb | ||
|
|
1f6cb6f84a | ||
|
|
edebad0e78 | ||
|
|
d5a6223958 | ||
|
|
ebf3d99b95 | ||
|
|
d41e30a716 | ||
|
|
bd26865f7d | ||
|
|
5a722a152a | ||
|
|
0083cfc35b | ||
|
|
542acd43b8 | ||
|
|
eb89d7b53a | ||
|
|
3e468e6ff6 | ||
|
|
73c139e29b | ||
|
|
e2cd000552 | ||
|
|
099b37d073 | ||
|
|
94cf912176 | ||
|
|
d6ecc0d448 | ||
|
|
f4e7559bd2 | ||
|
|
9c0a2b2145 | ||
|
|
79757db4c2 | ||
|
|
727b687ae6 | ||
|
|
25486d5089 | ||
|
|
fc38cc4d36 | ||
|
|
8205a888cb | ||
|
|
1b8033b594 | ||
|
|
a32d6d79a3 | ||
|
|
c7dd9dfb50 | ||
|
|
315eb0a168 | ||
|
|
a9ca88d156 | ||
|
|
8e04644abd | ||
|
|
059db7a4f2 | ||
|
|
d3958ee85c | ||
|
|
cf7f386fd4 | ||
|
|
f1c8df81fa | ||
|
|
63ebb100e4 | ||
|
|
3c470c9db6 | ||
|
|
6747ebd985 | ||
|
|
9de3a84f91 | ||
|
|
ab8cc1c511 | ||
|
|
ae7d45d612 | ||
|
|
c348f9405e | ||
|
|
d68991eec0 | ||
|
|
1a119d500a | ||
|
|
642f392ba3 | ||
|
|
c034336452 | ||
|
|
6742cba572 | ||
|
|
abb9cc9cd8 | ||
|
|
8b07a4a214 | ||
|
|
9c218ea879 | ||
|
|
bcbf482347 | ||
|
|
de3a870bcd | ||
|
|
98754fa9d1 | ||
|
|
29321bcafa | ||
|
|
47073183e3 | ||
|
|
747e7945f9 | ||
|
|
9b4163af53 | ||
|
|
ca7fc8e96a | ||
|
|
b24e2d4dd8 | ||
|
|
9542a0e212 | ||
|
|
4518875853 | ||
|
|
954c91c551 | ||
|
|
8a27e4f4a6 | ||
|
|
97f8b83e2d | ||
|
|
13d61651f8 | ||
|
|
42efc1c2b5 | ||
|
|
3360c3af0c | ||
|
|
5b4d327909 | ||
|
|
9d06256018 | ||
|
|
a4750dfae7 | ||
|
|
dfd01b8331 | ||
|
|
15703817a9 | ||
|
|
d2b87ec47e | ||
|
|
ee5a1e0735 | ||
|
|
feed868771 | ||
|
|
426a3c1204 | ||
|
|
a2a61197aa | ||
|
|
f1360e4d06 | ||
|
|
dfa5cb68c0 | ||
|
|
f75166dd98 | ||
|
|
859507f757 | ||
|
|
b043ee1241 | ||
|
|
6c5e37a593 | ||
|
|
58067df6c7 | ||
|
|
328d540a34 | ||
|
|
7a1fcfa419 | ||
|
|
ff0e403315 | ||
|
|
2f0dd6b249 | ||
|
|
53f99e0966 | ||
|
|
fb984423fc | ||
|
|
dafe255d8a | ||
|
|
52df94498e | ||
|
|
eceb405b87 | ||
|
|
238950487f | ||
|
|
7c22743e8e | ||
|
|
2a07e56c05 | ||
|
|
a7372ec352 | ||
|
|
996c2f8d3b | ||
|
|
2d7fcc8553 | ||
|
|
7bc9c34c55 | ||
|
|
21f8fa203a | ||
|
|
acd5a4278a | ||
|
|
51fd7c574f | ||
|
|
239c45e0f5 | ||
|
|
0d41b14350 | ||
|
|
be4c660148 | ||
|
|
0c8e622e1a | ||
|
|
f383c2a622 | ||
|
|
e117aee161 | ||
|
|
b5c82e2e41 | ||
|
|
441b270234 | ||
|
|
41220f0911 | ||
|
|
84728ecf74 | ||
|
|
918973d9fc | ||
|
|
763e6be682 | ||
|
|
13fde5a0b1 | ||
|
|
ed7658df79 | ||
|
|
879d58b86b | ||
|
|
94594831a9 | ||
|
|
3972bca340 | ||
|
|
3ac720455a | ||
|
|
b941208aa1 | ||
|
|
bae373c322 | ||
|
|
29d45ed0d1 | ||
|
|
e5d0555815 | ||
|
|
e3d0563a73 | ||
|
|
55fbd675c6 | ||
|
|
38e7d90442 | ||
|
|
3417e79f88 | ||
|
|
ebe57002d6 | ||
|
|
0917096d34 | ||
|
|
cb0c04e1d4 | ||
|
|
08677fc32a | ||
|
|
284d51f650 | ||
|
|
db82e34584 | ||
|
|
4c3073f955 | ||
|
|
5bb857476f | ||
|
|
35bbc743d4 | ||
|
|
52fed52f9c | ||
|
|
f4a6b264fd | ||
|
|
1b0aacf4c8 | ||
|
|
0051ab6330 | ||
|
|
b19fbb9e4e | ||
|
|
a29e811343 | ||
|
|
505b31ee08 | ||
|
|
5f2e591745 | ||
|
|
53e4b5b90b | ||
|
|
65dc3358db | ||
|
|
33a65add7d | ||
|
|
e63f0baf7e | ||
|
|
90c3d4e0ca | ||
|
|
3c882637c2 | ||
|
|
4adbc1e1db | ||
|
|
72b4a68953 | ||
|
|
7e67d1f00d | ||
|
|
5436f45bd1 | ||
|
|
cde7807ceb | ||
|
|
2aa344d77a | ||
|
|
2d74d46d3f | ||
|
|
7191f26717 | ||
|
|
2cbd7f1b3c | ||
|
|
f7ae23e639 | ||
|
|
0894356a3c | ||
|
|
e0bb475838 | ||
|
|
2ac77da499 | ||
|
|
596f9b4327 | ||
|
|
de5e1d93e4 | ||
|
|
26a82c3575 | ||
|
|
8625a8bd6b | ||
|
|
0e367c3715 |
18
ACKNOWLEDGMENTS
Normal file
18
ACKNOWLEDGMENTS
Normal file
@@ -0,0 +1,18 @@
|
||||
Acknowledgments - November 2010
|
||||
-------------------------------
|
||||
|
||||
We would like to thank the following people who have contributed directly
|
||||
or indirectly to HDF5:
|
||||
|
||||
Werner Benger, for contributing code used to add support for the Windows
|
||||
Threading library included in the 1.8.6 release.
|
||||
|
||||
John A. Biddiscombe, Mike Jackson, and Sean McBride for contributing and
|
||||
testing CMake code included in the HDF5 1.8.5 distribution.
|
||||
|
||||
The HDF5 community for helping shape the development of HDF5 by contributing
|
||||
bug reports and patches, joining in on forum discussions, and continually
|
||||
supporting our software.
|
||||
|
||||
Finally, we'd like to thank all organizations whose funding has made HDF5
|
||||
possible.
|
||||
1182
CMakeLists.txt
Normal file
1182
CMakeLists.txt
Normal file
File diff suppressed because it is too large
Load Diff
26
COPYING
26
COPYING
@@ -4,18 +4,13 @@ HDF5 (Hierarchical Data Format 5) Software Library and Utilities
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
HDF5 (Hierarchical Data Format 5) Software Library and Utilities
|
||||
Copyright 2006-2008 by The HDF Group.
|
||||
Copyright 2006-2013 by The HDF Group.
|
||||
|
||||
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
|
||||
Copyright 1998-2006 by the Board of Trustees of the University of Illinois.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Contributors: National Center for Supercomputing Applications (NCSA) at
|
||||
the University of Illinois, Fortner Software, Unidata Program Center (netCDF),
|
||||
The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark Adler (gzip),
|
||||
and Digital Equipment Corporation (DEC).
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted for any purpose (including commercial purposes)
|
||||
provided that the following conditions are met:
|
||||
@@ -39,8 +34,8 @@ provided that the following conditions are met:
|
||||
|
||||
5. Neither the name of The HDF Group, the name of the University, nor the
|
||||
name of any Contributor may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission from the
|
||||
University, The HDF Group, or the Contributor, respectively.
|
||||
from this software without specific prior written permission from
|
||||
The HDF Group, the University, or the Contributor, respectively.
|
||||
|
||||
DISCLAIMER:
|
||||
THIS SOFTWARE IS PROVIDED BY THE HDF GROUP AND THE CONTRIBUTORS
|
||||
@@ -50,6 +45,21 @@ suffered by the users arising out of the use of this software, even if
|
||||
advised of the possibility of such damage.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Contributors: National Center for Supercomputing Applications (NCSA) at
|
||||
the University of Illinois, Fortner Software, Unidata Program Center (netCDF),
|
||||
The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark Adler (gzip),
|
||||
and Digital Equipment Corporation (DEC).
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Portions of HDF5 were developed with support from the Lawrence Berkeley
|
||||
National Laboratory (LBNL) and the United States Department of Energy
|
||||
under Prime Contract No. DE-AC02-05CH11231.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Portions of HDF5 were developed with support from the University of
|
||||
California, Lawrence Livermore National Laboratory (UC LLNL).
|
||||
The following statement applies to those portions of the product and must
|
||||
|
||||
32
CTestConfig.cmake
Normal file
32
CTestConfig.cmake
Normal file
@@ -0,0 +1,32 @@
|
||||
## This file should be placed in the root directory of your project.
|
||||
## Then modify the CMakeLists.txt file in the root directory of your
|
||||
## project to incorporate the testing dashboard.
|
||||
## # The following are required to uses Dart and the Cdash dashboard
|
||||
## ENABLE_TESTING()
|
||||
## INCLUDE(CTest)
|
||||
SET (CTEST_PROJECT_NAME "HDF5")
|
||||
SET (CTEST_NIGHTLY_START_TIME "18:00:00 CST")
|
||||
|
||||
SET (CTEST_DROP_METHOD "http")
|
||||
IF (CDASH_LOCAL)
|
||||
SET (CTEST_DROP_SITE "nei.hdfgroup.uiuc.edu")
|
||||
SET (CTEST_DROP_LOCATION "/cdash/submit.php?project=HDF5+Trunk")
|
||||
ELSE (CDASH_LOCAL)
|
||||
SET (CTEST_DROP_SITE "cdash.hdfgroup.uiuc.edu")
|
||||
SET (CTEST_DROP_LOCATION "/submit.php?project=HDF5+Trunk")
|
||||
ENDIF (CDASH_LOCAL)
|
||||
SET (CTEST_DROP_SITE_CDASH TRUE)
|
||||
|
||||
SET (UPDATE_TYPE svn)
|
||||
SET (VALGRIND_COMMAND "/usr/bin/valgrind")
|
||||
SET (VALGRIND_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
|
||||
SET (CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
|
||||
SET (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
|
||||
|
||||
SET (CTEST_TEST_TIMEOUT 3600 CACHE STRING
|
||||
"Maximum time allowed before CTest will kill the test.")
|
||||
SET (DART_TESTING_TIMEOUT 3600 CACHE STRING
|
||||
"Maximum time allowed before CTest will kill the test." FORCE)
|
||||
|
||||
SET(CTEST_SUBMIT_RETRY_DELAY 20 CACHE STRING
|
||||
"How long to wait between timed-out CTest submissions.")
|
||||
33
Makefile.am
Executable file → Normal file
33
Makefile.am
Executable file → Normal file
@@ -79,6 +79,9 @@ DIST_SUBDIRS = src test testpar tools . c++ fortran hl perform examples
|
||||
# Some files generated during configure that should be cleaned
|
||||
DISTCLEANFILES=config/stamp1 config/stamp2
|
||||
|
||||
# Some files/directories generated during check that should be cleaned
|
||||
CHECK_CLEANFILES+=*-tmp
|
||||
|
||||
# Define rules for lib, progs, check, and tests.
|
||||
# These simply involve recursing into subdirectories.
|
||||
test _test: check
|
||||
@@ -113,6 +116,7 @@ check-clean:
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(RM) -rf prefix-tmp destdir-tmp
|
||||
|
||||
# Some C++ compilers/linkers will create a directory named ii_files in
|
||||
# the root directory, which should be cleaned.
|
||||
@@ -121,17 +125,20 @@ mostlyclean-local:
|
||||
$(RM) -rf ii_files; \
|
||||
fi
|
||||
|
||||
# 'make install' will now install examples, the same as 'make install-all'.
|
||||
# 'make-install-all' will be redundant but will still work.
|
||||
install: install-recursive install-examples
|
||||
uninstall: uninstall-recursive uninstall-examples
|
||||
|
||||
# 'make install-all' also installs examples
|
||||
install-all:
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-examples
|
||||
uninstall-all:
|
||||
@$(MAKE) $(AM_MAKEFLAGS) uninstall
|
||||
@$(MAKE) $(AM_MAKEFLAGS) uninstall-examples
|
||||
|
||||
# Install examples in this directory and recursively
|
||||
install-examples uninstall-examples:
|
||||
@@SETX@; for d in examples $(HDF5_INTERFACES); do \
|
||||
@@SETX@; for d in examples $(HDF5_INTERFACES) $(HL); do \
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
done
|
||||
|
||||
@@ -145,11 +152,31 @@ uninstall-doc:
|
||||
# `make check-install' or `make installcheck' checks that examples can
|
||||
# be successfully built
|
||||
installcheck-local:
|
||||
if test -n "${DESTDIR}"; then \
|
||||
(cd ${DESTDIR}$(bindir) && pwd && ./h5redeploy -force); \
|
||||
fi
|
||||
@(cd examples && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1;
|
||||
|
||||
# check-install is just a synonym for installcheck
|
||||
check-install: installcheck
|
||||
|
||||
# check-all-install tests all installation methods.
|
||||
# Install via different mechanism and then compare against the default.
|
||||
# Fine if only libXXX.a files are different since they may have been ranlib'ed.
|
||||
check-all-install:
|
||||
@echo Installing to default location
|
||||
$(MAKE) install
|
||||
@echo Installing to different prefix location
|
||||
$(MAKE) prefix=${ROOT}/prefix-tmp install
|
||||
@echo Compare against the default installation.
|
||||
@echo Fine if only libXXX.a files are different.
|
||||
-diff -r prefix-tmp ${prefix}
|
||||
@echo Installing to different $$\DESTDIR location
|
||||
env DESTDIR=${ROOT}/destdir-tmp $(MAKE) install
|
||||
@echo Compare against the default installation.
|
||||
@echo Fine if only libXXX.a files are different.
|
||||
-diff -r destdir-tmp${prefix} ${prefix}
|
||||
|
||||
# Only source files in the src directory include tracing information,
|
||||
# so 'make trace' only needs to recurse into that directory.
|
||||
trace:
|
||||
|
||||
506
Makefile.in
506
Makefile.in
@@ -1,8 +1,8 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.12.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -47,9 +47,27 @@
|
||||
$(MAKE) all
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
@@ -65,13 +83,17 @@ POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/config/commence.am \
|
||||
$(top_srcdir)/configure COPYING bin/COPYING bin/compile \
|
||||
bin/config.guess bin/config.sub bin/depcomp bin/install-sh \
|
||||
bin/ltmain.sh bin/missing bin/mkinstalldirs
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/bin/config.guess \
|
||||
$(top_srcdir)/bin/config.sub $(top_srcdir)/bin/install-sh \
|
||||
$(top_srcdir)/bin/ltmain.sh $(top_srcdir)/bin/missing \
|
||||
$(top_srcdir)/bin/mkinstalldirs \
|
||||
$(top_srcdir)/config/commence.am $(top_srcdir)/configure \
|
||||
COPYING bin/COPYING bin/README bin/compile bin/config.guess \
|
||||
bin/config.sub bin/depcomp bin/install-sh bin/ltmain.sh \
|
||||
bin/missing bin/mkinstalldirs
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
@@ -79,6 +101,19 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/H5config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
@@ -88,52 +123,100 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||
cscope distdir dist dist-all distcheck
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-gzip
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
|
||||
AMTAR = @AMTAR@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used when building hdf5,
|
||||
# but which should not be exported to h5cc for building other programs.
|
||||
# AM_CFLAGS is an automake construct which should be used by Makefiles
|
||||
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
|
||||
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
|
||||
AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
|
||||
AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
|
||||
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
|
||||
AM_MAKEFLAGS = @AM_MAKEFLAGS@
|
||||
AR = @AR@
|
||||
|
||||
# Set the paths for AFS installs of autotools for Linux machines
|
||||
# Ideally, these tools should never be needed during the build.
|
||||
AUTOCONF = /home1/packages/autoconf/autoconf-2.60/bin/autoconf
|
||||
AUTOHEADER = /home1/packages/autoconf/autoconf-2.60/bin/autoheader
|
||||
AUTOMAKE = /home1/packages/automake/automake-1.9.6/bin/automake-1.9
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BYTESEX = @BYTESEX@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CC_VERSION = @CC_VERSION@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
|
||||
# but which shouldn't be exported to h5cc for building other programs.
|
||||
CFLAGS = @CFLAGS@ @H5_CFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CLEARFILEBUF = @CLEARFILEBUF@
|
||||
CODESTACK = @CODESTACK@
|
||||
CONFIG_DATE = @CONFIG_DATE@
|
||||
CONFIG_MODE = @CONFIG_MODE@
|
||||
CONFIG_USER = @CONFIG_USER@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CXX_VERSION = @CXX_VERSION@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEBUG_PKG = @DEBUG_PKG@
|
||||
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
|
||||
@@ -141,6 +224,7 @@ DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
|
||||
DIRECT_VFD = @DIRECT_VFD@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
DYNAMIC_DIRS = @DYNAMIC_DIRS@
|
||||
@@ -156,9 +240,11 @@ F9XMODEXT = @F9XMODEXT@
|
||||
F9XMODFLAG = @F9XMODFLAG@
|
||||
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
|
||||
FC = @FC@
|
||||
FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
|
||||
FC2003 = @FC2003@
|
||||
FCFLAGS = @FCFLAGS@
|
||||
FCFLAGS_f90 = @FCFLAGS_f90@
|
||||
FCLIBS = @FCLIBS@
|
||||
FC_VERSION = @FC_VERSION@
|
||||
FGREP = @FGREP@
|
||||
FILTERS = @FILTERS@
|
||||
FSEARCH_DIRS = @FSEARCH_DIRS@
|
||||
@@ -167,15 +253,21 @@ GREP = @GREP@
|
||||
H5_CFLAGS = @H5_CFLAGS@
|
||||
H5_CPPFLAGS = @H5_CPPFLAGS@
|
||||
H5_CXXFLAGS = @H5_CXXFLAGS@
|
||||
H5_CXX_SHARED = @H5_CXX_SHARED@
|
||||
H5_FCFLAGS = @H5_FCFLAGS@
|
||||
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
|
||||
H5_LDFLAGS = @H5_LDFLAGS@
|
||||
H5_LONE_COLON = @H5_LONE_COLON@
|
||||
H5_VERSION = @H5_VERSION@
|
||||
HADDR_T = @HADDR_T@
|
||||
HAVE_DMALLOC = @HAVE_DMALLOC@
|
||||
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
|
||||
HAVE_PTHREAD = @HAVE_PTHREAD@
|
||||
HDF5_HL = @HDF5_HL@
|
||||
HDF5_INTERFACES = @HDF5_INTERFACES@
|
||||
HDF_CXX = @HDF_CXX@
|
||||
HDF_FORTRAN = @HDF_FORTRAN@
|
||||
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
|
||||
HID_T = @HID_T@
|
||||
HL = @HL@
|
||||
HL_FOR = @HL_FOR@
|
||||
@@ -188,12 +280,12 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTRUMENT = @INSTRUMENT@
|
||||
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
|
||||
LARGEFILE = @LARGEFILE@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LINUX_LFS = @LINUX_LFS@
|
||||
LIPO = @LIPO@
|
||||
LL_PATH = @LL_PATH@
|
||||
LN_S = @LN_S@
|
||||
@@ -201,6 +293,7 @@ LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_STATIC_EXEC = @LT_STATIC_EXEC@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPE = @MPE@
|
||||
MPI_GET_SIZE = @MPI_GET_SIZE@
|
||||
@@ -216,11 +309,11 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PARALLEL = @PARALLEL@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PTHREAD = @PTHREAD@
|
||||
RANLIB = @RANLIB@
|
||||
ROOT = @ROOT@
|
||||
RUNPARALLEL = @RUNPARALLEL@
|
||||
@@ -251,10 +344,12 @@ USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
|
||||
USE_FILTER_SZIP = @USE_FILTER_SZIP@
|
||||
USINGMEMCHECKER = @USINGMEMCHECKER@
|
||||
VERSION = @VERSION@
|
||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
@@ -273,6 +368,8 @@ build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
docdir = $(exec_prefix)/doc
|
||||
dvidir = @dvidir@
|
||||
enable_shared = @enable_shared@
|
||||
@@ -284,16 +381,13 @@ host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
includedir = $(exec_prefix)/include
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
@@ -306,6 +400,7 @@ sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@@ -315,12 +410,12 @@ CP = cp
|
||||
|
||||
# Some machines need a command to run executables; this is that command
|
||||
# so that our tests will run.
|
||||
# We use RUNTESTS instead of RUNSERIAL directly because it may be that
|
||||
# We use RUNEXEC instead of RUNSERIAL directly because it may be that
|
||||
# some tests need to be run with a different command. Older versions
|
||||
# of the makefiles used the command
|
||||
# $(LIBTOOL) --mode=execute
|
||||
# in some directories, for instance.
|
||||
RUNTESTS = $(RUNSERIAL)
|
||||
RUNEXEC = $(RUNSERIAL)
|
||||
|
||||
# Libraries to link to while building
|
||||
LIBHDF5 = $(top_builddir)/src/libhdf5.la
|
||||
@@ -333,14 +428,25 @@ 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
|
||||
# insert tracing macros.
|
||||
@@ -349,7 +455,9 @@ TRACE = perl $(top_srcdir)/bin/trace
|
||||
# .chkexe files are used to mark tests that have run successfully.
|
||||
# .chklog files are output from those tests.
|
||||
# *.clog are from the MPE option.
|
||||
CHECK_CLEANFILES = *.chkexe *.chklog *.clog
|
||||
|
||||
# Some files/directories generated during check that should be cleaned
|
||||
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *-tmp
|
||||
@BUILD_PARALLEL_CONDITIONAL_FALSE@TESTPARALLEL_DIR =
|
||||
|
||||
# Define subdirectories to build.
|
||||
@@ -379,21 +487,21 @@ DISTCLEANFILES = config/stamp1 config/stamp2
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
@@ -404,11 +512,13 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
$(top_srcdir)/config/commence.am:
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@@ -417,16 +527,16 @@ clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
-rm -f libtool config.lt
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
@@ -435,7 +545,11 @@ $(RECURSIVE_TARGETS):
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
@@ -443,50 +557,23 @@ $(RECURSIVE_TARGETS):
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
cscopelist-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
@@ -494,14 +581,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
@@ -513,7 +600,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
@@ -522,36 +609,65 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
cscope: cscope.files
|
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
|
||||
clean-cscope:
|
||||
-rm -f cscope.files
|
||||
|
||||
cscope.files: clean-cscope cscopelist-recursive cscopelist
|
||||
|
||||
cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d $(distdir) || mkdir $(distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
@@ -567,66 +683,84 @@ distdir: $(DISTFILES)
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -755 \
|
||||
-exec chmod u+rwx,go+rx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
dist dist-all:
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
@@ -634,26 +768,31 @@ dist dist-all: distdir
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
@@ -674,14 +813,24 @@ distcheck: dist
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__post_remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
@test -n '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: trying to run $@ with an empty' \
|
||||
'$$(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
@@ -702,26 +851,30 @@ check: check-recursive
|
||||
all-am: Makefile all-local
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@@ -743,6 +896,8 @@ dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
@@ -751,18 +906,28 @@ install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-exec-local
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am: installcheck-local
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
@@ -786,13 +951,15 @@ ps-am:
|
||||
|
||||
uninstall-am: uninstall-local
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
|
||||
install-strip
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
|
||||
cscopelist-recursive ctags-recursive install-am install-strip \
|
||||
tags-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am all-local am--refresh check check-am clean \
|
||||
clean-generic clean-libtool ctags ctags-recursive dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \
|
||||
clean-cscope clean-generic clean-libtool cscope cscopelist \
|
||||
cscopelist-recursive ctags ctags-recursive dist dist-all \
|
||||
dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz \
|
||||
dist-zip distcheck distclean distclean-generic \
|
||||
distclean-libtool distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
@@ -852,6 +1019,7 @@ check-clean:
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(RM) -rf prefix-tmp destdir-tmp
|
||||
|
||||
# Some C++ compilers/linkers will create a directory named ii_files in
|
||||
# the root directory, which should be cleaned.
|
||||
@@ -860,17 +1028,20 @@ mostlyclean-local:
|
||||
$(RM) -rf ii_files; \
|
||||
fi
|
||||
|
||||
# 'make install' will now install examples, the same as 'make install-all'.
|
||||
# 'make-install-all' will be redundant but will still work.
|
||||
install: install-recursive install-examples
|
||||
uninstall: uninstall-recursive uninstall-examples
|
||||
|
||||
# 'make install-all' also installs examples
|
||||
install-all:
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-examples
|
||||
uninstall-all:
|
||||
@$(MAKE) $(AM_MAKEFLAGS) uninstall
|
||||
@$(MAKE) $(AM_MAKEFLAGS) uninstall-examples
|
||||
|
||||
# Install examples in this directory and recursively
|
||||
install-examples uninstall-examples:
|
||||
@@SETX@; for d in examples $(HDF5_INTERFACES); do \
|
||||
@@SETX@; for d in examples $(HDF5_INTERFACES) $(HL); do \
|
||||
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
||||
done
|
||||
|
||||
@@ -884,11 +1055,31 @@ uninstall-doc:
|
||||
# `make check-install' or `make installcheck' checks that examples can
|
||||
# be successfully built
|
||||
installcheck-local:
|
||||
if test -n "${DESTDIR}"; then \
|
||||
(cd ${DESTDIR}$(bindir) && pwd && ./h5redeploy -force); \
|
||||
fi
|
||||
@(cd examples && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1;
|
||||
|
||||
# check-install is just a synonym for installcheck
|
||||
check-install: installcheck
|
||||
|
||||
# check-all-install tests all installation methods.
|
||||
# Install via different mechanism and then compare against the default.
|
||||
# Fine if only libXXX.a files are different since they may have been ranlib'ed.
|
||||
check-all-install:
|
||||
@echo Installing to default location
|
||||
$(MAKE) install
|
||||
@echo Installing to different prefix location
|
||||
$(MAKE) prefix=${ROOT}/prefix-tmp install
|
||||
@echo Compare against the default installation.
|
||||
@echo Fine if only libXXX.a files are different.
|
||||
-diff -r prefix-tmp ${prefix}
|
||||
@echo Installing to different $$\DESTDIR location
|
||||
env DESTDIR=${ROOT}/destdir-tmp $(MAKE) install
|
||||
@echo Compare against the default installation.
|
||||
@echo Fine if only libXXX.a files are different.
|
||||
-diff -r destdir-tmp${prefix} ${prefix}
|
||||
|
||||
# Only source files in the src directory include tracing information,
|
||||
# so 'make trace' only needs to recurse into that directory.
|
||||
trace:
|
||||
@@ -914,6 +1105,7 @@ $(top_builddir)/config.status:
|
||||
|
||||
# Don't include conclude.am in root Makefile; tests target needs to
|
||||
# recurse into perform directory as well as reguar subdirs.
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
39
README.txt
39
README.txt
@@ -1,32 +1,33 @@
|
||||
HDF5 version 1.9.26 currently under development
|
||||
HDF5 version 1.9.149-FA_a5 currently under development
|
||||
Please refer to the release_docs/INSTALL file for installation instructions.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
This release is almost fully functional for the entire API defined in the
|
||||
documentation, see the RELEASE.txt file in the release_docs directory for information
|
||||
specific to this release of the library. The INSTALL file contains
|
||||
instructions on compiling and installing the library. The INSTALL_parallel
|
||||
file contains instructions on installing the parallel version of the
|
||||
library. The INSTALL* files can be found in the release_docs/ directory.
|
||||
This release is fully functional for the API described in the documentation.
|
||||
See the RELEASE.txt file in the release_docs/ directory for information
|
||||
specific to this release of the library. Several INSTALL* files can also be
|
||||
found in the release_docs/ directory: INSTALL contains instructions for
|
||||
compiling and installing the library; INSTALL_parallel contains instructions
|
||||
for installing the parallel version of the library; similarly-named files
|
||||
contain instructions for VMS and several environments on MS Windows systems.
|
||||
|
||||
Documentation for this snapshot can be found at the following URL:
|
||||
http://www.hdfgroup.uiuc.edu/HDF5/doc_dev_snapshot/H5_dev/
|
||||
Documentation for this release can be found at the following URL:
|
||||
http://www.hdfgroup.org/HDF5/doc/.
|
||||
|
||||
Four mailing lists are currently set up for use with the HDF5
|
||||
library.
|
||||
The following mailing lists are currently set up for HDF5 Library users:
|
||||
|
||||
news - For announcements of HDF5 related developments,
|
||||
not a discussion list.
|
||||
news - For announcements of HDF5 related developments,
|
||||
not a discussion list.
|
||||
|
||||
hdf-forum - For general discussion of the HDF5 library with
|
||||
other users.
|
||||
hdf-forum - For general discussion of the HDF5 library with
|
||||
other users.
|
||||
|
||||
hdf5dev - For discussion of the HDF5 library development
|
||||
with developers and other interested parties.
|
||||
hdf5dev - For discussion of the HDF5 library development
|
||||
with developers and other interested parties.
|
||||
|
||||
To subscribe to a list, send mail to "<list>-subscribe@hdfgroup.org".
|
||||
where <list> is the name of the list.
|
||||
E.g., mail hdf5-subscribe@hdfgroup.org
|
||||
where <list> is the name of the list. For example, send a request
|
||||
to subscribe to the 'news' mail list to the following address:
|
||||
news-subscribe@hdfgroup.org
|
||||
|
||||
Messages to be sent to the list should be sent to "<list>@hdfgroup.org".
|
||||
|
||||
|
||||
2960
aclocal.m4
vendored
2960
aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
35
acsite.m4
35
acsite.m4
@@ -18,6 +18,41 @@ dnl
|
||||
dnl -------------------------------------------------------------------------
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl -------------------------------------------------------------------------
|
||||
dnl _AC_SYS_LARGEFILE_MACRO_VALUE
|
||||
dnl
|
||||
dnl The following macro overrides the autoconf macro of the same name
|
||||
dnl with this custom definition. This macro performs the same checks as
|
||||
dnl autoconf's native _AC_SYS_LARGEFILE_MACRO_VALUE, but will also set
|
||||
dnl AM_CPPFLAGS with the appropriate -D defines so additional configure
|
||||
dnl sizeof checks do not fail.
|
||||
dnl
|
||||
# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
|
||||
# CACHE-VAR,
|
||||
# DESCRIPTION,
|
||||
# PROLOGUE, [FUNCTION-BODY])
|
||||
# ----------------------------------------------------------
|
||||
m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
|
||||
[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
|
||||
[while :; do
|
||||
m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
|
||||
[AC_LANG_PROGRAM([$5], [$6])],
|
||||
[$3=no; break])
|
||||
m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
|
||||
[AC_LANG_PROGRAM([@%:@define $1 $2
|
||||
$5], [$6])],
|
||||
[$3=$2; break])
|
||||
$3=unknown
|
||||
break
|
||||
done])
|
||||
case $$3 in #(
|
||||
no | unknown) ;;
|
||||
*) AC_DEFINE_UNQUOTED([$1], [$$3], [$4])
|
||||
AM_CPPFLAGS="-D$1=$$3 $AM_CPPFLAGS";;
|
||||
esac
|
||||
rm -rf conftest*[]dnl
|
||||
])# _AC_SYS_LARGEFILE_MACRO_VALUE
|
||||
|
||||
dnl -------------------------------------------------------------------------
|
||||
dnl AC_F9X_MODS()
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
Copyright by The HDF Group (THG) and
|
||||
Copyright by The HDF Group and
|
||||
The Board of Trustees of the University of Illinois.
|
||||
All rights reserved.
|
||||
|
||||
|
||||
2
bin/README
Normal file
2
bin/README
Normal file
@@ -0,0 +1,2 @@
|
||||
The daily tests run copies of some of the scripts in this directory from another repository, notably snapshot and runtest. The copies in this directory should work, but are not used in daily tests, though they should be tested occasionally.
|
||||
|
||||
@@ -67,6 +67,7 @@ TIMESTAMP()
|
||||
|
||||
QUIT()
|
||||
{
|
||||
# print the closing time
|
||||
TIMESTAMP
|
||||
}
|
||||
|
||||
@@ -234,7 +235,7 @@ trap QUIT 0
|
||||
#
|
||||
MAKE=${MAKE:-'gmake'}
|
||||
export MAKE
|
||||
CONFIGURE="CONFIG"
|
||||
CONFIG_CMD="CONFIG"
|
||||
CONFIG_OP= # configure options
|
||||
CONFIG_ONLY=no # default is configure and build
|
||||
NOEXEC= # default to execute commands
|
||||
@@ -250,6 +251,7 @@ while [ $# -gt 0 ]; do
|
||||
;;
|
||||
-szlib)
|
||||
LOCATE_SZLIB
|
||||
CONFIG_OP="$CONFIG_OP $WITH_SZLIB"
|
||||
;;
|
||||
-help)
|
||||
USAGE
|
||||
@@ -263,16 +265,16 @@ while [ $# -gt 0 ]; do
|
||||
SRCDIRLIST="$1"
|
||||
;;
|
||||
-cxx)
|
||||
CONFIG_CXX="--enable-cxx"
|
||||
CONFIG_OP="$CONFIG_OP --enable-cxx"
|
||||
;;
|
||||
-fortran)
|
||||
CONFIG_FORTRAN="--enable-fortran"
|
||||
CONFIG_OP="$CONFIG_OP --enable-fortran"
|
||||
;;
|
||||
-pp)
|
||||
CONFIG_PARALLEL="--enable-parallel"
|
||||
CONFIG_OP="$CONFIG_OP --enable-parallel"
|
||||
;;
|
||||
*) # Quit parsing
|
||||
break
|
||||
*) # pass it as a configure option
|
||||
CONFIG_OP="$CONFIG_OP $1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
@@ -296,16 +298,12 @@ if [ x-$SRCDIR = x-dummy ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Setup Configure options
|
||||
CONFIG_OP="$WITH_SZLIB $CONFIG_FORTRAN $CONFIG_CXX $CONFIG_PARALLEL"
|
||||
|
||||
# Configure
|
||||
# no configure if already done.
|
||||
if [ ! -f config.status ]; then
|
||||
CONFIGURE="$CONFIGURE $CONFIG_OP $*"
|
||||
STEP "Configure HDF5..." "$CONFIGURE" "#config"
|
||||
STEP "Configure HDF5..." "$CONFIG_CMD $CONFIG_OP" "#config"
|
||||
else
|
||||
STEP "Confiugre Skipped" "echo Confiugre Skipped" "#config"
|
||||
STEP "Configure Skipped" "echo Configure Skipped" "#config"
|
||||
fi
|
||||
|
||||
if [ x-$CONFIG_ONLY = x-yes ]; then
|
||||
@@ -324,4 +322,3 @@ STEP "Testing HDF5 parallel parts..." "$MAKE check-p" "#test-p"
|
||||
|
||||
# all done
|
||||
echo "No Errors encountered"
|
||||
TIMESTAMP
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/perl -w
|
||||
#!/usr/bin/perl -w
|
||||
require 5.003;
|
||||
|
||||
#
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
# Created Date: 2004/12/07
|
||||
|
||||
#
|
||||
# Configure: should be generated by autoconf version 2.59.
|
||||
# autoconf: should be of version 2.59.
|
||||
# Configure: should be generated by autoconf version 2.69.
|
||||
# autoconf: should be of version 2.69.
|
||||
|
||||
# variable initialization
|
||||
nerrors=0
|
||||
AUTOCONFVERSION=2.61
|
||||
AUTOCONFVERSION=2.69
|
||||
AUTOCONFVERSIONLEAD='Generated by GNU Autoconf'
|
||||
CONFIGUREFILES="configure"
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ SH_COPYRIGHT=/tmp/h5chkright_SH.$$ # SHELL style copyright
|
||||
SH_COPYRIGHT2=/tmp/h5chkright_SH2.$$ # SHELL style copyright, 2nd style.
|
||||
WINBAT_COPYRIGHT=/tmp/h5chkright_WINBAT.$$ # Windows Batch file Copyright notice
|
||||
VMSCMD_COPYRIGHT=/tmp/h5chkright_VMSCMD.$$ # VMS command file Copyright notice
|
||||
CONFIGURE_IN_COPYRIGHT=/tmp/h5chkright_CONFIGURE_IN.$$ # configure.in file Copyright notice
|
||||
CONFIGURE_AC_COPYRIGHT=/tmp/h5chkright_CONFIGURE_AC.$$ # configure.ac file Copyright notice
|
||||
|
||||
tmpfixfile=/tmp/h5chkright_fix.$$ # Temporary fixed copy of file
|
||||
|
||||
@@ -207,8 +207,8 @@ EOF
|
||||
@REM access to either file, you may request a copy from help@hdfgroup.org.
|
||||
EOF
|
||||
|
||||
# configure.in file Copyright notice
|
||||
cat > ${CONFIGURE_IN_COPYRIGHT} << \EOF
|
||||
# configure.ac file Copyright notice
|
||||
cat > ${CONFIGURE_AC_COPYRIGHT} << \EOF
|
||||
dnl Copyright by The HDF Group.
|
||||
dnl Copyright by the Board of Trustees of the University of Illinois.
|
||||
dnl All rights reserved.
|
||||
@@ -635,10 +635,10 @@ VMSCMD_FILE()
|
||||
|
||||
# Check Configure.in type files
|
||||
#
|
||||
CONFIGURE_IN_FILE()
|
||||
CONFIGURE_AC_FILE()
|
||||
{
|
||||
f=$1
|
||||
case `MATCH_COPYRIGHT $CONFIGURE_IN_COPYRIGHT $f` in
|
||||
case `MATCH_COPYRIGHT $CONFIGURE_AC_COPYRIGHT $f` in
|
||||
PASSED)
|
||||
PASSED $f
|
||||
return
|
||||
@@ -646,9 +646,9 @@ CONFIGURE_IN_FILE()
|
||||
FAILED)
|
||||
# show the difference
|
||||
FAILED $f
|
||||
$DIFF ${EXTRACTEDFILE} ${CONFIGURE_IN_COPYRIGHT}
|
||||
$DIFF ${EXTRACTEDFILE} ${CONFIGURE_AC_COPYRIGHT}
|
||||
if [ -n "$FIXIT" ]; then
|
||||
FIX_COPYRIGHT $CONFIGURE_IN_COPYRIGHT $f
|
||||
FIX_COPYRIGHT $CONFIGURE_AC_COPYRIGHT $f
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -681,8 +681,8 @@ GUESS_File_Type()
|
||||
# Put this after C_SOURCE which may have #define and such lines.
|
||||
echo SHELL_FILE
|
||||
elif grep '^dnl' < $tmpfile > /dev/null; then
|
||||
# Some lines start with a "dnl". It may be a configure.in type file.
|
||||
echo CONFIGURE_IN_FILE
|
||||
# Some lines start with a "dnl". It may be a configure.ac type file.
|
||||
echo CONFIGURE_AC_FILE
|
||||
elif grep -i '^<html>' < $tmpfile > /dev/null || \
|
||||
grep '^<!--' < $tmpfile > /dev/null ; then
|
||||
# Some lines start with a "<html>" or having an html comment tag.
|
||||
@@ -827,8 +827,8 @@ while read file; do
|
||||
*Makefile | *Makefile.in | *Makefile.am | Makefile.dist )
|
||||
MAKE_FILE ${file}
|
||||
;;
|
||||
configure.in )
|
||||
CONFIGURE_IN_FILE ${file}
|
||||
configure.ac )
|
||||
CONFIGURE_AC_FILE ${file}
|
||||
;;
|
||||
*.bat | *.BAT )
|
||||
# Windows Batch files
|
||||
|
||||
@@ -107,6 +107,21 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for duplicate entries. This can be done at any time, but it may as
|
||||
# well be sooner so that if something else fails the presence of duplicates
|
||||
# will already be known.
|
||||
errcode=0
|
||||
DUPLICATES=`perl -ne 's/#.*//; next if /^\s*$/; if ($uniq{$_}++) { print $_; }' MANIFEST`
|
||||
if [ "$DUPLICATES" ]; then
|
||||
cat 1>&2 <<EOF
|
||||
These entries appear more than once in the MANIFEST:
|
||||
$DUPLICATES
|
||||
Please remove the duplicate lines and try again.
|
||||
|
||||
EOF
|
||||
errcode=1
|
||||
fi
|
||||
|
||||
# Copy the manifest file to get a list of file names.
|
||||
grep '^\.' MANIFEST | expand | cut -f1 -d' ' >$MANIFEST
|
||||
|
||||
@@ -117,6 +132,7 @@ for file in `cat $MANIFEST`; do
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
# Inspect the .svn/entries to figure out what version of svn file entry is
|
||||
# used.
|
||||
# The following algorithm is formed via reverse engineering.
|
||||
@@ -130,7 +146,7 @@ if head -1 $svn_entry_file | grep 'xml version="1.0"' > /dev/null 2>&1;then
|
||||
elif grep '^file$' $svn_entry_file > /dev/null 2>&1; then
|
||||
getsvnentries=GETSVNENTRIES_14
|
||||
else
|
||||
echo "Unknow svn entries format. Aborted"
|
||||
echo "Unknown svn entries format. Aborted"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -155,5 +171,9 @@ EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $errcode -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test "$verbose" && echo " The MANIFEST is up to date." 1>&2
|
||||
exit 0
|
||||
|
||||
236
bin/cmakehdf5
Executable file
236
bin/cmakehdf5
Executable file
@@ -0,0 +1,236 @@
|
||||
#! /bin/sh
|
||||
# Build and Test HDF5 using cmake.
|
||||
# Author: Allen Byrne
|
||||
# Albert Cheng
|
||||
# Creation Date: Nov 2012
|
||||
|
||||
# Copyright: The HDF Group, 2012
|
||||
|
||||
# Debug: remove the comment hash if you want DPRINT to do echo
|
||||
DPRINT=:
|
||||
#DPRINT=echo
|
||||
|
||||
# variable names
|
||||
progname=`basename $0` # program name
|
||||
cminfile="cmakemin.$$" # Cmake minimum file
|
||||
cfgfile=$progname.$$ # configure file
|
||||
$DPRINT $cfgfile
|
||||
|
||||
# Remove temporary generated files if exit 0
|
||||
trap "rm -f $cminfile $cfgfile" 0
|
||||
|
||||
#=============
|
||||
# Function definitions
|
||||
#=============
|
||||
TIMESTAMP()
|
||||
{
|
||||
echo "=====" "`date`" "====="
|
||||
}
|
||||
|
||||
|
||||
#==========
|
||||
# main
|
||||
#==========
|
||||
# Show a start time stamp
|
||||
TIMESTAMP
|
||||
|
||||
# Explain what and where log files are.
|
||||
cat <<EOF
|
||||
ctest.log: output of ctest script.
|
||||
Log files will be stored in Testing/Temporary:
|
||||
LastConfigure_<timestamp>.log: output of configure
|
||||
LastBuild_<timestamp>.log: output of build
|
||||
LastTest_<timestamp>.log: output of testing
|
||||
LastTestsFailed_<timestamp>.log: list of failed tests
|
||||
|
||||
EOF
|
||||
|
||||
# First generate the two needed input files, the $cimnfile and $cfgfile.
|
||||
# Then use ctest to use the two input files.
|
||||
|
||||
#==========
|
||||
# create the configure file
|
||||
#==========
|
||||
# Create the cmake minimum required file to be used by the following
|
||||
# configure file. Though not absolute needed, it is better to generate
|
||||
# this file before the configure file. Quote the EOF to preven substitution
|
||||
# in the text.
|
||||
#==========
|
||||
#==========
|
||||
cat > $cfgfile <<'EOF'
|
||||
cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
|
||||
########################################################
|
||||
# This dashboard is maintained by The HDF Group
|
||||
# For any comments please contact cdashhelp@hdfgroup.org
|
||||
#
|
||||
########################################################
|
||||
|
||||
set (CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
|
||||
set (CTEST_SOURCE_DIRECTORY "../hdf5")
|
||||
set (CTEST_BINARY_DIRECTORY ".")
|
||||
set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
|
||||
set (CTEST_BUILD_CONFIGURATION "Release")
|
||||
set (CTEST_MAX_N 8)
|
||||
|
||||
# -- CDash variables
|
||||
set (LOCAL_NO_SUBMIT TRUE) # No CDash submit.
|
||||
set (MODEL "Experimental")
|
||||
set (CDASH_LOCAL TRUE)
|
||||
set (SITE_BUILDNAME_SUFFIX "SHARED")
|
||||
|
||||
# -- URL set for internal check, default is to not update
|
||||
set (LOCAL_SKIP_UPDATE TRUE)
|
||||
set (REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/branches/hdf5_1_8")
|
||||
# -- Standard build options
|
||||
set (ADD_BUILD_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=/usr/local/hdf5.1.8 -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=\"SVN\" -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
|
||||
|
||||
# Use multiple CPU cores to build
|
||||
include(ProcessorCount)
|
||||
ProcessorCount(N)
|
||||
if(NOT N EQUAL 0)
|
||||
if(N GREATER ${CTEST_MAX_N})
|
||||
set(N ${CTEST_MAX_N})
|
||||
endif(N GREATER ${CTEST_MAX_N})
|
||||
set(CTEST_BUILD_FLAGS -j${N})
|
||||
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
|
||||
endif()
|
||||
|
||||
# -----------------------------------------------------------
|
||||
# -- Get environment
|
||||
# -----------------------------------------------------------
|
||||
## -- set hostname
|
||||
## --------------------------
|
||||
find_program (HOSTNAME_CMD NAMES hostname)
|
||||
exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
|
||||
set (CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
|
||||
find_program (UNAME NAMES uname)
|
||||
macro (getuname name flag)
|
||||
exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
|
||||
endmacro (getuname)
|
||||
|
||||
getuname (osname -s)
|
||||
getuname (osrel -r)
|
||||
getuname (cpu -m)
|
||||
|
||||
if (SITE_BUILDNAME_SUFFIX)
|
||||
set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}-${SITE_BUILDNAME_SUFFIX}")
|
||||
else (SITE_BUILDNAME_SUFFIX)
|
||||
set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
|
||||
endif (SITE_BUILDNAME_SUFFIX)
|
||||
# -----------------------------------------------------------
|
||||
|
||||
set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# MAC machines need special option
|
||||
#-----------------------------------------------------------------------------
|
||||
if (APPLE)
|
||||
# Compiler choice
|
||||
execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
SET(ENV{CC} "${XCODE_CC}")
|
||||
SET(ENV{CXX} "${XCODE_CXX}")
|
||||
# Shared fortran is not supported, build static
|
||||
set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
|
||||
set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
|
||||
endif (APPLE)
|
||||
|
||||
|
||||
# -----------------------------------------------------------
|
||||
find_package (Subversion)
|
||||
set (CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
|
||||
# -- Only clean build folder if LOCAL_CLEAR_BUILD is set
|
||||
if (LOCAL_CLEAR_BUILD)
|
||||
set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
|
||||
ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
|
||||
endif (LOCAL_CLEAR_BUILD)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Send the main script as a note.
|
||||
list (APPEND CTEST_NOTES_FILES
|
||||
"${CMAKE_CURRENT_LIST_FILE}"
|
||||
"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
|
||||
)
|
||||
|
||||
# Check for required variables.
|
||||
foreach (req
|
||||
CTEST_CMAKE_GENERATOR
|
||||
CTEST_SITE
|
||||
CTEST_BUILD_NAME
|
||||
)
|
||||
if (NOT DEFINED ${req})
|
||||
message(FATAL_ERROR "The containing script must set ${req}")
|
||||
endif (NOT DEFINED ${req})
|
||||
endforeach (req)
|
||||
|
||||
## -- set output to english
|
||||
set($ENV{LC_MESSAGES} "en_EN")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Initialize the CTEST commands
|
||||
#------------------------------
|
||||
SET (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
|
||||
SET (CTEST_CONFIGURE_COMMAND
|
||||
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"")
|
||||
|
||||
# Print summary information.
|
||||
foreach (v
|
||||
CTEST_SITE
|
||||
CTEST_BUILD_NAME
|
||||
CTEST_SOURCE_DIRECTORY
|
||||
CTEST_BINARY_DIRECTORY
|
||||
CTEST_CMAKE_GENERATOR
|
||||
CTEST_BUILD_CONFIGURATION
|
||||
CTEST_CONFIGURE_COMMAND
|
||||
CTEST_SCRIPT_DIRECTORY
|
||||
)
|
||||
set (vars "${vars} ${v}=[${${v}}]\n")
|
||||
endforeach (v)
|
||||
message ("Dashboard script configuration:\n${vars}\n")
|
||||
|
||||
CTEST_START (${MODEL} TRACK ${MODEL})
|
||||
if (NOT LOCAL_SKIP_UPDATE)
|
||||
CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
|
||||
endif (NOT LOCAL_SKIP_UPDATE)
|
||||
CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
||||
if(NOT res STREQUAL "0")
|
||||
message (FATAL_ERROR "Configure FAILED")
|
||||
endif()
|
||||
message ("Configure DONE")
|
||||
CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
|
||||
if (NOT LOCAL_NO_SUBMIT)
|
||||
CTEST_SUBMIT (PARTS Update Configure Notes)
|
||||
endif (NOT LOCAL_NO_SUBMIT)
|
||||
CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res)
|
||||
if (NOT LOCAL_NO_SUBMIT)
|
||||
CTEST_SUBMIT (PARTS Build)
|
||||
endif (NOT LOCAL_NO_SUBMIT)
|
||||
if(NOT res STREQUAL "0")
|
||||
message (FATAL_ERROR "Build FAILED")
|
||||
endif()
|
||||
message ("build DONE")
|
||||
if (NOT LOCAL_SKIP_TEST)
|
||||
CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
|
||||
if (NOT LOCAL_NO_SUBMIT)
|
||||
CTEST_SUBMIT (PARTS Test)
|
||||
endif (NOT LOCAL_NO_SUBMIT)
|
||||
if(NOT res STREQUAL "0")
|
||||
message (FATAL_ERROR "Test FAILED")
|
||||
endif()
|
||||
message ("test DONE")
|
||||
endif (NOT LOCAL_SKIP_TEST)
|
||||
|
||||
message ("DONE")
|
||||
EOF
|
||||
|
||||
|
||||
# Run ctest
|
||||
ctest -S $cfgfile -C Release -O ctest.log
|
||||
exit_code=$?
|
||||
if [ $exit_code = 0 ]; then
|
||||
echo Complete without error
|
||||
else
|
||||
echo Error encountered
|
||||
fi
|
||||
TIMESTAMP
|
||||
exit $exit_code
|
||||
93
bin/config.guess
vendored
93
bin/config.guess
vendored
@@ -1,9 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2005-12-13'
|
||||
timestamp='2008-01-23'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -55,8 +56,8 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -106,7 +107,7 @@ set_cc_for_build='
|
||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
: ${TMPDIR=/tmp} ;
|
||||
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||
@@ -160,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
arm*) machine=arm-unknown ;;
|
||||
sh3el) machine=shl-unknown ;;
|
||||
sh3eb) machine=sh-unknown ;;
|
||||
sh5el) machine=sh5le-unknown ;;
|
||||
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format, if it has switched
|
||||
@@ -206,8 +208,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:ekkoBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:SolidBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
macppc:MirBSD:*:*)
|
||||
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
|
||||
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:MirBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
||||
@@ -325,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
i86pc:SunOS:5.*:*)
|
||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
@@ -527,7 +532,7 @@ EOF
|
||||
echo rs6000-ibm-aix3.2
|
||||
fi
|
||||
exit ;;
|
||||
*:AIX:*:[45])
|
||||
*:AIX:*:[456])
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
@@ -764,12 +769,19 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:FreeBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
case ${UNAME_MACHINE} in
|
||||
pc98)
|
||||
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
amd64)
|
||||
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
esac
|
||||
exit ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit ;;
|
||||
i*:MINGW*:*)
|
||||
*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit ;;
|
||||
i*:windows32*:*)
|
||||
@@ -779,9 +791,18 @@ EOF
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit ;;
|
||||
x86:Interix*:[345]*)
|
||||
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
|
||||
exit ;;
|
||||
*:Interix*:[3456]*)
|
||||
case ${UNAME_MACHINE} in
|
||||
x86)
|
||||
echo i586-pc-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
EM64T | authenticamd)
|
||||
echo x86_64-unknown-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
IA64)
|
||||
echo ia64-unknown-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
esac ;;
|
||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||
echo i${UNAME_MACHINE}-pc-mks
|
||||
exit ;;
|
||||
@@ -815,6 +836,16 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit ;;
|
||||
arm*:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_EABI__
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
||||
fi
|
||||
exit ;;
|
||||
avr32*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
cris:Linux:*:*)
|
||||
@@ -851,7 +882,11 @@ EOF
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^CPU/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
;;
|
||||
mips64:Linux:*:*)
|
||||
@@ -870,7 +905,11 @@ EOF
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^CPU/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
;;
|
||||
or32:Linux:*:*)
|
||||
@@ -925,6 +964,9 @@ EOF
|
||||
x86_64:Linux:*:*)
|
||||
echo x86_64-unknown-linux-gnu
|
||||
exit ;;
|
||||
xtensa*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
i*86:Linux:*:*)
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
@@ -967,7 +1009,7 @@ EOF
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
#else
|
||||
#if defined(__INTEL_COMPILER) || defined(__PGI)
|
||||
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
LIBC=gnu
|
||||
#else
|
||||
LIBC=gnuaout
|
||||
@@ -977,7 +1019,11 @@ EOF
|
||||
LIBC=dietlibc
|
||||
#endif
|
||||
EOF
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^LIBC/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
test x"${LIBC}" != x && {
|
||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
||||
exit
|
||||
@@ -1179,6 +1225,15 @@ EOF
|
||||
SX-6:SUPER-UX:*:*)
|
||||
echo sx6-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
SX-7:SUPER-UX:*:*)
|
||||
echo sx7-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
SX-8:SUPER-UX:*:*)
|
||||
echo sx8-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
SX-8R:SUPER-UX:*:*)
|
||||
echo sx8r-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
Power*:Rhapsody:*:*)
|
||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||
exit ;;
|
||||
@@ -1429,9 +1484,9 @@ This script, last modified $timestamp, has failed to recognize
|
||||
the operating system you are using. It is advised that you
|
||||
download the most up to date version of the config scripts from
|
||||
|
||||
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
and
|
||||
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||
|
||||
If the version you run ($0) is already up to date, please
|
||||
send the following data and any information you think might be
|
||||
|
||||
123
bin/config.sub
vendored
123
bin/config.sub
vendored
@@ -1,9 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2005-12-11'
|
||||
timestamp='2008-01-16'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -71,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -240,15 +241,16 @@ case $basic_machine in
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| fr30 | frv \
|
||||
| fido | fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore | mep \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
@@ -268,26 +270,25 @@ case $basic_machine in
|
||||
| mn10200 | mn10300 \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nios | nios2 \
|
||||
| ns16k | ns32k \
|
||||
| or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b \
|
||||
| strongarm \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
| spu | strongarm \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m32c)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
# Motorola 68HC11/12.
|
||||
basic_machine=$basic_machine-unknown
|
||||
@@ -317,18 +318,18 @@ case $basic_machine in
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* \
|
||||
| avr-* | avr32-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
|
||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| m32r-* | m32rle-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
@@ -350,28 +351,31 @@ case $basic_machine in
|
||||
| mmix-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| nios-* | nios2-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tron-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| xstormy16-* | xtensa-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| xstormy16-* | xtensa*-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
m32c-*)
|
||||
# Recognize the basic CPU types without company name, with glob match.
|
||||
xtensa*)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
@@ -443,6 +447,14 @@ case $basic_machine in
|
||||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
blackfin)
|
||||
basic_machine=bfin-unknown
|
||||
os=-linux
|
||||
;;
|
||||
blackfin-*)
|
||||
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
c90)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
@@ -475,8 +487,8 @@ case $basic_machine in
|
||||
basic_machine=craynv-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
cr16c)
|
||||
basic_machine=cr16c-unknown
|
||||
cr16)
|
||||
basic_machine=cr16-unknown
|
||||
os=-elf
|
||||
;;
|
||||
crds | unos)
|
||||
@@ -668,6 +680,14 @@ case $basic_machine in
|
||||
basic_machine=m68k-isi
|
||||
os=-sysv
|
||||
;;
|
||||
m68knommu)
|
||||
basic_machine=m68k-unknown
|
||||
os=-linux
|
||||
;;
|
||||
m68knommu-*)
|
||||
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
m88k-omron*)
|
||||
basic_machine=m88k-omron
|
||||
;;
|
||||
@@ -683,6 +703,10 @@ case $basic_machine in
|
||||
basic_machine=i386-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
mingw32ce)
|
||||
basic_machine=arm-unknown
|
||||
os=-mingw32ce
|
||||
;;
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
@@ -809,6 +833,14 @@ case $basic_machine in
|
||||
basic_machine=i860-intel
|
||||
os=-osf
|
||||
;;
|
||||
parisc)
|
||||
basic_machine=hppa-unknown
|
||||
os=-linux
|
||||
;;
|
||||
parisc-*)
|
||||
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
pbd)
|
||||
basic_machine=sparc-tti
|
||||
;;
|
||||
@@ -818,6 +850,12 @@ case $basic_machine in
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pc98)
|
||||
basic_machine=i386-pc
|
||||
;;
|
||||
pc98-*)
|
||||
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
@@ -904,6 +942,10 @@ case $basic_machine in
|
||||
sb1el)
|
||||
basic_machine=mipsisa64sb1el-unknown
|
||||
;;
|
||||
sde)
|
||||
basic_machine=mipsisa32-sde
|
||||
os=-elf
|
||||
;;
|
||||
sei)
|
||||
basic_machine=mips-sei
|
||||
os=-seiux
|
||||
@@ -915,6 +957,9 @@ case $basic_machine in
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sh5el)
|
||||
basic_machine=sh5le-unknown
|
||||
;;
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
@@ -1004,6 +1049,10 @@ case $basic_machine in
|
||||
basic_machine=tic6x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tile*)
|
||||
basic_machine=tile-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
@@ -1120,7 +1169,7 @@ case $basic_machine in
|
||||
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b)
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
@@ -1193,7 +1242,8 @@ case $os in
|
||||
| -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
@@ -1208,7 +1258,7 @@ case $os in
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku* | -rdos*)
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@@ -1360,6 +1410,12 @@ else
|
||||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
score-*)
|
||||
os=-elf
|
||||
;;
|
||||
spu-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
@@ -1369,9 +1425,9 @@ case $basic_machine in
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
@@ -1397,6 +1453,9 @@ case $basic_machine in
|
||||
m68*-cisco)
|
||||
os=-aout
|
||||
;;
|
||||
mep-*)
|
||||
os=-elf
|
||||
;;
|
||||
mips*-cisco)
|
||||
os=-elf
|
||||
;;
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
#
|
||||
# Copyright by The HDF Group.
|
||||
# Copyright by the Board of Trustees of the University of Illinois.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
# terms governing use, modification, and redistribution, is contained in
|
||||
# the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
# of the source code distribution tree; Copyright.html can be found at the
|
||||
# root level of an installed copy of the electronic HDF5 document set and
|
||||
# is linked from the top-level documents page. It can also be found at
|
||||
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
|
||||
# access to either file, you may request a copy from help@hdfgroup.org.
|
||||
#
|
||||
|
||||
# How to create a parallel version of HDF5 on an IBM SP system
|
||||
# that uses MPI and MPI-IO.
|
||||
|
||||
# Unfortunately, the configure/make process to create the parallel version of
|
||||
# HDF5 has not yet been automated to the same extent that the sequential
|
||||
# version has.
|
||||
# Read the INSTALL file to understand the configure/make process for the
|
||||
# sequential (i.e., uniprocess) version of HDF5.
|
||||
# The process for creating the parallel version of HDF5 using MPI-IO
|
||||
# is similar, but first you will have to set up some environment variables
|
||||
# with values specific to your local installation.
|
||||
# The relevant variables are shown below, with values that work for LLNL's
|
||||
# ASCI baby blue pacific SP as of the writing of these instructions (980210).
|
||||
|
||||
# In addition to the environment variables, you _might_ also have to
|
||||
# create a new file in the config directory.
|
||||
# You will need to create this file only if the execution of the ./configure
|
||||
# program aborts with an error after printing the message
|
||||
# "checking whether byte ordering is bigendian..."
|
||||
#
|
||||
# If this is the case, create a new file in the config directory
|
||||
# whose name is of the form architecture-vendor-OSversion
|
||||
# (e.g., for baby blue pacific, this file is named powerpc-ibm-aix4.2.1.0)
|
||||
# and which contains the line
|
||||
# ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}
|
||||
# if the target architecture is bigendian, or
|
||||
# ac_cv_c_bigendian=${ac_cv_c_bigendian='no'}
|
||||
# otherwise.
|
||||
# Running the program ./bin/config.guess will print out the name
|
||||
# of the new file you must create.
|
||||
|
||||
# Don't try to make a parallel version of HDF5 from the same hdf5 root
|
||||
# directory where you made a sequential version of HDF5 -- start with
|
||||
# a fresh copy.
|
||||
# Here are the flags you must set before running the ./configure program
|
||||
# to create the parallel version of HDF5.
|
||||
# (We use csh here, but of course you can adapt to whatever shell you like.)
|
||||
|
||||
# compile for MPI jobs
|
||||
setenv CC "/usr/local/mpich-1.1.2+romio_lgfiles/bin/mpicc"
|
||||
|
||||
#
|
||||
# next 4 for IBM mpi
|
||||
#
|
||||
#setenv CC /usr/lpp/ppe.poe/bin/mpcc_r
|
||||
|
||||
#
|
||||
# for both
|
||||
#
|
||||
setenv MP_PROCS 1
|
||||
|
||||
|
||||
# These compiler flags work on ASCI baby blue pacific (IBM SP),
|
||||
# using IBM's MPI and Argonne's MPI-IO (ROMIO):
|
||||
# -DHAVE_FUNCTION compiler accepts __FUNCTION__ notation
|
||||
# -I/usr/local/mpio/include/ibm using ROMIO's MPI-IO header files
|
||||
#
|
||||
# The following flags are only needed when compiling/linking a user program
|
||||
# for execution.
|
||||
# -bI:/usr/include/piofs/piofs.exp this MPI-IO uses PIOFS file system
|
||||
# -L/usr /local/mpio/lib/ibm -lmpio link to this MPI-IO lib
|
||||
#
|
||||
#setenv CFLAGS "-D_LARGE_FILES $CFLAGS"
|
||||
|
||||
# The configure/make process needs to be able to run some programs,
|
||||
# need to specify a processor pool.
|
||||
# Also, don't prepend the process id in the output of the programs
|
||||
# run by config/make.
|
||||
setenv MP_RMPOOL 0
|
||||
setenv MP_LABELIO no
|
||||
|
||||
# Once these variables are set to the proper values for your installation,
|
||||
# you can run the configure program (i.e., ./configure)
|
||||
# to set up the Makefiles, etc.
|
||||
# After configuring, run the make as described in the INSTALL file.
|
||||
# Once the configuration is complete, you can set any of your
|
||||
# environment variables to whatever you like.
|
||||
|
||||
# the files in the config directory, such as
|
||||
# config/powerpc-ibm-aix4.2.1.0
|
||||
# config/powerpc-ibm-aix4.x
|
||||
# config/powerpc-ibm-aix4.3.2.0
|
||||
# sometimes will need some help depending on subtlties of the installation
|
||||
|
||||
|
||||
# When compiling and linking your application, don't forget to compile with
|
||||
# mpcc and link to the MPI-IO library and the parallel version of the HDF5
|
||||
# library (that was created and installed with the configure/make process).
|
||||
26
bin/h5vers
26
bin/h5vers
@@ -71,7 +71,7 @@ use strict;
|
||||
# the command line) then the first line of the README.txt and RELEASE.txt files
|
||||
# one directory above the H5public.h file is also modified so it looks
|
||||
# something like: This is hdf5-1.2.3-pre1 currently under development.
|
||||
# The AC_INIT macro in configure.in will also change in this case to be
|
||||
# The AC_INIT macro in configure.ac will also change in this case to be
|
||||
# something like: AC_INIT([HDF5], [hdf5-1.2.3-pre1], [help@hdfgroup.org])
|
||||
# Version changes are also reflected in the Windows-maintained H5pubconf.h
|
||||
# file.
|
||||
@@ -159,10 +159,10 @@ while ($_ = shift) {
|
||||
die "mutually exclusive options given\n" if $set && $inc;
|
||||
|
||||
# Determine file to use as H5public.h, README.txt,
|
||||
# release_docs/RELEASE.txt, configure.in, windows/src/H5pubconf.h,
|
||||
# vms/src/h5pubcof.h and config/lt_vers.am.
|
||||
# The README.txt, release_docs/RELEASE.txt, configure.in,
|
||||
# windows/src/H5pubconf.h, vms/src/h5pubconf.h and config/lt_vers.am
|
||||
# release_docs/RELEASE.txt, configure.ac, windows/src/H5pubconf.h,
|
||||
# vms/src/h5pubconf.h and config/lt_vers.am.
|
||||
# The README.txt, release_docs/RELEASE.txt, configure.ac,
|
||||
# vms/src/h5pubconf.h, windows/src/H5pubconf.h, and config/lt_vers.am
|
||||
# files are always in the directory above H5public.h
|
||||
unless ($file) {
|
||||
for (@files) {
|
||||
@@ -183,14 +183,10 @@ die "unable to read file: $README\n" unless -r $file;
|
||||
my $RELEASE = $file;
|
||||
$RELEASE =~ s/[^\/]*$/..\/release_docs\/RELEASE.txt/;
|
||||
die "unable to read file: $RELEASE\n" unless -r $file;
|
||||
# configure.in
|
||||
# configure.ac
|
||||
my $CONFIGURE = $file;
|
||||
$CONFIGURE =~ s/[^\/]*$/..\/configure.in/;
|
||||
$CONFIGURE =~ s/[^\/]*$/..\/configure.ac/;
|
||||
die "unable to read file: $CONFIGURE\n" unless -r $file;
|
||||
# windows/src/H5pubconf.h
|
||||
my $H5PUBCONF = $file;
|
||||
$H5PUBCONF =~ s/[^\/]*$/..\/windows\/src\/H5pubconf.h/;
|
||||
die "unable to read file: $H5PUBCONF\n" unless -r $file;
|
||||
# vms/src/h5pubconf.h
|
||||
my $H5VMSPUBCONF = $file;
|
||||
$H5VMSPUBCONF =~ s/[^\/]*$/..\/vms\/src\/h5pubconf.h/;
|
||||
@@ -242,7 +238,6 @@ if ($set) {
|
||||
$README = "";
|
||||
$RELEASE = "";
|
||||
$CONFIGURE = "";
|
||||
$H5PUBCONF = "";
|
||||
$H5VMSPUBCONF = "";
|
||||
$LT_VERS = "";
|
||||
@newver = @curver;
|
||||
@@ -339,7 +334,7 @@ sub gen_configure {
|
||||
print FILE @contents;
|
||||
close FILE;
|
||||
|
||||
$conf =~ /^(.*?)\/?configure.in$/;
|
||||
$conf =~ /^(.*?)\/?configure.ac$/;
|
||||
|
||||
if ($1) {
|
||||
$rc = system("cd $1 && bin/reconfigure >/dev/null 2>/dev/null && rm -rf autom4te.cache");
|
||||
@@ -352,7 +347,7 @@ sub gen_configure {
|
||||
}
|
||||
}
|
||||
|
||||
# Update the configure.in files and regenerate them
|
||||
# Update the configure.ac files and regenerate them
|
||||
gen_configure("HDF5", $CONFIGURE) if $CONFIGURE;
|
||||
|
||||
sub gen_h5pubconf {
|
||||
@@ -392,9 +387,6 @@ sub gen_h5pubconf {
|
||||
close FILE;
|
||||
}
|
||||
|
||||
# Update the Windows-maintained H5pubconf.h file
|
||||
gen_h5pubconf("HDF5", $H5PUBCONF, @newver) if $H5PUBCONF;
|
||||
|
||||
# Update the VMS-maintained h5pubconf.h file
|
||||
gen_h5pubconf("HDF5", $H5VMSPUBCONF, @newver) if $H5VMSPUBCONF;
|
||||
|
||||
|
||||
669
bin/install-sh
669
bin/install-sh
@@ -1,251 +1,520 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
stripcmd=
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
true
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
pathcomp=''
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
||||
4037
bin/ltmain.sh
4037
bin/ltmain.sh
File diff suppressed because it is too large
Load Diff
219
bin/make_overflow
Executable file
219
bin/make_overflow
Executable file
@@ -0,0 +1,219 @@
|
||||
#!/usr/bin/perl -w
|
||||
require 5.003;
|
||||
use strict;
|
||||
|
||||
# Global settings
|
||||
|
||||
# List of supported C types to generate overflow assignment code for
|
||||
my @ctypes = ( () );
|
||||
|
||||
#
|
||||
# Copyright by The HDF Group.
|
||||
# Copyright by the Board of Trustees of the University of Illinois.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
# terms governing use, modification, and redistribution, is contained in
|
||||
# the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
# of the source code distribution tree; Copyright.html can be found at the
|
||||
# root level of an installed copy of the electronic HDF5 document set and
|
||||
# is linked from the top-level documents page. It can also be found at
|
||||
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
|
||||
# access to either file, you may request a copy from help@hdfgroup.org.
|
||||
#
|
||||
|
||||
# Create assignment overflow #ifdefs
|
||||
#
|
||||
# Programmer: Quincey Koziol
|
||||
# Creation Date: 2009/04/09
|
||||
|
||||
##############################################################################
|
||||
# Parse a meaningful line (not a comment or blank line) into the appropriate
|
||||
# data structure
|
||||
#
|
||||
sub parse_line ($) {
|
||||
my $line = shift; # Get the line to parse
|
||||
|
||||
# Parse get the type name and whether it's signed or unsigned
|
||||
#print "line=$line\n";
|
||||
if($line =~ /.*SIGNED\s*;\s*$/ || $line =~ /.*UNSIGNED\s*;\s*$/) {
|
||||
my $name; # The name of the type
|
||||
my $signed; # Whether the type is signed or not
|
||||
|
||||
# Get the type's name & signed status
|
||||
($name, $signed) = ($line =~ /^\s*(\w*)\s*,\s*(\w*)\s*;\s*$/);
|
||||
#print "name = '$name', signed = '$signed'\n";
|
||||
|
||||
# Append the type to the list of C types already parsed
|
||||
push @ctypes, [$name, $signed];
|
||||
|
||||
}
|
||||
# Unknown keyword
|
||||
else {
|
||||
die "unknown keyword: $line";
|
||||
}
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Print the copyright into an open file
|
||||
#
|
||||
sub print_copyright ($) {
|
||||
my $fh = shift;
|
||||
|
||||
print $fh "/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n";
|
||||
print $fh " * Copyright by The HDF Group. *\n";
|
||||
print $fh " * Copyright by the Board of Trustees of the University of Illinois. *\n";
|
||||
print $fh " * All rights reserved. *\n";
|
||||
print $fh " * *\n";
|
||||
print $fh " * This file is part of HDF5. The full HDF5 copyright notice, including *\n";
|
||||
print $fh " * terms governing use, modification, and redistribution, is contained in *\n";
|
||||
print $fh " * the files COPYING and Copyright.html. COPYING can be found at the root *\n";
|
||||
print $fh " * of the source code distribution tree; Copyright.html can be found at the *\n";
|
||||
print $fh " * root level of an installed copy of the electronic HDF5 document set and *\n";
|
||||
print $fh " * is linked from the top-level documents page. It can also be found at *\n";
|
||||
print $fh " * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *\n";
|
||||
print $fh " * access to either file, you may request a copy from help\@hdfgroup.org. *\n";
|
||||
print $fh " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n";
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Print the "do not change this file" warning
|
||||
#
|
||||
sub print_warning ($) {
|
||||
my $fh = shift;
|
||||
|
||||
print $fh "\n/* Generated automatically by bin/make_overflow -- do not edit */\n";
|
||||
print $fh "/* Add new types to H5overflow.txt file */\n\n";
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Print start of ifdef's to prevent a file from being re-included
|
||||
#
|
||||
sub print_startprotect ($$) {
|
||||
my ($fh, $file) = @_;
|
||||
|
||||
# Clip off the ".h" part of the name
|
||||
$file =~ s/(\w*)\.h/$1/;
|
||||
|
||||
# Print the ifdef info
|
||||
print $fh "\n#ifndef _${file}_H\n";
|
||||
print $fh "#define _${file}_H\n";
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Print assignment overflow macros for each type
|
||||
#
|
||||
sub print_typemacros ($) {
|
||||
my $fh = shift; # File handle for output file
|
||||
my ($src_aref, $dst_aref); # References for each type's information
|
||||
|
||||
# Print the descriptive comment
|
||||
print $fh "\n\n/* Each type in this file is tested for assignment to the other types,\n";
|
||||
print $fh " * and range checks are defined for bad assignments at run-time.\n";
|
||||
print $fh " */\n";
|
||||
|
||||
for $src_aref (@ctypes) {
|
||||
# Print a descriptive comment
|
||||
print $fh "\n/* Assignment checks for @$src_aref[0] */\n\n";
|
||||
|
||||
for $dst_aref (@ctypes) {
|
||||
if (@$src_aref[0] ne @$dst_aref[0]) {
|
||||
# Print a descriptive comment
|
||||
print $fh "/* src: @$src_aref[0], dst: @$dst_aref[0] */\n";
|
||||
|
||||
# Print actual type size checks & macro definitions
|
||||
print $fh "#if H5_SIZEOF_", uc @$src_aref[0], " < H5_SIZEOF_", uc @$dst_aref[0], "\n";
|
||||
print $fh " #define ASSIGN_", @$src_aref[0], "_TO_", @$dst_aref[0], "(dst, dsttype, src, srctype) \\\n";
|
||||
if ( @$src_aref[1] eq @$dst_aref[1]) {
|
||||
print $fh " ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)\n";
|
||||
} elsif ( @$src_aref[1] eq "SIGNED") {
|
||||
print $fh " ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)\n";
|
||||
} else {
|
||||
print $fh " ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)\n";
|
||||
}
|
||||
print $fh "#elif H5_SIZEOF_", uc @$src_aref[0], " > H5_SIZEOF_", uc @$dst_aref[0], "\n";
|
||||
print $fh " #define ASSIGN_", @$src_aref[0], "_TO_", @$dst_aref[0], "(dst, dsttype, src, srctype) \\\n";
|
||||
print $fh " ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)\n";
|
||||
print $fh "#else /* H5_SIZEOF_", uc @$src_aref[0], " == H5_SIZEOF_", uc @$dst_aref[0], " */\n";
|
||||
print $fh " #define ASSIGN_", @$src_aref[0], "_TO_", @$dst_aref[0], "(dst, dsttype, src, srctype) \\\n";
|
||||
if ( @$src_aref[1] eq @$dst_aref[1]) {
|
||||
print $fh " ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)\n";
|
||||
} elsif ( @$src_aref[1] eq "SIGNED") {
|
||||
print $fh " ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)\n";
|
||||
} else {
|
||||
print $fh " ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)\n";
|
||||
}
|
||||
print $fh "#endif /* src: @$src_aref[0] dst: @$dst_aref[0] */\n\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Print end of ifdef's to prevent a file from being re-included
|
||||
#
|
||||
sub print_endprotect ($$) {
|
||||
my ($fh, $file) = @_;
|
||||
|
||||
# Clip off the ".h" part of the name
|
||||
$file =~ s/(\w*)\.h/$1/;
|
||||
|
||||
# Print the endif info
|
||||
print $fh "#endif /* ${file}_H */\n\n";
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Create the generated portion of the public header file
|
||||
#
|
||||
sub create_public ($) {
|
||||
my $prefix = shift; # Get the prefix for the generated file
|
||||
my $file = "H5overflow.h"; # Name of file to generate
|
||||
my $name; # Name of function
|
||||
|
||||
# Rename previous file
|
||||
# rename "${prefix}${file}", "${prefix}${file}~" or die "unable to make backup";
|
||||
|
||||
# Open new header file
|
||||
open HEADER, ">${prefix}${file}" or die "unable to modify source";
|
||||
|
||||
# Create file contents
|
||||
print_copyright(*HEADER);
|
||||
print_warning(*HEADER);
|
||||
print_startprotect(*HEADER, $file);
|
||||
print_typemacros(*HEADER);
|
||||
print_endprotect(*HEADER, $file);
|
||||
|
||||
# Close header file
|
||||
close HEADER;
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Read symbol version file (given as command-line argument) in and process it
|
||||
# into internal data structures, then create header files.
|
||||
#
|
||||
my $file; # Filename of input file
|
||||
|
||||
for $file (@ARGV) {
|
||||
my $prefix; # Local prefix for generated files
|
||||
my $line; # Line from input file
|
||||
|
||||
#print "file = '$file'\n";
|
||||
($prefix) = ($file =~ /(^.*\/)/);
|
||||
#print "prefix = '$prefix'\n";
|
||||
# Read in the entire file
|
||||
open SOURCE, $file or die "$file: $!\n";
|
||||
while ( defined ($line=<SOURCE>) ) {
|
||||
# Skip blank lines and those lines whose first character is a '#'
|
||||
if(!($line =~ /(^\s*#.*$)|(^\s*$)/)) {
|
||||
# Construct data structures for later printing
|
||||
parse_line($line);
|
||||
}
|
||||
}
|
||||
close SOURCE;
|
||||
|
||||
# Create header files
|
||||
print "Generating 'H5overflow.h'\n";
|
||||
create_public($prefix);
|
||||
}
|
||||
|
||||
111
bin/make_vers
111
bin/make_vers
@@ -2,13 +2,20 @@
|
||||
require 5.003;
|
||||
|
||||
# Global settings
|
||||
# (The max_idx parameter is the only thing that needs to be changed when adding
|
||||
# support for a new major release. If support for a prior major release
|
||||
# is added (like support for 1.4, etc), the min_sup_idx parameter will
|
||||
# need to be decremented. - QAK)
|
||||
|
||||
# Max. library "index" (0 = v1.0, 1 = 1.2, etc)
|
||||
$max_idx = 4;
|
||||
$max_idx = 5;
|
||||
|
||||
# Min. supported previous library version "index" (0 = v1.0, 1 = 1.2, etc)
|
||||
$min_sup_idx = 3;
|
||||
|
||||
# Number of spaces to indent preprocessor commands inside ifdefs
|
||||
$indent = 2;
|
||||
|
||||
#
|
||||
# Copyright by The HDF Group.
|
||||
# Copyright by the Board of Trustees of the University of Illinois.
|
||||
@@ -82,13 +89,34 @@ sub print_startprotect ($$) {
|
||||
# Print check for conflicting version macro settings
|
||||
#
|
||||
sub print_checkoptions ($) {
|
||||
my $fh = shift;
|
||||
my $fh = shift; # File handle for output file
|
||||
my $curr_idx; # Current API version index
|
||||
|
||||
# Print the option checking
|
||||
print $fh "\n/* Issue error if contradicting macros have been defined. */\n";
|
||||
print $fh "#if defined(H5_USE_16_API) && defined(H5_NO_DEPRECATED_SYMBOLS)\n";
|
||||
print $fh "#error \"Can't choose old API versions when deprecated APIs are disabled\"\n";
|
||||
print $fh "#endif /* defined(H5_USE_16_API) && defined(H5_NO_DEPRECATED_SYMBOLS) */\n";
|
||||
|
||||
# Print the #ifdef
|
||||
print $fh "#if (";
|
||||
for $curr_idx ($min_sup_idx .. ($max_idx - 1)) {
|
||||
print $fh "defined(H5_USE_1", ($curr_idx * 2), "_API)";
|
||||
if($curr_idx < ($max_idx - 1)) {
|
||||
print $fh " || ";
|
||||
}
|
||||
}
|
||||
print $fh ") && defined(H5_NO_DEPRECATED_SYMBOLS)\n";
|
||||
|
||||
# Print the error for bad API version chosen
|
||||
print $fh ' ' x $indent, "#error \"Can't choose old API versions when deprecated APIs are disabled\"\n";
|
||||
|
||||
# Print the #endif
|
||||
print $fh "#endif /* (";
|
||||
for $curr_idx ($min_sup_idx .. ($max_idx - 1)) {
|
||||
print $fh "defined(H5_USE_1", ($curr_idx * 2), "_API)";
|
||||
if($curr_idx < ($max_idx - 1)) {
|
||||
print $fh " || ";
|
||||
}
|
||||
}
|
||||
print $fh ") && defined(H5_NO_DEPRECATED_SYMBOLS) */\n";
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
@@ -110,7 +138,7 @@ sub print_globalapivers ($) {
|
||||
# Print API version ifdef
|
||||
print $fh "#if defined(H5_USE_1", ($curr_idx * 2), "_API_DEFAULT) && !defined(H5_USE_1", ($curr_idx * 2), "_API)\n";
|
||||
# Print API version definition
|
||||
print $fh "#define H5_USE_1", ($curr_idx * 2), "_API 1\n";
|
||||
print $fh " " x $indent, "#define H5_USE_1", ($curr_idx * 2), "_API 1\n";
|
||||
# Print API version endif
|
||||
print $fh "#endif /* H5_USE_1", ($curr_idx * 2), "_API_DEFAULT && !H5_USE_1", ($curr_idx * 2), "_API */\n\n";
|
||||
}
|
||||
@@ -118,7 +146,7 @@ sub print_globalapivers ($) {
|
||||
# Loop over supported older library APIs and define the appropriate macros
|
||||
for $curr_idx ($min_sup_idx .. ($max_idx - 1)) {
|
||||
# Print API version ifdef
|
||||
print $fh "#ifdef H5_USE_1", ($curr_idx * 2), "_API\n";
|
||||
print $fh "\n#ifdef H5_USE_1", ($curr_idx * 2), "_API\n";
|
||||
|
||||
# Print the version macro info for each function that is defined for
|
||||
# this API version
|
||||
@@ -127,7 +155,7 @@ sub print_globalapivers ($) {
|
||||
print $fh "/*************/\n";
|
||||
for $name (sort keys %{$func_vers[$curr_idx]}) {
|
||||
print $fh "\n#if !defined(", $name, "_vers)\n";
|
||||
print $fh "#define ", $name, "_vers $func_vers[$curr_idx]{$name}\n";
|
||||
print $fh " " x $indent, "#define ", $name, "_vers $func_vers[$curr_idx]{$name}\n";
|
||||
print $fh "#endif /* !defined(", $name, "_vers) */\n";
|
||||
}
|
||||
|
||||
@@ -138,7 +166,7 @@ sub print_globalapivers ($) {
|
||||
print $fh "/************/\n";
|
||||
for $name (sort keys %{$type_vers[$curr_idx]}) {
|
||||
print $fh "\n#if !defined(", $name, "_t_vers)\n";
|
||||
print $fh "#define ", $name, "_t_vers $type_vers[$curr_idx]{$name}\n";
|
||||
print $fh " " x $indent, "#define ", $name, "_t_vers $type_vers[$curr_idx]{$name}\n";
|
||||
print $fh "#endif /* !defined(", $name, "_t_vers) */\n";
|
||||
}
|
||||
|
||||
@@ -180,25 +208,25 @@ sub print_defaultapivers ($) {
|
||||
|
||||
# Set up default/latest version name mapping
|
||||
print $fh "\n#if !defined($curr_vers_name) || $curr_vers_name == $curr_vers\n";
|
||||
print $fh "#ifndef $curr_vers_name\n";
|
||||
print $fh "#define $curr_vers_name $curr_vers\n";
|
||||
print $fh "#endif /* $curr_vers_name */\n";
|
||||
print $fh "#define $curr_name $curr_name$curr_vers\n";
|
||||
print $fh " " x $indent, "#ifndef $curr_vers_name\n";
|
||||
print $fh " " x ($indent * 2), "#define $curr_vers_name $curr_vers\n";
|
||||
print $fh " " x $indent, "#endif /* $curr_vers_name */\n";
|
||||
print $fh " " x $indent, "#define $curr_name $curr_name$curr_vers\n";
|
||||
|
||||
# Print function's dependent parameter types
|
||||
foreach(sort(@param_list)) {
|
||||
print $fh "#define ${_}_t $_${curr_vers}_t\n";
|
||||
print $fh " " x $indent, "#define ${_}_t $_${curr_vers}_t\n";
|
||||
}
|
||||
|
||||
# Loop to print earlier version name mappings
|
||||
$curr_vers--;
|
||||
while($curr_vers > 0) {
|
||||
print $fh "#elif $curr_vers_name == $curr_vers\n";
|
||||
print $fh "#define $curr_name $curr_name$curr_vers\n";
|
||||
print $fh " " x $indent, "#define $curr_name $curr_name$curr_vers\n";
|
||||
|
||||
# Print function's dependent parameter types
|
||||
foreach(sort(@param_list)) {
|
||||
print $fh "#define ${_}_t $_${curr_vers}_t\n";
|
||||
print $fh " " x $indent, "#define ${_}_t $_${curr_vers}_t\n";
|
||||
}
|
||||
|
||||
$curr_vers--;
|
||||
@@ -206,7 +234,7 @@ sub print_defaultapivers ($) {
|
||||
|
||||
# Finish up with error for unknown version and endif
|
||||
print $fh "#else /* $curr_vers_name */\n";
|
||||
print $fh "#error \"$curr_vers_name set to invalid value\"\n";
|
||||
print $fh " " x $indent, "#error \"$curr_vers_name set to invalid value\"\n";
|
||||
print $fh "#endif /* $curr_vers_name */\n";
|
||||
}
|
||||
|
||||
@@ -224,22 +252,22 @@ sub print_defaultapivers ($) {
|
||||
|
||||
# Set up default/latest version name mapping
|
||||
print $fh "\n#if !defined($curr_vers_name) || $curr_vers_name == $curr_vers\n";
|
||||
print $fh "#ifndef $curr_vers_name\n";
|
||||
print $fh "#define $curr_vers_name $curr_vers\n";
|
||||
print $fh "#endif /* $curr_vers_name */\n";
|
||||
print $fh "#define ${curr_name}_t $curr_name${curr_vers}_t\n";
|
||||
print $fh " " x $indent, "#ifndef $curr_vers_name\n";
|
||||
print $fh " " x ($indent * 2), "#define $curr_vers_name $curr_vers\n";
|
||||
print $fh " " x $indent, "#endif /* $curr_vers_name */\n";
|
||||
print $fh " " x $indent, "#define ${curr_name}_t $curr_name${curr_vers}_t\n";
|
||||
|
||||
# Loop to print earlier version name mappings
|
||||
$curr_vers--;
|
||||
while($curr_vers > 0) {
|
||||
print $fh "#elif $curr_vers_name == $curr_vers\n";
|
||||
print $fh "#define ${curr_name}_t $curr_name${curr_vers}_t\n";
|
||||
print $fh " " x $indent, "#define ${curr_name}_t $curr_name${curr_vers}_t\n";
|
||||
$curr_vers--;
|
||||
}
|
||||
|
||||
# Finish up with error for unknown version and endif
|
||||
print $fh "#else /* $curr_vers_name */\n";
|
||||
print $fh "#error \"$curr_vers_name set to invalid value\"\n";
|
||||
print $fh " " x $indent, "#error \"$curr_vers_name set to invalid value\"\n";
|
||||
print $fh "#endif /* $curr_vers_name */\n\n";
|
||||
}
|
||||
}
|
||||
@@ -271,6 +299,7 @@ sub parse_line ($) {
|
||||
my $params; # Typedefs for function parameters
|
||||
my $vers; # The version info for the function
|
||||
my @vers_list; # Version info, as a list
|
||||
my @vers_nums; # Version info, as a numeric list
|
||||
my $num_versions; # Number of versions for function
|
||||
my %sym_versions; # Versions for a symbol
|
||||
my $last_idx; # The previous version index seen for a function
|
||||
@@ -308,15 +337,12 @@ sub parse_line ($) {
|
||||
@vers_list = split(/\s*,\s*/, $vers);
|
||||
#print "parse_line: vers_list=(@vers_list)\n";
|
||||
|
||||
# Check for invalid version info given
|
||||
$last_idx = -1;
|
||||
$last_vers = 1;
|
||||
foreach(sort(@vers_list)) {
|
||||
# Parse the version list into numbers, checking for invalid input
|
||||
foreach(@vers_list) {
|
||||
my $vers_idx; # Index of version in array
|
||||
|
||||
#print "parse_line: _=$_ last_idx='$last_idx'\n";
|
||||
# Do some validation on the input
|
||||
if(!($_ =~ /v1[02468]/)) {
|
||||
if(!( $_ =~ /v1[02468]/ || $_ =~ /v11[02468]/ )) {
|
||||
die "bad version information: $name";
|
||||
}
|
||||
if(exists($sym_versions{$_})) {
|
||||
@@ -326,18 +352,29 @@ sub parse_line ($) {
|
||||
# Store the versions for the function in a local hash table, indexed by the version
|
||||
$sym_versions{$_}=$_;
|
||||
|
||||
#print "parse_line: _=$_\n";
|
||||
# Get the index of the version
|
||||
($vers_idx) = ($_ =~ /v1(\d)/);
|
||||
($vers_idx) = ($_ =~ /v1(\d+)/);
|
||||
$vers_idx /= 2;
|
||||
#print "parse_line: vers_idx='$vers_idx'\n";
|
||||
push(@vers_nums, $vers_idx);
|
||||
}
|
||||
#print "parse_line: vers_nums=(@vers_nums)\n";
|
||||
|
||||
# Check for invalid version info given
|
||||
$last_idx = -1;
|
||||
$last_vers = 1;
|
||||
foreach(sort(@vers_nums)) {
|
||||
#print "parse_line: _=$_ last_idx='$last_idx'\n";
|
||||
# Update intermediate versions of the library that included the API routine
|
||||
if($last_idx >= 0) {
|
||||
#print "parse_line: name='$name'\n";
|
||||
#print "parse_line: last_vers='$last_vers'\n";
|
||||
#print "parse_line: last_idx='$last_idx'\n";
|
||||
|
||||
# Add the function to the list of API routines available in
|
||||
# different versions of the library
|
||||
while($last_idx < $vers_idx) {
|
||||
while($last_idx <= $_) {
|
||||
if($line_type == 1) {
|
||||
$func_vers[$last_idx]{$name} = $last_vers;
|
||||
} elsif($line_type == 2) {
|
||||
@@ -353,7 +390,7 @@ sub parse_line ($) {
|
||||
}
|
||||
|
||||
# Keep track of last version index seen
|
||||
$last_idx = $vers_idx;
|
||||
$last_idx = $_;
|
||||
}
|
||||
|
||||
# Finish updating versions of the library that included the API routine
|
||||
@@ -427,7 +464,13 @@ for $file (@ARGV) {
|
||||
my $prefix; # Local prefix for generated files
|
||||
|
||||
#print "file = '$file'\n";
|
||||
($prefix) = ($file =~ /(^.*\/)/);
|
||||
# Check for directory prefix on input file
|
||||
if($file =~ /\//) {
|
||||
($prefix) = ($file =~ /(^.*\/)/);
|
||||
}
|
||||
else {
|
||||
$prefix = "";
|
||||
}
|
||||
#print "prefix = '$prefix'\n";
|
||||
# Read in the entire file
|
||||
open SOURCE, $file or die "$file: $!\n";
|
||||
@@ -441,7 +484,7 @@ for $file (@ARGV) {
|
||||
close SOURCE;
|
||||
|
||||
# Create header files
|
||||
print "Generating 'H5version.h'\n";
|
||||
print "Generating '", $prefix, "H5version.h'\n";
|
||||
create_public($prefix);
|
||||
|
||||
#for $name (sort keys %functions) {
|
||||
|
||||
101
bin/output_filter.sh
Normal file
101
bin/output_filter.sh
Normal file
@@ -0,0 +1,101 @@
|
||||
## Copyright by The HDF Group.
|
||||
## All rights reserved.
|
||||
##
|
||||
## This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
## terms governing use, modification, and redistribution, is contained in
|
||||
## the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
## of the source code distribution tree; Copyright.html can be found at the
|
||||
## root level of an installed copy of the electronic HDF5 document set and
|
||||
## is linked from the top-level documents page. It can also be found at
|
||||
## http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
|
||||
## access to either file, you may request a copy from help@hdfgroup.org.
|
||||
|
||||
# This contains function definitions of output filtering.
|
||||
# This file should only be sourced in by another shell script.
|
||||
#
|
||||
# Programmer: Albert Cheng
|
||||
# Created Date: 2011/5/3
|
||||
|
||||
|
||||
# Some systems will dump some messages to stdout for various reasons.
|
||||
# Remove them from the stdout result file.
|
||||
# $1 is the file name of the file to be filtered.
|
||||
# Cases of filter needed:
|
||||
# 1. Sandia Red-Storm
|
||||
# yod always prints these two lines at the beginning.
|
||||
# LibLustre: NAL NID: 0004a605 (5)
|
||||
# Lustre: OBD class driver Build Version: 1, info@clusterfs.com
|
||||
# 2. LANL Lambda
|
||||
# mpijob mirun -np always add an extra line at the end like:
|
||||
# P4 procgroup file is /users/acheng/.lsbatch/host10524.l82
|
||||
STDOUT_FILTER() {
|
||||
result_file=$1
|
||||
tmp_file=/tmp/h5test_tmp_$$
|
||||
# Filter Sandia Red-Storm yod messages.
|
||||
cp $result_file $tmp_file
|
||||
sed -e '/^LibLustre:/d' -e '/^Lustre:/d' \
|
||||
< $tmp_file > $result_file
|
||||
# Filter LANL Lambda mpirun message.
|
||||
cp $result_file $tmp_file
|
||||
sed -e '/^P4 procgroup file is/d' \
|
||||
< $tmp_file > $result_file
|
||||
# cleanup
|
||||
rm -f $tmp_file
|
||||
}
|
||||
|
||||
|
||||
# Some systems will dump some messages to stderr for various reasons.
|
||||
# Remove them from the stderr result file.
|
||||
# $1 is the file name of the file to be filtered.
|
||||
# Cases of filter needed:
|
||||
# 1. MPE:
|
||||
# In parallel mode and if MPE library is used, it prints the following
|
||||
# two message lines whether the MPE tracing is used or not.
|
||||
# Writing logfile.
|
||||
# Finished writing logfile.
|
||||
# 2. LANL MPI:
|
||||
# The LANL MPI will print some messages like the following,
|
||||
# LA-MPI: *** mpirun (1.5.10)
|
||||
# LA-MPI: *** 3 process(es) on 2 host(s): 2*fln21 1*fln22
|
||||
# LA-MPI: *** libmpi (1.5.10)
|
||||
# LA-MPI: *** Copyright 2001-2004, ACL, Los Alamos National Laboratory
|
||||
# 3. h5diff debug output:
|
||||
# Debug output all have prefix "h5diff debug: ".
|
||||
# 4. AIX system prints messages like these when it is aborting:
|
||||
# ERROR: 0031-300 Forcing all remote tasks to exit due to exit code 1 in task 0
|
||||
# ERROR: 0031-250 task 4: Terminated
|
||||
# ERROR: 0031-250 task 3: Terminated
|
||||
# ERROR: 0031-250 task 2: Terminated
|
||||
# ERROR: 0031-250 task 1: Terminated
|
||||
# 5. LLNL Blue-Gene mpirun prints messages like there when it exit non-zero:
|
||||
# <Apr 12 15:01:49.075658> BE_MPI (ERROR): The error message in the job record is as follows:
|
||||
# <Apr 12 15:01:49.075736> BE_MPI (ERROR): "killed by exit(1) on node 0"
|
||||
STDERR_FILTER() {
|
||||
result_file=$1
|
||||
tmp_file=/tmp/h5test_tmp_$$
|
||||
# Filter LLNL Blue-Gene error messages in both serial and parallel modes
|
||||
# since mpirun is used in both modes.
|
||||
cp $result_file $tmp_file
|
||||
sed -e '/ BE_MPI (ERROR): /d' \
|
||||
< $tmp_file > $result_file
|
||||
# Filter MPE messages
|
||||
if test -n "$pmode"; then
|
||||
cp $result_file $tmp_file
|
||||
sed -e '/^Writing logfile./d' -e '/^Finished writing logfile./d' \
|
||||
< $tmp_file > $result_file
|
||||
fi
|
||||
# Filter LANL MPI messages
|
||||
# and LLNL srun messages
|
||||
# and AIX error messages
|
||||
if test -n "$pmode"; then
|
||||
cp $result_file $tmp_file
|
||||
sed -e '/^LA-MPI:/d' -e '/^srun:/d' -e '/^ERROR:/d' \
|
||||
< $tmp_file > $result_file
|
||||
fi
|
||||
# Filter h5diff debug output
|
||||
cp $result_file $tmp_file
|
||||
sed -e '/^h5diff debug: /d' \
|
||||
< $tmp_file > $result_file
|
||||
# clean up temporary files.
|
||||
rm -f $tmp_file
|
||||
}
|
||||
@@ -28,32 +28,37 @@
|
||||
# of versions that can get confused (not even counting the m4 utility)!
|
||||
|
||||
# HDF5 currently uses the following versions of the autotools:
|
||||
AUTOCONF_VERSION="autoconf (GNU Autoconf) 2.61"
|
||||
AUTOMAKE_VERSION="automake (GNU automake) 1.10.1"
|
||||
AUTOHEADER_VERSION="autoheader (GNU Autoconf) 2.61"
|
||||
ACLOCAL_VERSION="aclocal (GNU automake) 1.10.1"
|
||||
LIBTOOL_VERSION="(GNU libtool) 2.2.6"
|
||||
AUTOCONF_VERSION="autoconf (GNU Autoconf) 2.69"
|
||||
AUTOMAKE_VERSION="automake (GNU automake) 1.12.3"
|
||||
AUTOHEADER_VERSION="autoheader (GNU Autoconf) 2.69"
|
||||
ACLOCAL_VERSION="aclocal (GNU automake) 1.12.3"
|
||||
LIBTOOL_VERSION="(GNU libtool) 2.4.2"
|
||||
M4_VERSION="m4 (GNU M4) 1.4.16"
|
||||
|
||||
#
|
||||
# When upgrading automake's version, don't forget to also update its
|
||||
# helper utilities, especially depcomp.
|
||||
|
||||
|
||||
# If paths to autotools are not specified by the user, assume tools are
|
||||
# running on kagiso and set paths accordingly.
|
||||
# running on jam in /mnt/hdf/packages and set paths accordingly.
|
||||
if test -z ${AUTOCONF}; then
|
||||
AUTOCONF=/mnt/hdf/packages/autoconf/autoconf-2.61/bin/autoconf
|
||||
AUTOCONF=/mnt/hdf/packages/autoconf/autoconf-2.69/bin/autoconf
|
||||
fi
|
||||
if test -z ${AUTOMAKE}; then
|
||||
AUTOMAKE=/mnt/hdf/packages/automake/automake-1.10.1/bin/automake-1.10
|
||||
AUTOMAKE=/mnt/hdf/packages/automake/automake-1.12.3/bin/automake-1.12
|
||||
fi
|
||||
if test -z ${AUTOHEADER}; then
|
||||
AUTOHEADER=/mnt/hdf/packages/autoconf/autoconf-2.61/bin/autoheader
|
||||
AUTOHEADER=/mnt/hdf/packages/autoconf/autoconf-2.69/bin/autoheader
|
||||
fi
|
||||
if test -z ${ACLOCAL}; then
|
||||
ACLOCAL=/mnt/hdf/packages/automake/automake-1.10.1/bin/aclocal-1.10
|
||||
ACLOCAL=/mnt/hdf/packages/automake/automake-1.12.3/bin/aclocal-1.12
|
||||
fi
|
||||
if test -z ${LIBTOOL}; then
|
||||
LIBTOOL=/mnt/hdf/packages/libtool/libtool-2.2.6a/bin/libtool
|
||||
LIBTOOL=/mnt/hdf/packages/libtool/libtool-2.4.2/bin/libtool
|
||||
fi
|
||||
if test -z ${M4}; then
|
||||
M4=/mnt/hdf/packages/m4/m4-1.4.16/bin/m4
|
||||
fi
|
||||
|
||||
# Check version numbers of all autotools against the "correct" versions
|
||||
@@ -82,14 +87,17 @@ if test -z "${LT_VERS}"; then
|
||||
echo "${LIBTOOL} version is not ${LIBTOOL_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use the latest version of M4
|
||||
PATH=/mnt/hdf/packages/m4/m4-1.4.7/bin:/mnt/hdf/packages/m4/m4-1.4.7/share:$PATH
|
||||
M4_VERS=`${M4} --version 2>&1 | grep "${M4_VERSION}"`
|
||||
if test -z "${M4_VERS}"; then
|
||||
echo "${M4} version is not ${M4_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure that the tools are in the path.
|
||||
AUTOCONF_DIR=`dirname ${AUTOCONF}`
|
||||
LIBTOOL_DIR=`dirname ${LIBTOOL}`
|
||||
PATH=${AUTOCONF_DIR}:$PATH
|
||||
M4_DIR=`dirname ${M4}`
|
||||
PATH=${AUTOCONF_DIR}:${M4_DIR}:$PATH
|
||||
|
||||
# Run autoconf/automake commands in order
|
||||
echo ${ACLOCAL} -I ${LIBTOOL_DIR}/../share/aclocal
|
||||
|
||||
58
bin/release
58
bin/release
@@ -14,42 +14,10 @@
|
||||
# access to either file, you may request a copy from help@hdfgroup.org.
|
||||
#
|
||||
|
||||
# Make a release of hdf5. The command-line switches are:
|
||||
# Make a release of hdf5.
|
||||
#
|
||||
# -d DIR The name of the directory where the releas(es) should be
|
||||
# placed. By default, the directory is ./releases
|
||||
#
|
||||
# --nocheck Ignore errors in MANIFEST file.
|
||||
#
|
||||
# --private Make a private release with today's date in version information.
|
||||
#
|
||||
# The other command-line options are the names of the programs to use
|
||||
# for compressing the resulting tar archive (if none are given then
|
||||
# `tar md5' is assumed):
|
||||
#
|
||||
# tar -- use tar and don't do any compressing.
|
||||
# compress -- use compress and append `.Z' to the output name.
|
||||
# gzip -- use gzip with `-9' and append `.gz' to the output name.
|
||||
# bzip2 -- use bzip2 with `-9' and append `.bz2' to the output name.
|
||||
# md5 -- produce a md5 checksum in addition to the archive.
|
||||
# doc -- produce the latest doc tree in addition to the archive.
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# $ release
|
||||
# releases/hdf5-1.0.38.tar
|
||||
# releases/hdf5-1.0.38.tar.md5
|
||||
#
|
||||
# $ release gzip
|
||||
# releases/hdf5-1.0.38.tar.gz
|
||||
#
|
||||
# $ release -d /tmp tar compress gzip bzip2 md5 doc
|
||||
# /tmp/hdf5-1.0.38.tar
|
||||
# /tmp/hdf5-1.0.38.tar.Z
|
||||
# /tmp/hdf5-1.0.38.tar.gz
|
||||
# /tmp/hdf5-1.0.38.tar.bz2
|
||||
# /tmp/hdf5-1.0.38.tar.md5
|
||||
# /tmp/hdf5-1.0.38_doc.tar
|
||||
# Programmer: Robb Matzke
|
||||
# Creation date: on or before 1998-01-29.
|
||||
#
|
||||
# Modifications
|
||||
# Robb Matzke, 1999-07-16
|
||||
@@ -59,6 +27,12 @@
|
||||
# Albert Cheng, 1999-10-26
|
||||
# Moved the MANIFEST checking to a separate command file so that
|
||||
# it can be invoked individually.
|
||||
#
|
||||
# Albert Cheng, 2004-08-14
|
||||
# Added the --private option.
|
||||
#
|
||||
# James Laird, 2005-09-07
|
||||
# Added the md5 method.
|
||||
|
||||
# Function definitions
|
||||
#
|
||||
@@ -119,6 +93,7 @@ VERS_OLD=
|
||||
test "$VERS" || exit 1
|
||||
verbose=yes
|
||||
check=yes
|
||||
release_date=`date +%F`
|
||||
today=`date +%Y%m%d`
|
||||
pmode='no'
|
||||
tmpdir="../#release_tmp.$$" # tmp work directory
|
||||
@@ -222,13 +197,15 @@ grep '^\.' MANIFEST | grep -v _DO_NOT_DISTRIBUTE_ >$MANIFEST
|
||||
|
||||
# Prepare the source tree for a release.
|
||||
ln -s `pwd` $tmpdir/$HDF5_VERS || exit 1
|
||||
mv Makefile $tmpdir/Makefile.x 2>/dev/null #might fail
|
||||
# Save a backup copy of Makefile if exists.
|
||||
test -f Makefile && mv Makefile $tmpdir/Makefile.x
|
||||
cp -p Makefile.dist Makefile
|
||||
|
||||
# Update README.txt and release_docs/RELEASE.txt with release information.
|
||||
# Update README.txt and release_docs/RELEASE.txt with release information in
|
||||
# line 1.
|
||||
for f in README.txt release_docs/RELEASE.txt; do
|
||||
echo "HDF5 version $VERS released on `date`" >$f.x
|
||||
tail +2l $f >>$f.x
|
||||
echo "HDF5 version $VERS released on $release_date" >$f.x
|
||||
sed -e 1d $f >>$f.x
|
||||
mv $f.x $f
|
||||
# Make sure new files are of the right access mode
|
||||
chmod 644 $f
|
||||
@@ -284,7 +261,8 @@ done
|
||||
# Copy the RELEASE.txt to the release area.
|
||||
cp release_docs/RELEASE.txt $DEST/$HDF5_VERS-RELEASE.txt
|
||||
|
||||
# Restore previous Makefile if existed.
|
||||
# Remove distributed Makefile and restore previous Makefile if existed.
|
||||
rm -f Makefile
|
||||
test -f $tmpdir/Makefile.x && mv $tmpdir/Makefile.x Makefile
|
||||
|
||||
# Restore OLD version information, then no need for trap.
|
||||
|
||||
14
bin/snapshot
14
bin/snapshot
@@ -199,6 +199,9 @@ while [ $# -gt 0 ] ; do
|
||||
check-vfd)
|
||||
CHECKVAL=check-vfd
|
||||
;;
|
||||
yodconfigure)
|
||||
YODCONFIGURE=yes
|
||||
;;
|
||||
--*)
|
||||
OP_CONFIGURE="$OP_CONFIGURE $1"
|
||||
;;
|
||||
@@ -284,7 +287,14 @@ fi
|
||||
# Setup the proper configure option (--with-zlib) to use zlib library
|
||||
# provide ZLIB is non-empty.
|
||||
ZLIB=${ZLIB:+"--with-zlib="$ZLIB}
|
||||
CONFIGURE="./configure $ZLIB $OP_CONFIGURE"
|
||||
if [ -n "$YODCONFIGURE" ]; then
|
||||
cp configure configure.yod
|
||||
bin/yodconfigure configure.yod
|
||||
CONFIGURE="./configure.yod"
|
||||
else
|
||||
CONFIGURE="./configure"
|
||||
fi
|
||||
CONFIGURE="$CONFIGURE $ZLIB $OP_CONFIGURE"
|
||||
|
||||
# Execute the requests
|
||||
snapshot=yes
|
||||
@@ -412,7 +422,7 @@ if [ "$cmd" = "all" -o -n "$cmdtest" -o -n "$cmddiff" ]; then
|
||||
TIMESTAMP "check-install" && \
|
||||
${MAKE} check-install && DISKUSAGE \
|
||||
TIMESTAMP "uninstall" && \
|
||||
${MAKE} uninstall-all) && DISKUSAGE ; then
|
||||
${MAKE} uninstall-all && DISKUSAGE); then
|
||||
:
|
||||
else
|
||||
errcode=$?
|
||||
|
||||
20
bin/trace
20
bin/trace
@@ -36,7 +36,10 @@ $Source = "";
|
||||
"H5D_fill_time_t" => "Df",
|
||||
"H5D_fill_value_t" => "DF",
|
||||
"H5FD_mpio_chunk_opt_t" => "Dh",
|
||||
"H5D_mpio_actual_io_mode_t" => "Di",
|
||||
"H5D_layout_t" => "Dl",
|
||||
"H5D_mpio_no_collective_cause_t" => "Dn",
|
||||
"H5D_mpio_actual_chunk_opt_mode_t" => "Do",
|
||||
"H5D_space_status_t" => "Ds",
|
||||
"H5FD_mpio_xfer_t" => "Dt",
|
||||
"herr_t" => "e",
|
||||
@@ -44,6 +47,8 @@ $Source = "";
|
||||
"H5E_error_t" => "Ee",
|
||||
"H5E_type_t" => "Et",
|
||||
"H5F_close_degree_t" => "Fd",
|
||||
"H5F_file_space_type_t" => "Ff",
|
||||
"H5F_mem_t" => "Fm",
|
||||
"H5F_scope_t" => "Fs",
|
||||
"H5F_libver_t" => "Fv",
|
||||
"H5G_obj_t" => "Go",
|
||||
@@ -59,6 +64,7 @@ $Source = "";
|
||||
"int32_t" => "Is",
|
||||
"unsigned" => "Iu",
|
||||
"unsigned int" => "Iu",
|
||||
"uint32_t" => "Iu",
|
||||
"H5I_type_t" => "It",
|
||||
"H5G_link_t" => "Ll", #Same as H5L_type_t now
|
||||
"H5L_type_t" => "Ll",
|
||||
@@ -84,6 +90,8 @@ $Source = "";
|
||||
"H5T_sign_t" => "Ts",
|
||||
"H5T_class_t" => "Tt",
|
||||
"H5T_str_t" => "Tz",
|
||||
"unsigned long" => "Ul",
|
||||
"unsigned long long" => "UL",
|
||||
"void" => "x",
|
||||
"FILE" => "x",
|
||||
"H5A_operator_t" => "x",
|
||||
@@ -91,25 +99,32 @@ $Source = "";
|
||||
"H5A_operator2_t" => "x",
|
||||
"H5A_info_t" => "x",
|
||||
"H5AC_cache_config_t" => "x",
|
||||
"H5D_gather_func_t" => "x",
|
||||
"H5D_operator_t" => "x",
|
||||
"H5D_scatter_func_t" => "x",
|
||||
"H5E_auto_t" => "x",
|
||||
"H5E_auto1_t" => "x",
|
||||
"H5E_auto2_t" => "x",
|
||||
"H5E_walk_t" => "x",
|
||||
"H5E_walk1_t" => "x",
|
||||
"H5E_walk2_t" => "x",
|
||||
"H5F_info_t" => "x",
|
||||
"H5F_info1_t" => "x",
|
||||
"H5F_info2_t" => "x",
|
||||
"H5FD_t" => "x",
|
||||
"H5FD_class_t" => "x",
|
||||
"H5FD_stream_fapl_t" => "x",
|
||||
"H5FD_file_image_callbacks_t" => "x",
|
||||
"H5G_iterate_t" => "x",
|
||||
"H5G_info_t" => "x",
|
||||
"H5I_free_t" => "x",
|
||||
"H5L_class_t" => "x",
|
||||
"H5L_elink_traverse_t" => "x",
|
||||
"H5L_iterate_t" => "x",
|
||||
"H5MM_allocate_t" => "x",
|
||||
"H5MM_free_t" => "x",
|
||||
"H5O_info_t" => "x",
|
||||
"H5O_iterate_t" => "x",
|
||||
"H5O_mcdt_search_cb_t" => "x",
|
||||
"H5P_cls_create_func_t" => "x",
|
||||
"H5P_cls_copy_func_t" => "x",
|
||||
"H5P_cls_close_func_t" => "x",
|
||||
@@ -212,6 +227,9 @@ sub rewrite_func ($$$$$) {
|
||||
my %names;
|
||||
|
||||
for $arg (@args) {
|
||||
if($arg=~/\w*\.{3}\w*/){
|
||||
next;
|
||||
}
|
||||
unless ($arg=~/^(([a-z_A-Z]\w*\s+)+\**)
|
||||
([a-z_A-Z]\w*)(\[.*?\])?
|
||||
(\s*\/\*\s*(in|out|in_out)\s*\*\/)?\s*$/x) {
|
||||
|
||||
53
c++/CMakeLists.txt
Normal file
53
c++/CMakeLists.txt
Normal file
@@ -0,0 +1,53 @@
|
||||
cmake_minimum_required (VERSION 2.8.10)
|
||||
PROJECT (HDF5_CPP)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Apply Definitions to compiler in this directory and below
|
||||
#-----------------------------------------------------------------------------
|
||||
ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Shared/Static Libs
|
||||
#-----------------------------------------------------------------------------
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
SET (CPP_BUILT_AS_DYNAMIC_LIB 1)
|
||||
ELSE (BUILD_SHARED_LIBS)
|
||||
SET (CPP_BUILT_AS_STATIC_LIB 1)
|
||||
ENDIF (BUILD_SHARED_LIBS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Generate configure file
|
||||
#-----------------------------------------------------------------------------
|
||||
CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
|
||||
${HDF5_BINARY_DIR}/H5cxx_pubconf.h
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Setup Include directories
|
||||
#-----------------------------------------------------------------------------
|
||||
INCLUDE_DIRECTORIES (${HDF5_CPP_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Parallel/MPI, prevent spurious cpp/cxx warnings
|
||||
#-----------------------------------------------------------------------------
|
||||
IF (H5_HAVE_PARALLEL)
|
||||
ADD_DEFINITIONS ("-DMPICH_SKIP_MPICXX")
|
||||
ADD_DEFINITIONS ("-DMPICH_IGNORE_CXX_SEEK")
|
||||
ENDIF (H5_HAVE_PARALLEL)
|
||||
|
||||
ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/src ${HDF5_CPP_BINARY_DIR}/src)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Build the CPP Examples
|
||||
#-----------------------------------------------------------------------------
|
||||
IF (HDF5_BUILD_EXAMPLES)
|
||||
ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/examples ${HDF5_CPP_BINARY_DIR}/examples)
|
||||
ENDIF (HDF5_BUILD_EXAMPLES)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Build the CPP unit tests
|
||||
#-----------------------------------------------------------------------------
|
||||
IF (BUILD_TESTING)
|
||||
ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/test ${HDF5_CPP_BINARY_DIR}/test)
|
||||
ENDIF (BUILD_TESTING)
|
||||
2
c++/COPYING
Executable file → Normal file
2
c++/COPYING
Executable file → Normal file
@@ -1,5 +1,5 @@
|
||||
|
||||
Copyright by The HDF Group (THG) and
|
||||
Copyright by The HDF Group and
|
||||
The Board of Trustees of the University of Illinois.
|
||||
All rights reserved.
|
||||
|
||||
|
||||
394
c++/Makefile.in
394
c++/Makefile.in
@@ -1,8 +1,8 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.12.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -31,9 +31,27 @@
|
||||
# Top-level HDF5-C++ Makefile(.in)
|
||||
#
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
@@ -49,17 +67,31 @@ POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/bin/mkinstalldirs \
|
||||
$(top_srcdir)/config/commence.am \
|
||||
$(top_srcdir)/config/conclude.am COPYING
|
||||
TESTS =
|
||||
subdir = c++
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/H5config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
@@ -69,42 +101,87 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||
distdir
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__tty_colors_dummy = \
|
||||
mgn= red= grn= lgn= blu= brg= std=; \
|
||||
am__color_tests=no
|
||||
am__tty_colors = $(am__tty_colors_dummy)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
|
||||
AMTAR = @AMTAR@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used when building hdf5,
|
||||
# but which should not be exported to h5cc for building other programs.
|
||||
# AM_CFLAGS is an automake construct which should be used by Makefiles
|
||||
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
|
||||
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
|
||||
AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
|
||||
AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
|
||||
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
|
||||
AM_MAKEFLAGS = @AM_MAKEFLAGS@
|
||||
AR = @AR@
|
||||
|
||||
# Set the paths for AFS installs of autotools for Linux machines
|
||||
# Ideally, these tools should never be needed during the build.
|
||||
AUTOCONF = /home1/packages/autoconf/autoconf-2.60/bin/autoconf
|
||||
AUTOHEADER = /home1/packages/autoconf/autoconf-2.60/bin/autoheader
|
||||
AUTOMAKE = /home1/packages/automake/automake-1.9.6/bin/automake-1.9
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BYTESEX = @BYTESEX@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CC_VERSION = @CC_VERSION@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
|
||||
# but which shouldn't be exported to h5cc for building other programs.
|
||||
CFLAGS = @CFLAGS@ @H5_CFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CLEARFILEBUF = @CLEARFILEBUF@
|
||||
CODESTACK = @CODESTACK@
|
||||
CONFIG_DATE = @CONFIG_DATE@
|
||||
CONFIG_MODE = @CONFIG_MODE@
|
||||
CONFIG_USER = @CONFIG_USER@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CXX_VERSION = @CXX_VERSION@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEBUG_PKG = @DEBUG_PKG@
|
||||
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
|
||||
@@ -112,6 +189,7 @@ DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
|
||||
DIRECT_VFD = @DIRECT_VFD@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
DYNAMIC_DIRS = @DYNAMIC_DIRS@
|
||||
@@ -127,9 +205,11 @@ F9XMODEXT = @F9XMODEXT@
|
||||
F9XMODFLAG = @F9XMODFLAG@
|
||||
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
|
||||
FC = @FC@
|
||||
FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
|
||||
FC2003 = @FC2003@
|
||||
FCFLAGS = @FCFLAGS@
|
||||
FCFLAGS_f90 = @FCFLAGS_f90@
|
||||
FCLIBS = @FCLIBS@
|
||||
FC_VERSION = @FC_VERSION@
|
||||
FGREP = @FGREP@
|
||||
FILTERS = @FILTERS@
|
||||
FSEARCH_DIRS = @FSEARCH_DIRS@
|
||||
@@ -138,15 +218,21 @@ GREP = @GREP@
|
||||
H5_CFLAGS = @H5_CFLAGS@
|
||||
H5_CPPFLAGS = @H5_CPPFLAGS@
|
||||
H5_CXXFLAGS = @H5_CXXFLAGS@
|
||||
H5_CXX_SHARED = @H5_CXX_SHARED@
|
||||
H5_FCFLAGS = @H5_FCFLAGS@
|
||||
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
|
||||
H5_LDFLAGS = @H5_LDFLAGS@
|
||||
H5_LONE_COLON = @H5_LONE_COLON@
|
||||
H5_VERSION = @H5_VERSION@
|
||||
HADDR_T = @HADDR_T@
|
||||
HAVE_DMALLOC = @HAVE_DMALLOC@
|
||||
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
|
||||
HAVE_PTHREAD = @HAVE_PTHREAD@
|
||||
HDF5_HL = @HDF5_HL@
|
||||
HDF5_INTERFACES = @HDF5_INTERFACES@
|
||||
HDF_CXX = @HDF_CXX@
|
||||
HDF_FORTRAN = @HDF_FORTRAN@
|
||||
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
|
||||
HID_T = @HID_T@
|
||||
HL = @HL@
|
||||
HL_FOR = @HL_FOR@
|
||||
@@ -159,12 +245,12 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTRUMENT = @INSTRUMENT@
|
||||
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
|
||||
LARGEFILE = @LARGEFILE@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LINUX_LFS = @LINUX_LFS@
|
||||
LIPO = @LIPO@
|
||||
LL_PATH = @LL_PATH@
|
||||
LN_S = @LN_S@
|
||||
@@ -172,6 +258,7 @@ LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_STATIC_EXEC = @LT_STATIC_EXEC@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPE = @MPE@
|
||||
MPI_GET_SIZE = @MPI_GET_SIZE@
|
||||
@@ -187,11 +274,11 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PARALLEL = @PARALLEL@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PTHREAD = @PTHREAD@
|
||||
RANLIB = @RANLIB@
|
||||
ROOT = @ROOT@
|
||||
RUNPARALLEL = @RUNPARALLEL@
|
||||
@@ -222,10 +309,12 @@ USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
|
||||
USE_FILTER_SZIP = @USE_FILTER_SZIP@
|
||||
USINGMEMCHECKER = @USINGMEMCHECKER@
|
||||
VERSION = @VERSION@
|
||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
@@ -244,6 +333,8 @@ build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
docdir = $(exec_prefix)/doc
|
||||
dvidir = @dvidir@
|
||||
enable_shared = @enable_shared@
|
||||
@@ -255,16 +346,13 @@ host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
includedir = $(exec_prefix)/include
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
@@ -277,6 +365,7 @@ sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@@ -286,12 +375,12 @@ CP = cp
|
||||
|
||||
# Some machines need a command to run executables; this is that command
|
||||
# so that our tests will run.
|
||||
# We use RUNTESTS instead of RUNSERIAL directly because it may be that
|
||||
# We use RUNEXEC instead of RUNSERIAL directly because it may be that
|
||||
# some tests need to be run with a different command. Older versions
|
||||
# of the makefiles used the command
|
||||
# $(LIBTOOL) --mode=execute
|
||||
# in some directories, for instance.
|
||||
RUNTESTS = $(RUNSERIAL)
|
||||
RUNEXEC = $(RUNSERIAL)
|
||||
|
||||
# Libraries to link to while building
|
||||
LIBHDF5 = $(top_builddir)/src/libhdf5.la
|
||||
@@ -304,14 +393,25 @@ 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
|
||||
# insert tracing macros.
|
||||
@@ -335,6 +435,10 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
|
||||
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
|
||||
$(EXTRA_PROG)
|
||||
|
||||
chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
|
||||
TEST_EXTENSIONS = .sh
|
||||
SH_LOG_COMPILER = $(SHELL)
|
||||
AM_SH_LOG_FLAGS =
|
||||
TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
|
||||
TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
|
||||
TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
|
||||
@@ -346,14 +450,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/Makefile
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
@@ -363,6 +467,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
$(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am:
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
@@ -371,6 +476,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@@ -379,13 +485,13 @@ clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
@@ -394,7 +500,11 @@ $(RECURSIVE_TARGETS):
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
@@ -402,50 +512,23 @@ $(RECURSIVE_TARGETS):
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
cscopelist-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
@@ -453,14 +536,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
@@ -472,7 +555,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
@@ -481,29 +564,48 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
@@ -524,29 +626,41 @@ distdir: $(DISTFILES)
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
@@ -567,16 +681,22 @@ install-am: all-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@@ -595,6 +715,8 @@ dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
@@ -603,18 +725,28 @@ install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am: installcheck-local
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
@@ -636,23 +768,24 @@ ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
|
||||
install-strip
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \
|
||||
cscopelist-recursive ctags-recursive install-am install-strip \
|
||||
tags-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am all-local check check-TESTS check-am clean \
|
||||
clean-generic clean-libtool ctags ctags-recursive distclean \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installcheck-local installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool \
|
||||
mostlyclean-local pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am
|
||||
clean-generic clean-libtool cscopelist cscopelist-recursive \
|
||||
ctags ctags-recursive distclean distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installcheck-local installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
|
||||
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
|
||||
|
||||
|
||||
# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
|
||||
@@ -686,7 +819,7 @@ check-clean ::
|
||||
# build files in this directory.
|
||||
build-lib: $(LIB)
|
||||
build-progs: $(LIB) $(PROGS)
|
||||
build-tests: $(LIB) $(PROGS) $(TESTS)
|
||||
build-tests: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
|
||||
# General rule for recursive building targets.
|
||||
# BUILT_SOURCES contain targets that need to be built before anything else
|
||||
@@ -712,7 +845,7 @@ check-clean ::
|
||||
# Tell Automake to build tests when the user types `make all' (this is
|
||||
# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
|
||||
# Automake won't build them automatically, either.
|
||||
all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(TESTS)
|
||||
all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
|
||||
|
||||
# make install-doc doesn't do anything outside of doc directory, but
|
||||
# Makefiles should recognize it.
|
||||
@@ -736,7 +869,7 @@ check-install: installcheck
|
||||
# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop.
|
||||
# The timestamps give a rough idea how much time the tests use.
|
||||
#
|
||||
# Note that targets in TESTS (defined above) will be built when the user
|
||||
# Note that targets in chk_TESTS (defined above) will be built when the user
|
||||
# types 'make tests' or 'make check', but only programs in TEST_PROG,
|
||||
# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed.
|
||||
check-TESTS: test
|
||||
@@ -746,7 +879,7 @@ test _test:
|
||||
@$(MAKE) build-check-p
|
||||
|
||||
# Actual execution of check-s.
|
||||
build-check-s: $(LIB) $(PROGS) $(TESTS)
|
||||
build-check-s: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
|
||||
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
|
||||
fi
|
||||
@@ -782,7 +915,7 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
|
||||
fi; \
|
||||
echo "============================" >> $${log}; \
|
||||
srcdir="$(srcdir)" \
|
||||
$(TIME) $(RUNTESTS) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
|
||||
$(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
|
||||
&& touch $(@:.chkexe_=.chkexe) || \
|
||||
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
|
||||
(cat $${log} && false) || exit 1; \
|
||||
@@ -836,7 +969,7 @@ $(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
|
||||
fi
|
||||
|
||||
# Actual execution of check-p.
|
||||
build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
|
||||
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
|
||||
fi
|
||||
@@ -853,7 +986,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
@for test in $(TEST_PROG_PARA) dummy; do \
|
||||
if test $$test != dummy; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
|
||||
RUNTESTS="$(RUNPARALLEL)" || exit 1; \
|
||||
RUNEXEC="$(RUNPARALLEL)" || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@for test in $(TEST_SCRIPT_PARA) dummy; do \
|
||||
@@ -866,7 +999,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
fi
|
||||
|
||||
# Run test with different Virtual File Driver
|
||||
check-vfd: $(LIB) $(PROGS) $(TESTS)
|
||||
check-vfd: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@for vfd in $(VFD_LIST) dummy; do \
|
||||
if test $$vfd != dummy; then \
|
||||
echo "============================"; \
|
||||
@@ -876,6 +1009,7 @@ check-vfd: $(LIB) $(PROGS) $(TESTS)
|
||||
HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
54
c++/examples/CMakeLists.txt
Normal file
54
c++/examples/CMakeLists.txt
Normal file
@@ -0,0 +1,54 @@
|
||||
cmake_minimum_required (VERSION 2.8.10)
|
||||
# --------------------------------------------------------------------
|
||||
# Notes: When creating examples they should be prefixed
|
||||
# with "cpp_ex_". This allows for easier filtering of the examples.
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
PROJECT (HDF5_CPP_EXAMPLES)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Define examples
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
SET (examples
|
||||
create
|
||||
readdata
|
||||
writedata
|
||||
compound
|
||||
extend_ds
|
||||
chunks
|
||||
h5group
|
||||
)
|
||||
|
||||
FOREACH (example ${examples})
|
||||
ADD_EXECUTABLE (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
|
||||
TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE})
|
||||
TARGET_LINK_LIBRARIES (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
|
||||
SET_TARGET_PROPERTIES (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
|
||||
ENDFOREACH (example ${examples})
|
||||
|
||||
IF (BUILD_TESTING)
|
||||
# Remove any output file left over from previous test run
|
||||
ADD_TEST (
|
||||
NAME cpp_ex-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
Group.h5
|
||||
SDS.h5
|
||||
SDScompound.h5
|
||||
SDSextendible.h5
|
||||
Select.h5
|
||||
)
|
||||
IF (NOT "${last_test}" STREQUAL "")
|
||||
SET_TESTS_PROPERTIES (cpp_ex-clear-objects PROPERTIES DEPENDS ${last_test})
|
||||
ENDIF (NOT "${last_test}" STREQUAL "")
|
||||
SET (last_test "cpp_ex-clear-objects")
|
||||
|
||||
FOREACH (example ${examples})
|
||||
ADD_TEST (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
|
||||
IF (NOT "${last_test}" STREQUAL "")
|
||||
SET_TESTS_PROPERTIES (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
|
||||
ENDIF (NOT "${last_test}" STREQUAL "")
|
||||
SET (last_test "cpp_ex_${example}")
|
||||
ENDFOREACH (example ${examples})
|
||||
ENDIF (BUILD_TESTING)
|
||||
@@ -23,12 +23,13 @@ include $(top_srcdir)/config/commence.am
|
||||
|
||||
# These are the programs that 'make all' or 'make prog' will build and
|
||||
# which 'make check' will run. List them in the order they should be run.
|
||||
TEST_PROG=create readdata writedata compound extend_ds chunks h5group
|
||||
EXAMPLE_PROG=create readdata writedata compound extend_ds chunks h5group
|
||||
TEST_SCRIPT=testh5c++.sh
|
||||
|
||||
# These are the example files to be installed
|
||||
INSTALL_FILES=create.cpp readdata.cpp writedata.cpp compound.cpp \
|
||||
INSTALL_FILES=create.cpp readdata.cpp writedata.cpp compound.cpp \
|
||||
extend_ds.cpp chunks.cpp h5group.cpp
|
||||
INSTALL_SCRIPT_FILES = run-c++-ex.sh
|
||||
|
||||
# Some of the examples depend on files created by running other examples
|
||||
readdata.chkexe_: create.chkexe_
|
||||
@@ -38,7 +39,8 @@ chunks.chkexe_: extend_ds.chkexe_
|
||||
CXX_API=yes
|
||||
|
||||
# Where to install examples
|
||||
EXAMPLEDIR=$(docdir)/hdf5/examples/c++
|
||||
# Note: no '/' after DESTDIR. Explanation in commence.am
|
||||
EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/c++
|
||||
|
||||
# How to build programs using h5c++
|
||||
$(EXTRA_PROG): $(H5CPP)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.12.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -35,9 +35,27 @@
|
||||
# built using h5cc (or h5fc, etc.) instead of the standard compilers.
|
||||
# This creates some extra work for us.
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
@@ -53,52 +71,84 @@ POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/testh5c++.sh.in $(top_srcdir)/config/commence.am \
|
||||
$(srcdir)/run-c++-ex.sh.in $(srcdir)/testh5c++.sh.in \
|
||||
$(top_srcdir)/bin/mkinstalldirs \
|
||||
$(top_srcdir)/config/commence.am \
|
||||
$(top_srcdir)/config/conclude.am \
|
||||
$(top_srcdir)/config/examples.am
|
||||
TESTS =
|
||||
TESTS = $(TEST_SCRIPT)
|
||||
subdir = c++/examples
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/H5config.h
|
||||
CONFIG_CLEAN_FILES = testh5c++.sh
|
||||
CONFIG_CLEAN_FILES = run-c++-ex.sh testh5c++.sh
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tty_colors_dummy = \
|
||||
mgn= red= grn= lgn= blu= brg= std=; \
|
||||
am__color_tests=no
|
||||
am__tty_colors = $(am__tty_colors_dummy)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
|
||||
AMTAR = @AMTAR@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used when building hdf5,
|
||||
# but which should not be exported to h5cc for building other programs.
|
||||
# AM_CFLAGS is an automake construct which should be used by Makefiles
|
||||
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
|
||||
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
|
||||
AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
|
||||
AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
|
||||
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
|
||||
AM_MAKEFLAGS = @AM_MAKEFLAGS@
|
||||
AR = @AR@
|
||||
|
||||
# Set the paths for AFS installs of autotools for Linux machines
|
||||
# Ideally, these tools should never be needed during the build.
|
||||
AUTOCONF = /home1/packages/autoconf/autoconf-2.60/bin/autoconf
|
||||
AUTOHEADER = /home1/packages/autoconf/autoconf-2.60/bin/autoheader
|
||||
AUTOMAKE = /home1/packages/automake/automake-1.9.6/bin/automake-1.9
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BYTESEX = @BYTESEX@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CC_VERSION = @CC_VERSION@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
|
||||
# but which shouldn't be exported to h5cc for building other programs.
|
||||
CFLAGS = @CFLAGS@ @H5_CFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CLEARFILEBUF = @CLEARFILEBUF@
|
||||
CODESTACK = @CODESTACK@
|
||||
CONFIG_DATE = @CONFIG_DATE@
|
||||
CONFIG_MODE = @CONFIG_MODE@
|
||||
CONFIG_USER = @CONFIG_USER@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CXX_VERSION = @CXX_VERSION@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEBUG_PKG = @DEBUG_PKG@
|
||||
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
|
||||
@@ -106,6 +156,7 @@ DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
|
||||
DIRECT_VFD = @DIRECT_VFD@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
DYNAMIC_DIRS = @DYNAMIC_DIRS@
|
||||
@@ -121,9 +172,11 @@ F9XMODEXT = @F9XMODEXT@
|
||||
F9XMODFLAG = @F9XMODFLAG@
|
||||
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
|
||||
FC = @FC@
|
||||
FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
|
||||
FC2003 = @FC2003@
|
||||
FCFLAGS = @FCFLAGS@
|
||||
FCFLAGS_f90 = @FCFLAGS_f90@
|
||||
FCLIBS = @FCLIBS@
|
||||
FC_VERSION = @FC_VERSION@
|
||||
FGREP = @FGREP@
|
||||
FILTERS = @FILTERS@
|
||||
FSEARCH_DIRS = @FSEARCH_DIRS@
|
||||
@@ -132,15 +185,21 @@ GREP = @GREP@
|
||||
H5_CFLAGS = @H5_CFLAGS@
|
||||
H5_CPPFLAGS = @H5_CPPFLAGS@
|
||||
H5_CXXFLAGS = @H5_CXXFLAGS@
|
||||
H5_CXX_SHARED = @H5_CXX_SHARED@
|
||||
H5_FCFLAGS = @H5_FCFLAGS@
|
||||
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
|
||||
H5_LDFLAGS = @H5_LDFLAGS@
|
||||
H5_LONE_COLON = @H5_LONE_COLON@
|
||||
H5_VERSION = @H5_VERSION@
|
||||
HADDR_T = @HADDR_T@
|
||||
HAVE_DMALLOC = @HAVE_DMALLOC@
|
||||
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
|
||||
HAVE_PTHREAD = @HAVE_PTHREAD@
|
||||
HDF5_HL = @HDF5_HL@
|
||||
HDF5_INTERFACES = @HDF5_INTERFACES@
|
||||
HDF_CXX = @HDF_CXX@
|
||||
HDF_FORTRAN = @HDF_FORTRAN@
|
||||
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
|
||||
HID_T = @HID_T@
|
||||
HL = @HL@
|
||||
HL_FOR = @HL_FOR@
|
||||
@@ -153,12 +212,12 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTRUMENT = @INSTRUMENT@
|
||||
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
|
||||
LARGEFILE = @LARGEFILE@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LINUX_LFS = @LINUX_LFS@
|
||||
LIPO = @LIPO@
|
||||
LL_PATH = @LL_PATH@
|
||||
LN_S = @LN_S@
|
||||
@@ -166,6 +225,7 @@ LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_STATIC_EXEC = @LT_STATIC_EXEC@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPE = @MPE@
|
||||
MPI_GET_SIZE = @MPI_GET_SIZE@
|
||||
@@ -181,11 +241,11 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PARALLEL = @PARALLEL@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PTHREAD = @PTHREAD@
|
||||
RANLIB = @RANLIB@
|
||||
ROOT = @ROOT@
|
||||
RUNPARALLEL = @RUNPARALLEL@
|
||||
@@ -216,10 +276,12 @@ USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
|
||||
USE_FILTER_SZIP = @USE_FILTER_SZIP@
|
||||
USINGMEMCHECKER = @USINGMEMCHECKER@
|
||||
VERSION = @VERSION@
|
||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
@@ -238,6 +300,8 @@ build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
docdir = $(exec_prefix)/doc
|
||||
dvidir = @dvidir@
|
||||
enable_shared = @enable_shared@
|
||||
@@ -249,16 +313,13 @@ host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
includedir = $(exec_prefix)/include
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
@@ -271,6 +332,7 @@ sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@@ -280,12 +342,12 @@ CP = cp
|
||||
|
||||
# Some machines need a command to run executables; this is that command
|
||||
# so that our tests will run.
|
||||
# We use RUNTESTS instead of RUNSERIAL directly because it may be that
|
||||
# We use RUNEXEC instead of RUNSERIAL directly because it may be that
|
||||
# some tests need to be run with a different command. Older versions
|
||||
# of the makefiles used the command
|
||||
# $(LIBTOOL) --mode=execute
|
||||
# in some directories, for instance.
|
||||
RUNTESTS = $(RUNSERIAL)
|
||||
RUNEXEC = $(RUNSERIAL)
|
||||
|
||||
# Libraries to link to while building
|
||||
LIBHDF5 = $(top_builddir)/src/libhdf5.la
|
||||
@@ -298,14 +360,25 @@ 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
|
||||
# insert tracing macros.
|
||||
@@ -318,28 +391,29 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
|
||||
|
||||
# These are the programs that 'make all' or 'make prog' will build and
|
||||
# which 'make check' will run. List them in the order they should be run.
|
||||
TEST_PROG = create readdata writedata compound extend_ds chunks h5group
|
||||
EXAMPLE_PROG = create readdata writedata compound extend_ds chunks h5group
|
||||
TEST_SCRIPT = testh5c++.sh
|
||||
|
||||
# These are the example files to be installed
|
||||
INSTALL_FILES = create.cpp readdata.cpp writedata.cpp compound.cpp \
|
||||
INSTALL_FILES = create.cpp readdata.cpp writedata.cpp compound.cpp \
|
||||
extend_ds.cpp chunks.cpp h5group.cpp
|
||||
|
||||
INSTALL_SCRIPT_FILES = run-c++-ex.sh
|
||||
|
||||
# Tell conclude.am that these are C++ tests.
|
||||
CXX_API = yes
|
||||
|
||||
# Where to install examples
|
||||
EXAMPLEDIR = $(docdir)/hdf5/examples/c++
|
||||
# Note: no '/' after DESTDIR. Explanation in commence.am
|
||||
EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/c++
|
||||
|
||||
# Assume that all tests in this directory are examples, and tell
|
||||
# conclude.am when to build them.
|
||||
EXAMPLE_PROG = $(TEST_PROG_PARA) $(TEST_PROG)
|
||||
EXTRA_PROG = $(EXAMPLE_PROG)
|
||||
EXTRA_PROG = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
|
||||
|
||||
# We need to tell automake what to clean
|
||||
MOSTLYCLEANFILES = *.raw *.meta *.o
|
||||
CLEANFILES = $(TEST_PROG) $(TEST_PROG_PARA)
|
||||
CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
|
||||
|
||||
# Automake needs to be taught how to build lib, progs, and tests targets.
|
||||
# These will be filled in automatically for the most part (e.g.,
|
||||
@@ -352,6 +426,10 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
|
||||
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
|
||||
$(EXTRA_PROG)
|
||||
|
||||
chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
|
||||
TEST_EXTENSIONS = .sh
|
||||
SH_LOG_COMPILER = $(SHELL)
|
||||
AM_SH_LOG_FLAGS =
|
||||
TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
|
||||
TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
|
||||
TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
|
||||
@@ -363,14 +441,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/examples/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/examples/Makefile
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/examples/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/examples/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
@@ -380,6 +458,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
$(top_srcdir)/config/commence.am $(top_srcdir)/config/examples.am $(top_srcdir)/config/conclude.am:
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
@@ -388,6 +467,9 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
run-c++-ex.sh: $(top_builddir)/config.status $(srcdir)/run-c++-ex.sh.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
testh5c++.sh: $(top_builddir)/config.status $(srcdir)/testh5c++.sh.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
@@ -402,6 +484,8 @@ TAGS:
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
@@ -419,13 +503,17 @@ distdir: $(DISTFILES)
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@@ -444,10 +532,15 @@ install-am: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
@@ -456,6 +549,7 @@ clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@@ -474,6 +568,8 @@ dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
@@ -482,18 +578,28 @@ install-data-am: install-data-local
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am: installcheck-local
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
@@ -515,7 +621,7 @@ ps-am:
|
||||
|
||||
uninstall-am: uninstall-local
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: all all-am all-local check check-TESTS check-am clean \
|
||||
clean-generic clean-libtool distclean distclean-generic \
|
||||
@@ -565,6 +671,8 @@ h5group: $(srcdir)/h5group.cpp
|
||||
# How to create EXAMPLEDIR if it doesn't already exist
|
||||
$(EXAMPLEDIR):
|
||||
-$(top_srcdir)/bin/mkdirs $@
|
||||
$(EXAMPLETOPDIR):
|
||||
-$(top_srcdir)/bin/mkdirs $@
|
||||
|
||||
# Install and uninstall rules. We install the source files, not the
|
||||
# example programs themselves.
|
||||
@@ -573,16 +681,42 @@ install-data-local:
|
||||
uninstall-local:
|
||||
@$(MAKE) $(AM_MAKEFLAGS) uninstall-examples
|
||||
|
||||
install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
|
||||
install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
|
||||
@for f in X $(INSTALL_FILES); do \
|
||||
if test $$f != X; then \
|
||||
(set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\
|
||||
(set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
|
||||
chmod a-x $(EXAMPLEDIR)/$$f; \
|
||||
fi; \
|
||||
done
|
||||
@for f in X $(INSTALL_SCRIPT_FILES); do \
|
||||
if test $$f != X; then \
|
||||
(set -x; $(INSTALL) $$f $(EXAMPLEDIR)/. || exit 1);\
|
||||
fi; \
|
||||
done
|
||||
@for f in X $(INSTALL_TOP_FILES); do \
|
||||
if test $$f != X; then \
|
||||
(set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \
|
||||
chmod a-x $(EXAMPLETOPDIR)/$$f;\
|
||||
fi; \
|
||||
done
|
||||
@for f in X $(INSTALL_TOP_SCRIPT_FILES); do \
|
||||
if test $$f != X; then \
|
||||
(set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \
|
||||
fi; \
|
||||
done
|
||||
|
||||
uninstall-examples:
|
||||
@if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
|
||||
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
|
||||
@if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
|
||||
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
|
||||
fi
|
||||
@if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \
|
||||
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \
|
||||
fi
|
||||
@if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \
|
||||
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \
|
||||
fi
|
||||
@if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \
|
||||
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \
|
||||
fi
|
||||
|
||||
installcheck-local:
|
||||
@@ -600,7 +734,7 @@ installcheck-local:
|
||||
# build files in this directory.
|
||||
build-lib: $(LIB)
|
||||
build-progs: $(LIB) $(PROGS)
|
||||
build-tests: $(LIB) $(PROGS) $(TESTS)
|
||||
build-tests: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
|
||||
# General rule for recursive building targets.
|
||||
# BUILT_SOURCES contain targets that need to be built before anything else
|
||||
@@ -626,7 +760,7 @@ check-clean ::
|
||||
# Tell Automake to build tests when the user types `make all' (this is
|
||||
# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
|
||||
# Automake won't build them automatically, either.
|
||||
all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(TESTS)
|
||||
all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
|
||||
|
||||
# make install-doc doesn't do anything outside of doc directory, but
|
||||
# Makefiles should recognize it.
|
||||
@@ -650,7 +784,7 @@ check-install: installcheck
|
||||
# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop.
|
||||
# The timestamps give a rough idea how much time the tests use.
|
||||
#
|
||||
# Note that targets in TESTS (defined above) will be built when the user
|
||||
# Note that targets in chk_TESTS (defined above) will be built when the user
|
||||
# types 'make tests' or 'make check', but only programs in TEST_PROG,
|
||||
# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed.
|
||||
check-TESTS: test
|
||||
@@ -660,7 +794,7 @@ test _test:
|
||||
@$(MAKE) build-check-p
|
||||
|
||||
# Actual execution of check-s.
|
||||
build-check-s: $(LIB) $(PROGS) $(TESTS)
|
||||
build-check-s: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
|
||||
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
|
||||
fi
|
||||
@@ -696,7 +830,7 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
|
||||
fi; \
|
||||
echo "============================" >> $${log}; \
|
||||
srcdir="$(srcdir)" \
|
||||
$(TIME) $(RUNTESTS) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
|
||||
$(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
|
||||
&& touch $(@:.chkexe_=.chkexe) || \
|
||||
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
|
||||
(cat $${log} && false) || exit 1; \
|
||||
@@ -750,7 +884,7 @@ $(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
|
||||
fi
|
||||
|
||||
# Actual execution of check-p.
|
||||
build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
|
||||
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
|
||||
fi
|
||||
@@ -767,7 +901,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
@for test in $(TEST_PROG_PARA) dummy; do \
|
||||
if test $$test != dummy; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
|
||||
RUNTESTS="$(RUNPARALLEL)" || exit 1; \
|
||||
RUNEXEC="$(RUNPARALLEL)" || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@for test in $(TEST_SCRIPT_PARA) dummy; do \
|
||||
@@ -780,7 +914,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
fi
|
||||
|
||||
# Run test with different Virtual File Driver
|
||||
check-vfd: $(LIB) $(PROGS) $(TESTS)
|
||||
check-vfd: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@for vfd in $(VFD_LIST) dummy; do \
|
||||
if test $$vfd != dummy; then \
|
||||
echo "============================"; \
|
||||
@@ -790,6 +924,7 @@ check-vfd: $(LIB) $(PROGS) $(TESTS)
|
||||
HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
93
c++/examples/run-c++-ex.sh.in
Normal file
93
c++/examples/run-c++-ex.sh.in
Normal file
@@ -0,0 +1,93 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Copyright by The HDF Group.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
# terms governing use, modification, and redistribution, is contained in
|
||||
# the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
# of the source code distribution tree; Copyright.html can be found at the
|
||||
# root level of an installed copy of the electronic HDF5 document set and
|
||||
# is linked from the top-level documents page. It can also be found at
|
||||
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
|
||||
# access to either file, you may request a copy from help@hdfgroup.org.
|
||||
|
||||
#
|
||||
# This file: run-c++-ex.sh
|
||||
# Written by: Larry Knox
|
||||
# Date: May 11, 2010
|
||||
#
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# This script will compile and run the c++ examples from source files #
|
||||
# installed in .../share/hdf5_examples/c++ using h5c++. The #
|
||||
# order for running programs with RunTest in the MAIN section below is taken #
|
||||
# from the Makefile. The order is important since some of the test programs #
|
||||
# use data files created by earlier test programs. Any future additions should #
|
||||
# be placed accordingly. #
|
||||
# #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
|
||||
# Initializations
|
||||
EXIT_SUCCESS=0
|
||||
EXIT_FAILURE=1
|
||||
|
||||
# Where the tool is installed.
|
||||
# default is relative path to installed location of the tools
|
||||
prefix="${prefix:-../../../}"
|
||||
AR="@AR@"
|
||||
RANLIB="@RANLIB@"
|
||||
H5TOOL="h5c++" # The tool name
|
||||
H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary
|
||||
|
||||
#### Run test ####
|
||||
RunTest()
|
||||
{
|
||||
TEST_EXEC=$1
|
||||
Test=$1".cpp"
|
||||
|
||||
echo
|
||||
echo "################# $1 #################"
|
||||
${H5TOOL_BIN} -o $TEST_EXEC $Test
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "messed up compiling $Test"
|
||||
exit 1
|
||||
fi
|
||||
./$TEST_EXEC
|
||||
}
|
||||
|
||||
|
||||
|
||||
################## MAIN ##################
|
||||
|
||||
# Run tests
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
if (RunTest create &&\
|
||||
rm create &&\
|
||||
RunTest readdata &&\
|
||||
rm readdata &&\
|
||||
RunTest writedata &&\
|
||||
rm writedata &&\
|
||||
RunTest compound &&\
|
||||
rm compound &&\
|
||||
RunTest extend_ds &&\
|
||||
rm extend_ds &&\
|
||||
RunTest chunks &&\
|
||||
rm chunks &&\
|
||||
RunTest h5group &&\
|
||||
rm h5group); then
|
||||
EXIT_VALUE=${EXIT_SUCCESS}
|
||||
else
|
||||
EXIT_VALUE=${EXIT_FAILURE}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Cleanup
|
||||
rm *.o
|
||||
rm *.h5
|
||||
echo
|
||||
|
||||
exit $EXIT_VALUE
|
||||
|
||||
25
c++/examples/testh5c++.sh.in
Executable file → Normal file
25
c++/examples/testh5c++.sh.in
Executable file → Normal file
@@ -19,29 +19,30 @@
|
||||
# Modification:
|
||||
#
|
||||
|
||||
srcdir=@srcdir@
|
||||
|
||||
# Initializations
|
||||
TESTNAME=h5c++
|
||||
EXIT_SUCCESS=0
|
||||
EXIT_FAILURE=1
|
||||
|
||||
# Where the tool is installed.
|
||||
prefix="${prefix:-@prefix@}"
|
||||
AR=@AR@
|
||||
RANLIB=@RANLIB@
|
||||
AR="@AR@"
|
||||
RANLIB="@RANLIB@"
|
||||
H5TOOL="h5c++" # The tool name
|
||||
H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary
|
||||
|
||||
CMP='cmp -s'
|
||||
DIFF='diff -c'
|
||||
|
||||
nerrors=0
|
||||
nerrors=$EXIT_SUCCESS
|
||||
verbose=yes
|
||||
|
||||
# setup my machine information.
|
||||
myos=`uname -s`
|
||||
myhostnama=`uname -n`
|
||||
|
||||
# The build (current) directory might be different than the source directory.
|
||||
if test -z "$srcdir"; then
|
||||
srcdir=.
|
||||
fi
|
||||
|
||||
# Generate some source files and library for tests.
|
||||
suffix=cpp # source file suffix
|
||||
hdf5main=${H5TOOL}_hdf5main.$suffix
|
||||
@@ -271,7 +272,9 @@ if test -z "$HDF5_NOCLEANUP"; then
|
||||
fi
|
||||
|
||||
if test $nerrors -eq 0 ; then
|
||||
echo "All $H5TOOL tests passed."
|
||||
echo "All $TESTNAME tests passed."
|
||||
exit $EXIT_SUCCESS
|
||||
else
|
||||
echo "$TESTNAME tests failed with $nerrors errors."
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
|
||||
exit $nerrors
|
||||
|
||||
120
c++/src/CMakeLists.txt
Normal file
120
c++/src/CMakeLists.txt
Normal file
@@ -0,0 +1,120 @@
|
||||
cmake_minimum_required (VERSION 2.8.10)
|
||||
PROJECT (HDF5_CPP_SRC)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Shared/Static Libs
|
||||
#-----------------------------------------------------------------------------
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
SET (CPP_BUILT_AS_DYNAMIC_LIB 1)
|
||||
ENDIF (BUILD_SHARED_LIBS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Generate configure file
|
||||
#-----------------------------------------------------------------------------
|
||||
CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
|
||||
${HDF5_BINARY_DIR}/H5cxx_pubconf.h
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Define cpp Library
|
||||
#-----------------------------------------------------------------------------
|
||||
SET (CPP_SRCS
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5AbstractDs.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5ArrayType.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5AtomType.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Attribute.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5CommonFG.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5CompType.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5DataSet.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5DataSpace.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5DataType.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5DcreatProp.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5DxferProp.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5EnumType.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Exception.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5FaccProp.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5FcreatProp.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5File.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5FloatType.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Group.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5IdComponent.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5IntType.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Library.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Location.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Object.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5PredType.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5PropList.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5StrType.cpp
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.cpp
|
||||
)
|
||||
|
||||
SET (CPP_HDRS
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5AbstractDs.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Alltypes.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5ArrayType.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5AtomType.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Attribute.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Classes.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5CommonFG.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5CompType.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Cpp.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5CppDoc.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5DataSet.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5DataSpace.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5DataType.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5DcreatProp.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5DxferProp.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5EnumType.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Exception.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5FaccProp.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5FcreatProp.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5File.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5FloatType.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Group.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5IdComponent.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Include.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5IntType.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Library.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Location.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5Object.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5PredType.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5PropList.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5StrType.h
|
||||
${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.h
|
||||
)
|
||||
|
||||
ADD_LIBRARY (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} ${CPP_SRCS} ${CPP_HDRS})
|
||||
TARGET_LINK_LIBRARIES (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
|
||||
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}")
|
||||
H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} ${LIB_TYPE})
|
||||
SET_TARGET_PROPERTIES (${HDF5_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/cpp)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add file(s) to CMake Install
|
||||
#-----------------------------------------------------------------------------
|
||||
INSTALL (
|
||||
FILES
|
||||
${CPP_HDRS}
|
||||
DESTINATION
|
||||
${HDF5_INSTALL_INCLUDE_DIR}/cpp
|
||||
COMPONENT
|
||||
cppheaders
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add Target(s) to CMake Install for import into other projects
|
||||
#-----------------------------------------------------------------------------
|
||||
IF (HDF5_EXPORTED_TARGETS)
|
||||
|
||||
INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} cpplibraries)
|
||||
|
||||
INSTALL (
|
||||
TARGETS
|
||||
${HDF5_CPP_LIB_TARGET}
|
||||
EXPORT
|
||||
${HDF5_EXPORTED_TARGETS}
|
||||
LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries
|
||||
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries
|
||||
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT cpplibraries
|
||||
)
|
||||
ENDIF (HDF5_EXPORTED_TARGETS)
|
||||
@@ -76,15 +76,26 @@ H5T_class_t AbstractDs::getTypeClass() const
|
||||
|
||||
// Gets the class of the datatype and validate it before returning
|
||||
H5T_class_t type_class = H5Tget_class(datatype_id);
|
||||
if( type_class != H5T_NO_CLASS )
|
||||
return( type_class );
|
||||
else
|
||||
|
||||
// Close temporary datatype_id
|
||||
herr_t ret_value = H5Tclose(datatype_id);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
if (fromClass() == "DataSet")
|
||||
throw DataTypeIException("DataSet::getTypeClass", "H5Tclose failed");
|
||||
else if (fromClass() == "Attribute")
|
||||
throw DataTypeIException("Attribute::getTypeClass", "H5Tclose failed");
|
||||
}
|
||||
|
||||
// Check on the returned type_class
|
||||
if (type_class == H5T_NO_CLASS)
|
||||
{
|
||||
if (fromClass() == "DataSet")
|
||||
throw DataTypeIException("DataSet::getTypeClass", "H5Tget_class returns H5T_NO_CLASS");
|
||||
else if (fromClass() == "Attribute")
|
||||
throw DataTypeIException("Attribute::getTypeClass", "H5Tget_class returns H5T_NO_CLASS");
|
||||
}
|
||||
return(type_class);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -51,6 +51,9 @@ class H5_DLLCPP AbstractDs {
|
||||
StrType getStrType() const;
|
||||
VarLenType getVarLenType() const;
|
||||
|
||||
// Gets the size in memory of this abstract dataset.
|
||||
virtual size_t getInMemDataSize() const = 0;
|
||||
|
||||
// Gets the dataspace of this abstract dataset - pure virtual.
|
||||
virtual DataSpace getSpace() const = 0;
|
||||
|
||||
@@ -62,7 +65,7 @@ class H5_DLLCPP AbstractDs {
|
||||
// dataset - pure virtual.
|
||||
virtual hsize_t getStorageSize() const = 0;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass() const = 0;
|
||||
|
||||
// Copy constructor
|
||||
|
||||
@@ -36,7 +36,7 @@ class H5_DLLCPP ArrayType : public DataType {
|
||||
// Returns the sizes of dimensions of this array datatype.
|
||||
int getArrayDims(hsize_t* dims);
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("ArrayType"); }
|
||||
|
||||
// Copy constructor: makes copy of the original object.
|
||||
|
||||
@@ -98,7 +98,7 @@ H5T_order_t AtomType::getOrder() const
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: AtomType::getOrder
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes a reference to a \c std::string for the buffer that
|
||||
/// It takes a reference to a \c H5std_string for the buffer that
|
||||
/// provide the text description of the returned byte order.
|
||||
/// The text description can be either of the following:
|
||||
/// "Little endian byte ordering (0)";
|
||||
@@ -178,7 +178,7 @@ size_t AtomType::getPrecision() const
|
||||
///\exception H5::DataTypeIException
|
||||
///\par Description
|
||||
/// For information, please see C layer Reference Manuat at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetPrecision
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetPrecision
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void AtomType::setPrecision( size_t precision ) const
|
||||
@@ -198,7 +198,7 @@ void AtomType::setPrecision( size_t precision ) const
|
||||
///\exception H5::DataTypeIException
|
||||
///\par Description
|
||||
/// For information, please see C layer Reference Manuat at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-GetOffset
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-GetOffset
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// 12/05/00: due to C API change
|
||||
@@ -225,7 +225,7 @@ int AtomType::getOffset() const
|
||||
///\exception H5::DataTypeIException
|
||||
///\par Description
|
||||
/// For information, please see C layer Reference Manuat at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetOffset
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetOffset
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void AtomType::setOffset( size_t offset ) const
|
||||
|
||||
@@ -57,7 +57,7 @@ class H5_DLLCPP AtomType : public DataType {
|
||||
// Sets the total size for an atomic datatype.
|
||||
void setSize( size_t size ) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("AtomType"); }
|
||||
|
||||
// Copy constructor - makes copy of the original object
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "H5DataSpace.h"
|
||||
#include "H5File.h"
|
||||
#include "H5Attribute.h"
|
||||
#include "H5private.h" // for HDfree
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -95,23 +96,40 @@ void Attribute::write( const DataType& mem_type, const void *buf ) const
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::write
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It writes a \a std::string to this attribute.
|
||||
/// It writes a \a H5std_string to this attribute.
|
||||
///\param mem_type - IN: Attribute datatype (in memory)
|
||||
///\param strg - IN: Data to be written
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Apr, 2003
|
||||
//--------------------------------------------------------------------------
|
||||
void Attribute::write( const DataType& mem_type, const H5std_string& strg ) const
|
||||
void Attribute::write(const DataType& mem_type, const H5std_string& strg) const
|
||||
{
|
||||
// Convert string to C-string
|
||||
const char* strg_C;
|
||||
strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str
|
||||
// Check if this attribute has variable-len string or fixed-len string and
|
||||
// proceed appropriately.
|
||||
htri_t is_variable_len = H5Tis_variable_str(mem_type.getId());
|
||||
if (is_variable_len < 0)
|
||||
{
|
||||
throw AttributeIException("Attribute::write", "H5Tis_variable_str failed");
|
||||
}
|
||||
// Convert string to C-string
|
||||
const char* strg_C;
|
||||
strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str
|
||||
herr_t ret_value = 0;
|
||||
|
||||
herr_t ret_value = H5Awrite( id, mem_type.getId(), &strg_C );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw AttributeIException("Attribute::write", "H5Awrite failed");
|
||||
}
|
||||
// Pass string in differently depends on variable or fixed length
|
||||
if (!is_variable_len)
|
||||
{
|
||||
ret_value = H5Awrite(id, mem_type.getId(), strg_C);
|
||||
}
|
||||
else
|
||||
{
|
||||
// passing third argument by address
|
||||
ret_value = H5Awrite(id, mem_type.getId(), &strg_C);
|
||||
}
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw AttributeIException("Attribute::write", "H5Awrite failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -127,14 +145,14 @@ void Attribute::read( const DataType& mem_type, void *buf ) const
|
||||
herr_t ret_value = H5Aread( id, mem_type.getId(), buf );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw AttributeIException("Attribute::read", "H5Aread failed");
|
||||
throw AttributeIException("Attribute::read", "H5Aread failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::read
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It reads a \a std::string from this attribute.
|
||||
/// It reads a \a H5std_string from this attribute.
|
||||
///\param mem_type - IN: Attribute datatype (in memory)
|
||||
///\param strg - IN: Buffer for read string
|
||||
///\exception H5::AttributeIException
|
||||
@@ -144,32 +162,96 @@ void Attribute::read( const DataType& mem_type, void *buf ) const
|
||||
// Corrected a misunderstanding that H5Aread would allocate
|
||||
// space for the buffer. Obtained the attribute size and
|
||||
// allocated memory properly. - BMR
|
||||
// Apr 2009
|
||||
// Used getInMemDataSize to get attribute data size. - BMR
|
||||
// Jul 2009
|
||||
// Divided into specific private functions for fixed- and
|
||||
// variable-len string data: p_read_fixed_len and
|
||||
// p_read_variable_len. This should improve readability.
|
||||
//--------------------------------------------------------------------------
|
||||
void Attribute::read( const DataType& mem_type, H5std_string& strg ) const
|
||||
void Attribute::read(const DataType& mem_type, H5std_string& strg) const
|
||||
{
|
||||
// Get the attribute size and allocate temporary C-string for C API
|
||||
hsize_t attr_size = H5Aget_storage_size(id);
|
||||
if (attr_size <= 0)
|
||||
{
|
||||
throw AttributeIException("Attribute::read", "Unable to get attribute size before reading");
|
||||
}
|
||||
char* strg_C = new char [(size_t)attr_size+1];
|
||||
if (strg_C == NULL)
|
||||
{
|
||||
throw AttributeIException("Attribute::read", "Unable to allocate buffer to read the attribute");
|
||||
}
|
||||
// Check if this attribute has variable-len string or fixed-len string and
|
||||
// proceed appropriately.
|
||||
htri_t is_variable_len = H5Tis_variable_str(mem_type.getId());
|
||||
if (is_variable_len < 0)
|
||||
{
|
||||
throw AttributeIException("Attribute::read", "H5Tis_variable_str failed");
|
||||
}
|
||||
|
||||
// Call C API to get the attribute data, a string of chars
|
||||
herr_t ret_value = H5Aread(id, mem_type.getId(), &strg_C);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw AttributeIException("Attribute::read", "H5Aread failed");
|
||||
}
|
||||
if (!is_variable_len) // only allocate for fixed-len string
|
||||
{
|
||||
p_read_fixed_len(mem_type, strg);
|
||||
}
|
||||
else
|
||||
{
|
||||
p_read_variable_len(mem_type, strg);
|
||||
}
|
||||
}
|
||||
|
||||
// Get 'string' from the C char* and release resource
|
||||
strg_C[attr_size] = '\0';
|
||||
strg = strg_C;
|
||||
delete []strg_C;
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::getInMemDataSize
|
||||
///\brief Gets the size in memory of the attribute's data.
|
||||
///\return Size of data (in memory)
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Apr 2009
|
||||
//--------------------------------------------------------------------------
|
||||
size_t Attribute::getInMemDataSize() const
|
||||
{
|
||||
const char *func = "Attribute::getInMemDataSize";
|
||||
|
||||
// Get the data type of this attribute
|
||||
hid_t mem_type_id = H5Aget_type(id);
|
||||
if( mem_type_id < 0 )
|
||||
{
|
||||
throw AttributeIException(func, "H5Aget_type failed");
|
||||
}
|
||||
|
||||
// Get the data type's size by first getting its native type then getting
|
||||
// the native type's size.
|
||||
hid_t native_type = H5Tget_native_type(mem_type_id, H5T_DIR_DEFAULT);
|
||||
if (native_type < 0)
|
||||
{
|
||||
throw AttributeIException(func, "H5Tget_native_type failed");
|
||||
}
|
||||
size_t type_size = H5Tget_size(native_type);
|
||||
if (type_size == 0)
|
||||
{
|
||||
throw AttributeIException(func, "H5Tget_size failed");
|
||||
}
|
||||
|
||||
// Close the native type and the datatype of this attribute.
|
||||
if (H5Tclose(native_type) < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Tclose(native_type) failed");
|
||||
}
|
||||
if (H5Tclose(mem_type_id) < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Tclose(mem_type_id) failed");
|
||||
}
|
||||
|
||||
// Get number of elements of the attribute by first getting its dataspace
|
||||
// then getting the number of elements in the dataspace
|
||||
hid_t space_id = H5Aget_space(id);
|
||||
if (space_id < 0)
|
||||
{
|
||||
throw AttributeIException(func, "H5Aget_space failed");
|
||||
}
|
||||
hssize_t num_elements = H5Sget_simple_extent_npoints(space_id);
|
||||
if (num_elements < 0)
|
||||
{
|
||||
throw AttributeIException(func, "H5Sget_simple_extent_npoints failed");
|
||||
}
|
||||
|
||||
// Close the dataspace
|
||||
if (H5Sclose(space_id) < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Sclose failed");
|
||||
}
|
||||
|
||||
// Calculate and return the size of the data
|
||||
size_t data_size = type_size * num_elements;
|
||||
return(data_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -196,26 +278,6 @@ DataSpace Attribute::getSpace() const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::p_get_type (private)
|
||||
// Purpose Gets the datatype of this attribute.
|
||||
// Return Id of the datatype
|
||||
// Exception H5::AttributeIException
|
||||
// Description
|
||||
// This private function is used in AbstractDs.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t Attribute::p_get_type() const
|
||||
{
|
||||
hid_t type_id = H5Aget_type( id );
|
||||
if( type_id > 0 )
|
||||
return( type_id );
|
||||
else
|
||||
{
|
||||
throw AttributeIException("", "H5Aget_type failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::getFileName
|
||||
///\brief Gets the name of the file, in which this attribute belongs.
|
||||
@@ -322,6 +384,31 @@ hsize_t Attribute::getStorageSize() const
|
||||
return (storage_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::flush
|
||||
///\brief Flushes all buffers associated with a file specified by
|
||||
/// this attribute, to disk.
|
||||
///\param scope - IN: Specifies the scope of the flushing action,
|
||||
/// which can be either of these values:
|
||||
/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
|
||||
/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
|
||||
///\exception H5::AttributeIException
|
||||
///\par Description
|
||||
/// This attribute is used to identify the file to be flushed.
|
||||
// Programmer Binh-Minh Ribler - 2012
|
||||
// Modification
|
||||
// Sep 2012 - BMR
|
||||
// Duplicated from H5Location
|
||||
//--------------------------------------------------------------------------
|
||||
void Attribute::flush(H5F_scope_t scope) const
|
||||
{
|
||||
herr_t ret_value = H5Fflush(getId(), scope);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw AttributeIException("Attribute::flush", "H5Fflush failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::getId
|
||||
// Purpose: Get the id of this attribute
|
||||
@@ -337,26 +424,112 @@ hid_t Attribute::getId() const
|
||||
return(id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::p_get_type (private)
|
||||
// Purpose Gets the datatype of this attribute.
|
||||
// Return Id of the datatype
|
||||
// Exception H5::AttributeIException
|
||||
// Description
|
||||
// This private function is used in AbstractDs.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t Attribute::p_get_type() const
|
||||
{
|
||||
hid_t type_id = H5Aget_type( id );
|
||||
if( type_id > 0 )
|
||||
return( type_id );
|
||||
else
|
||||
{
|
||||
throw AttributeIException("", "H5Aget_type failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::p_read_fixed_len (private)
|
||||
// brief Reads a fixed length \a H5std_string from an attribute.
|
||||
// param mem_type - IN: Attribute datatype (in memory)
|
||||
// param strg - IN: Buffer for read string
|
||||
// exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2009
|
||||
// Modification
|
||||
// Jul 2009
|
||||
// Separated the fixed length case from the original
|
||||
// Attribute::read
|
||||
//--------------------------------------------------------------------------
|
||||
void Attribute::p_read_fixed_len(const DataType& mem_type, H5std_string& strg) const
|
||||
{
|
||||
// Only allocate for fixed-len string.
|
||||
|
||||
// Get the size of the attribute's data
|
||||
size_t attr_size = getInMemDataSize();
|
||||
|
||||
// If there is data, allocate buffer and read it.
|
||||
if (attr_size > 0)
|
||||
{
|
||||
char *strg_C = new char[(size_t)attr_size+1];
|
||||
herr_t ret_value = H5Aread(id, mem_type.getId(), strg_C);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
delete []strg_C; // de-allocate for fixed-len string
|
||||
throw AttributeIException("Attribute::read", "H5Aread failed");
|
||||
}
|
||||
// Get string from the C char* and release resource allocated locally
|
||||
strg_C[attr_size] = '\0';
|
||||
strg = strg_C;
|
||||
delete []strg_C;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::p_read_variable_len (private)
|
||||
// brief Reads a variable length \a H5std_string from an attribute.
|
||||
// param mem_type - IN: Attribute datatype (in memory)
|
||||
// param strg - IN: Buffer for read string
|
||||
// exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2009
|
||||
// Modification
|
||||
// Jul 2009
|
||||
// Separated the variable length case from the original
|
||||
// Attribute::read
|
||||
//--------------------------------------------------------------------------
|
||||
void Attribute::p_read_variable_len(const DataType& mem_type, H5std_string& strg) const
|
||||
{
|
||||
// Prepare and call C API to read attribute.
|
||||
char *strg_C;
|
||||
|
||||
// Read attribute, no allocation for variable-len string; C library will
|
||||
herr_t ret_value = H5Aread(id, mem_type.getId(), &strg_C);
|
||||
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw AttributeIException("Attribute::read", "H5Aread failed");
|
||||
}
|
||||
|
||||
// Get string from the C char* and release resource allocated by C API
|
||||
strg = strg_C;
|
||||
HDfree(strg_C);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::p_setId
|
||||
///\brief Sets the identifier of this object to a new value.
|
||||
///
|
||||
///\exception H5::IdComponentException when the attempt to close the HDF5
|
||||
/// object fails
|
||||
/// object fails
|
||||
// Description:
|
||||
// The underlaying reference counting in the C library ensures
|
||||
// that the current valid id of this object is properly closed.
|
||||
// Then the object's id is reset to the new id.
|
||||
// The underlaying reference counting in the C library ensures
|
||||
// that the current valid id of this object is properly closed.
|
||||
// Then the object's id is reset to the new id.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void Attribute::p_setId(const hid_t new_id)
|
||||
{
|
||||
// handling references to this old id
|
||||
try {
|
||||
close();
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
throw AttributeIException("Attribute::p_setId", close_error.getDetailMsg());
|
||||
throw AttributeIException("Attribute::p_setId", close_error.getDetailMsg());
|
||||
}
|
||||
// reset object's id to the given id
|
||||
id = new_id;
|
||||
@@ -378,10 +551,8 @@ void Attribute::close()
|
||||
{
|
||||
throw AttributeIException("Attribute::close", "H5Aclose failed");
|
||||
}
|
||||
// reset the id when the attribute that it represents is no longer
|
||||
// referenced
|
||||
if (getCounter() == 0)
|
||||
id = 0;
|
||||
// reset the id
|
||||
id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,10 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
|
||||
virtual DataSpace getSpace() const;
|
||||
|
||||
// Returns the amount of storage size required for this attribute.
|
||||
hsize_t getStorageSize() const;
|
||||
virtual hsize_t getStorageSize() const;
|
||||
|
||||
// Returns the in memory size of this attribute's data.
|
||||
virtual size_t getInMemDataSize() const;
|
||||
|
||||
// Reads data from this attribute.
|
||||
void read( const DataType& mem_type, void *buf ) const;
|
||||
@@ -48,7 +51,11 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
|
||||
void write(const DataType& mem_type, const void *buf ) const;
|
||||
void write(const DataType& mem_type, const H5std_string& strg ) const;
|
||||
|
||||
// Returns this class name
|
||||
// Flushes all buffers associated with the file specified by this
|
||||
// attribute to disk
|
||||
void flush( H5F_scope_t scope ) const;
|
||||
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("Attribute"); }
|
||||
|
||||
// Creates a copy of an existing attribute using the attribute id
|
||||
@@ -79,6 +86,10 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
|
||||
// sub-types
|
||||
virtual hid_t p_get_type() const;
|
||||
|
||||
// Reads variable or fixed len strings from this attribute.
|
||||
void p_read_variable_len(const DataType& mem_type, H5std_string& strg) const;
|
||||
void p_read_fixed_len(const DataType& mem_type, H5std_string& strg) const;
|
||||
|
||||
// do not inherit H5Object::iterateAttrs
|
||||
int iterateAttrs() { return 0; }
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace H5 {
|
||||
#endif
|
||||
class Exception;
|
||||
class IdComponent;
|
||||
class H5Location;
|
||||
class H5Object;
|
||||
class PropList;
|
||||
class FileCreatPropList;
|
||||
|
||||
@@ -15,11 +15,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
// remove when done
|
||||
#include <iostream>
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
|
||||
#include "H5Include.h"
|
||||
#include "H5Exception.h"
|
||||
#include "H5IdComponent.h"
|
||||
@@ -36,6 +31,7 @@
|
||||
#include "H5DataSet.h"
|
||||
#include "H5File.h"
|
||||
#include "H5Alltypes.h"
|
||||
#include "H5private.h" // for HDstrcpy
|
||||
|
||||
// There are a few comments that are common to most of the functions
|
||||
// defined in this file so they are listed here.
|
||||
@@ -72,25 +68,29 @@ namespace H5 {
|
||||
//--------------------------------------------------------------------------
|
||||
Group CommonFG::createGroup( const char* name, size_t size_hint ) const
|
||||
{
|
||||
// Create group creation property list for size_hint
|
||||
hid_t gcpl_id = H5Pcreate(H5P_GROUP_CREATE);
|
||||
|
||||
// If the creation of the property list failed, throw an exception
|
||||
if( gcpl_id < 0 )
|
||||
throwException("createGroup", "H5Pcreate failed");
|
||||
// Group creation property list for size_hint
|
||||
hid_t gcpl_id = 0;
|
||||
|
||||
// Set the local heap size hint
|
||||
if( H5Pset_local_heap_size_hint(gcpl_id, size_hint) < 0) {
|
||||
H5Pclose(gcpl_id);
|
||||
throwException("createGroup", "H5Pset_local_heap_size failed");
|
||||
}
|
||||
if(!(size_hint == (size_t)-1 || size_hint == 0)) {
|
||||
|
||||
// If the creation of the property list failed, throw an exception
|
||||
if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
|
||||
throwException("createGroup", "H5Pcreate failed");
|
||||
|
||||
if( H5Pset_local_heap_size_hint(gcpl_id, size_hint) < 0) {
|
||||
H5Pclose(gcpl_id);
|
||||
throwException("createGroup", "H5Pset_local_heap_size failed");
|
||||
}
|
||||
}
|
||||
|
||||
// Call C routine H5Gcreate2 to create the named group, giving the
|
||||
// location id which can be a file id or a group id
|
||||
hid_t group_id = H5Gcreate2( getLocId(), name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT );
|
||||
|
||||
// Close the group creation property list
|
||||
H5Pclose(gcpl_id);
|
||||
// Close the group creation property list, if necessary
|
||||
if(gcpl_id > 0)
|
||||
H5Pclose(gcpl_id);
|
||||
|
||||
// If the creation of the group failed, throw an exception
|
||||
if( group_id < 0 )
|
||||
@@ -105,7 +105,7 @@ Group CommonFG::createGroup( const char* name, size_t size_hint ) const
|
||||
// Function: CommonFG::createGroup
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Group CommonFG::createGroup( const H5std_string& name, size_t size_hint ) const
|
||||
@@ -130,9 +130,7 @@ Group CommonFG::openGroup( const char* name ) const
|
||||
|
||||
// If the opening of the group failed, throw an exception
|
||||
if( group_id < 0 )
|
||||
{
|
||||
throwException("openGroup", "H5Gopen2 failed");
|
||||
}
|
||||
|
||||
// No failure, create and return the Group object
|
||||
Group group( group_id );
|
||||
@@ -143,7 +141,7 @@ Group CommonFG::openGroup( const char* name ) const
|
||||
// Function: CommonFG::openGroup
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Group CommonFG::openGroup( const H5std_string& name ) const
|
||||
@@ -174,9 +172,7 @@ DataSet CommonFG::createDataSet( const char* name, const DataType& data_type, co
|
||||
|
||||
// If the creation of the dataset failed, throw an exception
|
||||
if( dataset_id < 0 )
|
||||
{
|
||||
throwException("createDataSet", "H5Dcreate2 failed");
|
||||
}
|
||||
|
||||
// No failure, create and return the DataSet object
|
||||
DataSet dataset( dataset_id );
|
||||
@@ -187,7 +183,7 @@ DataSet CommonFG::createDataSet( const char* name, const DataType& data_type, co
|
||||
// Function: CommonFG::createDataSet
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet CommonFG::createDataSet( const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist ) const
|
||||
@@ -222,7 +218,7 @@ DataSet CommonFG::openDataSet( const char* name ) const
|
||||
// Function: CommonFG::openDataSet
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataSet CommonFG::openDataSet( const H5std_string& name ) const
|
||||
@@ -254,7 +250,7 @@ DataSet CommonFG::openDataSet( const H5std_string& name ) const
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::link( H5L_type_t link_type, const char* curr_name, const char* new_name ) const
|
||||
{
|
||||
herr_t ret_value;
|
||||
herr_t ret_value = -1;
|
||||
|
||||
switch(link_type) {
|
||||
case H5L_TYPE_HARD:
|
||||
@@ -271,16 +267,14 @@ void CommonFG::link( H5L_type_t link_type, const char* curr_name, const char* ne
|
||||
} /* end switch */
|
||||
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("link", "creating link failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::link
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a curr_name and \a new_name.
|
||||
/// \c H5std_string for \a curr_name and \a new_name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::link( H5L_type_t link_type, const H5std_string& curr_name, const H5std_string& new_name ) const
|
||||
@@ -301,16 +295,14 @@ void CommonFG::unlink( const char* name ) const
|
||||
{
|
||||
herr_t ret_value = H5Ldelete( getLocId(), name, H5P_DEFAULT );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("unlink", "H5Ldelete failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::unlink
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::unlink( const H5std_string& name ) const
|
||||
@@ -327,8 +319,8 @@ void CommonFG::unlink( const H5std_string& name ) const
|
||||
///\note
|
||||
/// Exercise care in moving groups as it is possible to render
|
||||
/// data in a file inaccessible with Group::move. Please refer
|
||||
/// to the Group Interface in the HDF5 User's Guide at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/Groups.html
|
||||
/// to the Group Interface in the HDF5 User's Guide for details at:
|
||||
/// http://www.hdfgroup.org/HDF5/doc/UG/UG_frame09Groups.html
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// 2007: QAK modified to use H5L APIs - BMR
|
||||
@@ -337,16 +329,14 @@ void CommonFG::move( const char* src, const char* dst ) const
|
||||
{
|
||||
herr_t ret_value = H5Lmove( getLocId(), src, H5L_SAME_LOC, dst, H5P_DEFAULT, H5P_DEFAULT );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("move", "H5Lmove failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::move
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a src and \a dst.
|
||||
/// \c H5std_string for \a src and \a dst.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::move( const H5std_string& src, const H5std_string& dst ) const
|
||||
@@ -365,23 +355,21 @@ void CommonFG::move( const H5std_string& src, const H5std_string& dst ) const
|
||||
///\par Description
|
||||
/// For more information, please refer to the C layer Reference
|
||||
/// Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5G.html#Group-GetObjinfo
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5G.html#Group-GetObjinfo
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::getObjinfo( const char* name, hbool_t follow_link, H5G_stat_t& statbuf ) const
|
||||
{
|
||||
herr_t ret_value = H5Gget_objinfo( getLocId(), name, follow_link, &statbuf );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("getObjinfo", "H5Gget_objinfo failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::getObjinfo
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::getObjinfo( const H5std_string& name, hbool_t follow_link, H5G_stat_t& statbuf ) const
|
||||
@@ -401,16 +389,14 @@ void CommonFG::getObjinfo( const char* name, H5G_stat_t& statbuf ) const
|
||||
{
|
||||
herr_t ret_value = H5Gget_objinfo( getLocId(), name, 0, &statbuf );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("getObjinfo", "H5Gget_objinfo failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::getObjinfo
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - Nov, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::getObjinfo( const H5std_string& name, H5G_stat_t& statbuf ) const
|
||||
@@ -430,23 +416,42 @@ void CommonFG::getObjinfo( const H5std_string& name, H5G_stat_t& statbuf ) const
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string CommonFG::getLinkval( const char* name, size_t size ) const
|
||||
{
|
||||
char* value_C = new char[size+1]; // temporary C-string for C API
|
||||
H5L_info_t linkinfo;
|
||||
char *value_C; // value in C string
|
||||
size_t val_size = size;
|
||||
H5std_string value = "";
|
||||
herr_t ret_value;
|
||||
|
||||
herr_t ret_value = H5Lget_val( getLocId(), name, value_C, size, H5P_DEFAULT );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("getLinkval", "H5Lget_val failed");
|
||||
}
|
||||
H5std_string value = H5std_string( value_C );
|
||||
delete []value_C;
|
||||
return( value );
|
||||
// if user doesn't provide buffer size, determine it
|
||||
if (size == 0)
|
||||
{
|
||||
ret_value = H5Lget_info(getLocId(), name, &linkinfo, H5P_DEFAULT);
|
||||
if( ret_value < 0 )
|
||||
throwException("getLinkval", "H5Lget_info to find buffer size failed");
|
||||
|
||||
val_size = linkinfo.u.val_size;
|
||||
}
|
||||
|
||||
// if link has value, retrieve the value, otherwise, return null string
|
||||
if (val_size > 0)
|
||||
{
|
||||
value_C = new char[val_size+1]; // temporary C-string for C API
|
||||
|
||||
ret_value = H5Lget_val(getLocId(), name, value_C, val_size, H5P_DEFAULT);
|
||||
if( ret_value < 0 )
|
||||
throwException("getLinkval", "H5Lget_val failed");
|
||||
|
||||
value = H5std_string(value_C);
|
||||
delete []value_C;
|
||||
}
|
||||
return(value);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::getLinkval
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string CommonFG::getLinkval( const H5std_string& name, size_t size ) const
|
||||
@@ -478,16 +483,14 @@ void CommonFG::setComment( const char* name, const char* comment ) const
|
||||
{
|
||||
herr_t ret_value = H5Oset_comment_by_name( getLocId(), name, comment, H5P_DEFAULT );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("setComment", "H5Oset_comment_by_name failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::setComment
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name and \a comment.
|
||||
/// \c H5std_string for \a name and \a comment.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::setComment( const H5std_string& name, const H5std_string& comment ) const
|
||||
@@ -510,16 +513,14 @@ void CommonFG::removeComment(const char* name) const
|
||||
{
|
||||
herr_t ret_value = H5Oset_comment_by_name(getLocId(), name, NULL, H5P_DEFAULT);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("removeComment", "H5Oset_comment_by_name failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::removeComment
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - May 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::removeComment(const H5std_string& name) const
|
||||
@@ -527,48 +528,6 @@ void CommonFG::removeComment(const H5std_string& name) const
|
||||
removeComment (name.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::getComment
|
||||
///\brief Retrieves comment for the specified object.
|
||||
///\param name - IN: Name of the object
|
||||
///\return Comment string
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - May 2005
|
||||
// 2007: QAK modified to use H5O APIs; however the first parameter is
|
||||
// no longer just file or group, this function should be moved
|
||||
// to another class to accommodate attribute, dataset, and named
|
||||
// datatype. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string CommonFG::getComment (const H5std_string& name) const
|
||||
{
|
||||
size_t bufsize = 256; // anticipating the comment's length
|
||||
hid_t loc_id = getLocId(); // temporary variable
|
||||
|
||||
// temporary C-string for the object's comment
|
||||
char* comment_C = new char[bufsize+1];
|
||||
ssize_t ret_value = H5Oget_comment_by_name(loc_id, name.c_str(), comment_C, bufsize, H5P_DEFAULT);
|
||||
|
||||
// if the actual length of the comment is longer than the anticipated
|
||||
// value, then call H5Oget_comment_by_name again with the correct value
|
||||
if ((size_t)ret_value > bufsize)
|
||||
{
|
||||
bufsize = ret_value;
|
||||
delete []comment_C;
|
||||
comment_C = new char[bufsize+1];
|
||||
ret_value = H5Oget_comment_by_name(loc_id, name.c_str(), comment_C, bufsize, H5P_DEFAULT);
|
||||
}
|
||||
|
||||
// if H5Oget_comment_by_name returns SUCCEED, return the string comment,
|
||||
// otherwise, throw an exception
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("getComment", "H5Oget_comment_by_name failed");
|
||||
}
|
||||
H5std_string comment = H5std_string(comment_C);
|
||||
delete []comment_C;
|
||||
return (comment);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::getComment
|
||||
///\brief Retrieves comment for the specified object and its comment's
|
||||
@@ -585,26 +544,43 @@ H5std_string CommonFG::getComment (const H5std_string& name) const
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string CommonFG::getComment( const char* name, size_t bufsize ) const
|
||||
{
|
||||
// temporary C-string for the object's comment
|
||||
char* comment_C = new char[bufsize+1];
|
||||
// bufsize is default to 256
|
||||
// temporary variable
|
||||
hid_t loc_id = getLocId(); // temporary variable
|
||||
|
||||
herr_t ret_value = H5Oget_comment_by_name( getLocId(), name, comment_C, bufsize, H5P_DEFAULT );
|
||||
// temporary C-string for the object's comment; bufsize already including
|
||||
// null character
|
||||
char* comment_C = new char[bufsize];
|
||||
ssize_t ret_value = H5Oget_comment_by_name(loc_id, name, comment_C, bufsize, H5P_DEFAULT);
|
||||
|
||||
// if H5Oget_comment_by_name returns SUCCEED, return the string comment
|
||||
if( ret_value < 0 )
|
||||
// if the actual length of the comment is longer than bufsize and bufsize
|
||||
// was the default value, i.e., not given by the user, then call
|
||||
// H5Oget_comment_by_name again with the correct value.
|
||||
// If the call to H5Oget_comment_by_name returned an error, skip this block
|
||||
// and throw an exception below.
|
||||
if (ret_value >= 0 && (size_t)ret_value > bufsize && bufsize == 256)
|
||||
{
|
||||
throwException("getComment", "H5Oget_comment_by_name failed");
|
||||
size_t new_size = ret_value;
|
||||
delete []comment_C;
|
||||
comment_C = new char[new_size]; // new_size including null terminator
|
||||
ret_value = H5Oget_comment_by_name(loc_id, name, comment_C, new_size, H5P_DEFAULT);
|
||||
}
|
||||
|
||||
// if H5Oget_comment_by_name returns SUCCEED, return the string comment,
|
||||
// otherwise, throw an exception
|
||||
if( ret_value < 0 )
|
||||
throwException("getComment", "H5Oget_comment_by_name failed");
|
||||
|
||||
H5std_string comment = H5std_string(comment_C);
|
||||
delete []comment_C;
|
||||
return( comment );
|
||||
return (comment);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::getComment
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string CommonFG::getComment( const H5std_string& name, size_t bufsize ) const
|
||||
@@ -632,16 +608,14 @@ void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const
|
||||
|
||||
// Raise exception if H5Fmount returns negative value
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("mount", "H5Fmount failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::mount
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::mount( const H5std_string& name, H5File& child, PropList& plist ) const
|
||||
@@ -663,16 +637,14 @@ void CommonFG::unmount( const char* name ) const
|
||||
|
||||
// Raise exception if H5Funmount returns negative value
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throwException("unmount", "H5Funmount failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::unmount
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void CommonFG::unmount( const H5std_string& name ) const
|
||||
@@ -707,7 +679,7 @@ DataType CommonFG::openDataType( const char* name ) const
|
||||
// Function: CommonFG::openDataType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
DataType CommonFG::openDataType( const H5std_string& name ) const
|
||||
@@ -742,7 +714,7 @@ ArrayType CommonFG::openArrayType( const char* name ) const
|
||||
// Function: CommonFG::openArrayType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - Jul, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
ArrayType CommonFG::openArrayType( const H5std_string& name ) const
|
||||
@@ -777,7 +749,7 @@ CompType CommonFG::openCompType( const char* name ) const
|
||||
// Function: CommonFG::openCompType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
CompType CommonFG::openCompType( const H5std_string& name ) const
|
||||
@@ -812,7 +784,7 @@ EnumType CommonFG::openEnumType( const char* name ) const
|
||||
// Function: CommonFG::openEnumType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
EnumType CommonFG::openEnumType( const H5std_string& name ) const
|
||||
@@ -847,7 +819,7 @@ IntType CommonFG::openIntType( const char* name ) const
|
||||
// Function: CommonFG::openIntType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
IntType CommonFG::openIntType( const H5std_string& name ) const
|
||||
@@ -882,7 +854,7 @@ FloatType CommonFG::openFloatType( const char* name ) const
|
||||
// Function: CommonFG::openFloatType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
FloatType CommonFG::openFloatType( const H5std_string& name ) const
|
||||
@@ -917,7 +889,7 @@ StrType CommonFG::openStrType( const char* name ) const
|
||||
// Function: CommonFG::openStrType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
StrType CommonFG::openStrType( const H5std_string& name ) const
|
||||
@@ -952,7 +924,7 @@ VarLenType CommonFG::openVarLenType( const char* name ) const
|
||||
// Function: CommonFG::openVarLenType
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - Jul, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
VarLenType CommonFG::openVarLenType( const H5std_string& name ) const
|
||||
@@ -988,7 +960,7 @@ int CommonFG::iterateElems( const char* name, int *idx, H5G_iterate_t op , void*
|
||||
// Function: CommonFG::iterateElems
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for \a name.
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
int CommonFG::iterateElems( const H5std_string& name, int *idx, H5G_iterate_t op , void* op_data )
|
||||
@@ -1010,9 +982,7 @@ hsize_t CommonFG::getNumObjs() const
|
||||
|
||||
herr_t ret_value = H5Gget_info(getLocId(), &ginfo);
|
||||
if(ret_value < 0)
|
||||
{
|
||||
throwException("getNumObjs", "H5Gget_info failed");
|
||||
}
|
||||
return (ginfo.nlinks);
|
||||
}
|
||||
|
||||
@@ -1036,9 +1006,7 @@ H5std_string CommonFG::getObjnameByIdx(hsize_t idx) const
|
||||
// call H5Lget_name_by_idx with name as NULL to get its length
|
||||
ssize_t name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, NULL, 0, H5P_DEFAULT);
|
||||
if(name_len < 0)
|
||||
{
|
||||
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
|
||||
}
|
||||
|
||||
// now, allocate C buffer to get the name
|
||||
char* name_C = new char[name_len+1];
|
||||
@@ -1067,14 +1035,29 @@ H5std_string CommonFG::getObjnameByIdx(hsize_t idx) const
|
||||
/// each time the group is opened.
|
||||
// Programmer Binh-Minh Ribler - January, 2003
|
||||
//--------------------------------------------------------------------------
|
||||
ssize_t CommonFG::getObjnameByIdx(hsize_t idx, char* name, size_t size) const
|
||||
{
|
||||
ssize_t name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name, size, H5P_DEFAULT);
|
||||
if(name_len < 0)
|
||||
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
|
||||
|
||||
return (name_len);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::getObjnameByIdx
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - January, 2003
|
||||
//--------------------------------------------------------------------------
|
||||
ssize_t CommonFG::getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const
|
||||
{
|
||||
char* name_C = new char[size];
|
||||
ssize_t name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name_C, size, H5P_DEFAULT);
|
||||
ssize_t name_len = getObjnameByIdx(idx, name_C, size);
|
||||
if(name_len < 0)
|
||||
{
|
||||
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
|
||||
}
|
||||
|
||||
name = H5std_string(name_C);
|
||||
delete []name_C;
|
||||
return (name_len);
|
||||
@@ -1094,9 +1077,8 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx) const
|
||||
{
|
||||
H5G_obj_t obj_type = H5Gget_objtype_by_idx(getLocId(), idx);
|
||||
if (obj_type == H5G_UNKNOWN)
|
||||
{
|
||||
throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
|
||||
}
|
||||
|
||||
return (obj_type);
|
||||
}
|
||||
|
||||
@@ -1104,7 +1086,33 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx) const
|
||||
// Function: CommonFG::getObjTypeByIdx
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function because it also provides
|
||||
/// the returned object type in text.
|
||||
/// the returned object type in text (char*)
|
||||
///\param idx - IN: Transient index of the object
|
||||
///\param type_name - IN: Object type in text
|
||||
///\return Object type
|
||||
///\exception H5::FileIException or H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - May, 2010
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, char* type_name) const
|
||||
{
|
||||
H5G_obj_t obj_type = H5Gget_objtype_by_idx(getLocId(), idx);
|
||||
switch (obj_type)
|
||||
{
|
||||
case H5G_LINK: HDstrcpy(type_name, "symbolic link"); break;
|
||||
case H5G_GROUP: HDstrcpy(type_name, "group"); break;
|
||||
case H5G_DATASET: HDstrcpy(type_name, "dataset"); break;
|
||||
case H5G_TYPE: HDstrcpy(type_name, "datatype"); break;
|
||||
case H5G_UNKNOWN:
|
||||
default:
|
||||
throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
|
||||
}
|
||||
return (obj_type);
|
||||
}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: CommonFG::getObjTypeByIdx
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function because it also provides
|
||||
/// the returned object type in text (H5std_string&)
|
||||
///\param idx - IN: Transient index of the object
|
||||
///\param type_name - IN: Object type in text
|
||||
///\return Object type
|
||||
@@ -1122,9 +1130,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const
|
||||
case H5G_TYPE: type_name = H5std_string("datatype"); break;
|
||||
case H5G_UNKNOWN:
|
||||
default:
|
||||
{
|
||||
throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
|
||||
}
|
||||
}
|
||||
return (obj_type);
|
||||
}
|
||||
|
||||
@@ -50,9 +50,8 @@ class H5_DLLCPP CommonFG {
|
||||
DataSet openDataSet(const H5std_string& name) const;
|
||||
|
||||
// Retrieves comment for the HDF5 object specified by its name.
|
||||
H5std_string getComment(const H5std_string& name) const;
|
||||
H5std_string getComment(const char* name, size_t bufsize) const;
|
||||
H5std_string getComment(const H5std_string& name, size_t bufsize) const;
|
||||
H5std_string getComment(const char* name, size_t bufsize=256) const;
|
||||
H5std_string getComment(const H5std_string& name, size_t bufsize=256) const;
|
||||
|
||||
// Removes the comment for the HDF5 object specified by its name.
|
||||
void removeComment(const char* name) const;
|
||||
@@ -62,22 +61,24 @@ class H5_DLLCPP CommonFG {
|
||||
void setComment(const char* name, const char* comment) const;
|
||||
void setComment(const H5std_string& name, const H5std_string& comment) const;
|
||||
|
||||
// Returns the name of the HDF5 object that the symbolic link points to.
|
||||
H5std_string getLinkval(const char* name, size_t size) const;
|
||||
H5std_string getLinkval(const H5std_string& name, size_t size) const;
|
||||
// Returns the value of a symbolic link.
|
||||
H5std_string getLinkval(const char* link_name, size_t size=0) const;
|
||||
H5std_string getLinkval(const H5std_string& link_name, size_t size=0) const;
|
||||
|
||||
// Returns the number of objects in this group.
|
||||
hsize_t getNumObjs() const;
|
||||
|
||||
// Retrieves the name of an object in this group, given the
|
||||
// object's index.
|
||||
ssize_t getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const;
|
||||
H5std_string getObjnameByIdx(hsize_t idx) const;
|
||||
ssize_t getObjnameByIdx(hsize_t idx, char* name, size_t size) const;
|
||||
ssize_t getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const;
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Returns the type of an object in this group, given the
|
||||
// object's index.
|
||||
H5G_obj_t getObjTypeByIdx(hsize_t idx) const;
|
||||
H5G_obj_t getObjTypeByIdx(hsize_t idx, char* type_name) const;
|
||||
H5G_obj_t getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const;
|
||||
|
||||
// Returns information about an HDF5 object, given by its name,
|
||||
|
||||
@@ -26,12 +26,21 @@ namespace H5 {
|
||||
|
||||
class H5_DLLCPP CompType : public DataType {
|
||||
public:
|
||||
// Default constructor
|
||||
CompType();
|
||||
|
||||
// Creates a compound datatype using an existing id
|
||||
CompType( const hid_t existing_id );
|
||||
|
||||
// Creates a new compound datatype, given the type's size
|
||||
CompType( size_t size ); // H5Tcreate
|
||||
|
||||
// Gets the compound datatype of the specified dataset
|
||||
CompType( const DataSet& dataset ); // H5Dget_type
|
||||
|
||||
// Copy constructor - makes a copy of original object
|
||||
CompType( const CompType& original );
|
||||
|
||||
// Returns the type class of the specified member of this compound
|
||||
// datatype. It provides to the user a way of knowing what type
|
||||
// to create another datatype of the same class
|
||||
@@ -88,18 +97,9 @@ class H5_DLLCPP CompType : public DataType {
|
||||
// Recursively removes padding from within this compound datatype.
|
||||
void pack() const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("CompType"); }
|
||||
|
||||
// Default constructor
|
||||
CompType();
|
||||
|
||||
// Creates a compound datatype using an existing id
|
||||
CompType( const hid_t existing_id );
|
||||
|
||||
// Copy constructor - makes a copy of original object
|
||||
CompType( const CompType& original );
|
||||
|
||||
// Noop destructor.
|
||||
virtual ~CompType();
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5DataSpace.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5Location.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5AbstractDs.h"
|
||||
#include "H5Attribute.h"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
* It is assumed that the user has knowledge of the HDF5 file format
|
||||
* and its components. If you are not familiar with HDF5 file format,
|
||||
* and would like to find out more, please refer to the HDF5 documentation
|
||||
* at http://hdf.ncsa.uiuc.edu/HDF5/doc/H5.intro.html
|
||||
* at http://www.hdfgroup.org/HDF5/doc/index.html
|
||||
*
|
||||
* Because the HDF5 library maps very well to
|
||||
* the object oriented design approach, classes in the C++ API can
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "H5File.h"
|
||||
#include "H5Attribute.h"
|
||||
#include "H5DataSet.h"
|
||||
#include "H5private.h" // for HDfree
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
@@ -78,7 +79,7 @@ DataSet::DataSet(const DataSet& original) : AbstractDs(original), H5Object(origi
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet overload constructor - dereference
|
||||
///\brief Given a reference, ref, to an hdf5 dataset, creates a
|
||||
///\brief Given a reference, ref, to an hdf5 dataset, creates a
|
||||
/// DataSet object
|
||||
///\param obj - IN: Dataset reference object is in or location of
|
||||
/// object that the dataset is located within.
|
||||
@@ -86,7 +87,7 @@ DataSet::DataSet(const DataSet& original) : AbstractDs(original), H5Object(origi
|
||||
///\param ref_type - IN: Reference type - default to H5R_OBJECT
|
||||
///\exception H5::DataSetIException
|
||||
///\par Description
|
||||
/// \c obj can be DataSet, Group, H5File, or named DataType, that
|
||||
/// \c obj can be DataSet, Group, H5File, or named DataType, that
|
||||
/// is a datatype that has been named by DataType::commit.
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
@@ -98,14 +99,14 @@ DataSet::DataSet(H5Object& obj, const void* ref, H5R_type_t ref_type) : Abstract
|
||||
try {
|
||||
id = p_dereference(obj.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("DataSet constructor - located by object",
|
||||
throw ReferenceException("DataSet constructor - located by object",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet overload constructor - dereference
|
||||
///\brief Given a reference, ref, to an hdf5 dataset, creates a
|
||||
///\brief Given a reference, ref, to an hdf5 dataset, creates a
|
||||
/// DataSet object
|
||||
///\param h5file - IN: Location referenced object is in
|
||||
///\param ref - IN: Reference pointer
|
||||
@@ -121,14 +122,14 @@ DataSet::DataSet(H5File& h5file, const void* ref, H5R_type_t ref_type) : Abstrac
|
||||
try {
|
||||
id = p_dereference(h5file.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("DataSet constructor - located by HDF5 file",
|
||||
throw ReferenceException("DataSet constructor - located by HDF5 file",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet overload constructor - dereference
|
||||
///\brief Given a reference, ref, to an hdf5 dataset, creates a
|
||||
///\brief Given a reference, ref, to an hdf5 dataset, creates a
|
||||
/// DataSet object
|
||||
///\param attr - IN: Specifying location where the referenced object is in
|
||||
///\param ref - IN: Reference pointer
|
||||
@@ -144,7 +145,7 @@ DataSet::DataSet(Attribute& attr, const void* ref, H5R_type_t ref_type) : Abstra
|
||||
try {
|
||||
id = p_dereference(attr.getId(), ref, ref_type);
|
||||
} catch (ReferenceException deref_error) {
|
||||
throw ReferenceException("DataSet constructor - located by attribute",
|
||||
throw ReferenceException("DataSet constructor - located by attribute",
|
||||
deref_error.getDetailMsg());
|
||||
}
|
||||
}
|
||||
@@ -219,6 +220,71 @@ hsize_t DataSet::getStorageSize() const
|
||||
return(storage_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::getInMemDataSize
|
||||
///\brief Gets the size in memory of the dataset's data.
|
||||
///\return Size of data (in memory)
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - Apr 2009
|
||||
//--------------------------------------------------------------------------
|
||||
size_t DataSet::getInMemDataSize() const
|
||||
{
|
||||
const char *func = "DataSet::getInMemDataSize";
|
||||
|
||||
// Get the data type of this dataset
|
||||
hid_t mem_type_id = H5Dget_type(id);
|
||||
if( mem_type_id < 0 )
|
||||
{
|
||||
throw DataSetIException(func, "H5Dget_type failed");
|
||||
}
|
||||
|
||||
// Get the data type's size by first getting its native type then getting
|
||||
// the native type's size.
|
||||
hid_t native_type = H5Tget_native_type(mem_type_id, H5T_DIR_DEFAULT);
|
||||
if (native_type < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Tget_native_type failed");
|
||||
}
|
||||
size_t type_size = H5Tget_size(native_type);
|
||||
if (type_size == 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Tget_size failed");
|
||||
}
|
||||
|
||||
// Close the native type and the datatype of this dataset.
|
||||
if (H5Tclose(native_type) < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Tclose(native_type) failed");
|
||||
}
|
||||
if (H5Tclose(mem_type_id) < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Tclose(mem_type_id) failed");
|
||||
}
|
||||
|
||||
// Get number of elements of the dataset by first getting its dataspace,
|
||||
// then getting the number of elements in the dataspace
|
||||
hid_t space_id = H5Dget_space(id);
|
||||
if (space_id < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Dget_space failed");
|
||||
}
|
||||
hssize_t num_elements = H5Sget_simple_extent_npoints(space_id);
|
||||
if (num_elements < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Sget_simple_extent_npoints failed");
|
||||
}
|
||||
|
||||
// Close the dataspace
|
||||
if (H5Sclose(space_id) < 0)
|
||||
{
|
||||
throw DataSetIException(func, "H5Sclose failed");
|
||||
}
|
||||
|
||||
// Calculate and return the size of the data
|
||||
size_t data_size = type_size * num_elements;
|
||||
return(data_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::getOffset
|
||||
///\brief Returns the address of this dataset in the file.
|
||||
@@ -363,21 +429,46 @@ void DataSet::read( void* buf, const DataType& mem_type, const DataSpace& mem_sp
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::read
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes a reference to a \c std::string for the buffer.
|
||||
/// It takes a reference to a \c H5std_string for the buffer.
|
||||
///\param buf - IN: Buffer for read data
|
||||
///\param mem_type - IN: Memory datatype
|
||||
///\param mem_space - IN: Memory dataspace
|
||||
///\param file_space - IN: Dataset's dataspace in the file
|
||||
///\param xfer_plist - IN: Transfer property list for this I/O operation
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// Jul 2009
|
||||
// Follow the change to Attribute::read and use the following
|
||||
// private functions to read datasets with fixed- and
|
||||
// variable-length string:
|
||||
// DataSet::p_read_fixed_len and
|
||||
// DataSet::p_read_variable_len
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::read( H5std_string& strg, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist ) const
|
||||
void DataSet::read(H5std_string& strg, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist) const
|
||||
{
|
||||
// Allocate C character string for reading
|
||||
size_t size = mem_type.getSize();
|
||||
char* strg_C = new char[size+1]; // temporary C-string for C API
|
||||
// Check if this dataset has variable-len string or fixed-len string and
|
||||
// proceed appropriately.
|
||||
htri_t is_variable_len = H5Tis_variable_str(mem_type.getId());
|
||||
if (is_variable_len < 0)
|
||||
{
|
||||
throw DataSetIException("DataSet::read", "H5Tis_variable_str failed");
|
||||
}
|
||||
|
||||
// Use the overloaded member to read
|
||||
read(strg_C, mem_type, mem_space, file_space, xfer_plist);
|
||||
// Obtain identifiers for C API
|
||||
hid_t mem_type_id = mem_type.getId();
|
||||
hid_t mem_space_id = mem_space.getId();
|
||||
hid_t file_space_id = file_space.getId();
|
||||
hid_t xfer_plist_id = xfer_plist.getId();
|
||||
|
||||
// Get the String and clean up
|
||||
strg = strg_C;
|
||||
delete []strg_C;
|
||||
if (!is_variable_len) // only allocate for fixed-len string
|
||||
{
|
||||
p_read_fixed_len(mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg);
|
||||
}
|
||||
else
|
||||
{
|
||||
p_read_variable_len(mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -414,17 +505,48 @@ void DataSet::write( const void* buf, const DataType& mem_type, const DataSpace&
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::write
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes a reference to a \c std::string for the buffer.
|
||||
/// It takes a reference to a \c H5std_string for the buffer.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// Jul 2009
|
||||
// Modified to pass the buffer into H5Dwrite properly depending
|
||||
// whether the dataset has variable- or fixed-length string.
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::write( const H5std_string& strg, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist ) const
|
||||
{
|
||||
// Convert string to C-string
|
||||
const char* strg_C;
|
||||
strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str
|
||||
// Check if this attribute has variable-len string or fixed-len string and
|
||||
// proceed appropriately.
|
||||
htri_t is_variable_len = H5Tis_variable_str(mem_type.getId());
|
||||
if (is_variable_len < 0)
|
||||
{
|
||||
throw DataSetIException("DataSet::write", "H5Tis_variable_str failed");
|
||||
}
|
||||
|
||||
// Use the overloaded member
|
||||
write(strg_C, mem_type, mem_space, file_space, xfer_plist);
|
||||
// Obtain identifiers for C API
|
||||
hid_t mem_type_id = mem_type.getId();
|
||||
hid_t mem_space_id = mem_space.getId();
|
||||
hid_t file_space_id = file_space.getId();
|
||||
hid_t xfer_plist_id = xfer_plist.getId();
|
||||
|
||||
// Convert string to C-string
|
||||
const char* strg_C;
|
||||
strg_C = strg.c_str(); // strg_C refers to the contents of strg as a C-str
|
||||
herr_t ret_value = 0;
|
||||
|
||||
// Pass string in differently depends on variable or fixed length
|
||||
if (!is_variable_len)
|
||||
{
|
||||
ret_value = H5Dwrite( id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg_C );
|
||||
}
|
||||
else
|
||||
{
|
||||
// passing string argument by address
|
||||
ret_value = H5Dwrite( id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, &strg_C );
|
||||
}
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw DataSetIException("DataSet::write", "H5Dwrite failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -467,7 +589,7 @@ int DataSet::iterateElems( void* buf, const DataType& type, const DataSpace& spa
|
||||
/// For more information, please see the Description section in
|
||||
/// C layer Reference Manual at:
|
||||
///\par
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5D.html#Dataset-Extend
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5D.html#Dataset-Extend
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::extend( const hsize_t* size ) const
|
||||
@@ -522,57 +644,9 @@ void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::getObjType
|
||||
///\brief Retrieves the type of object that an object reference points to.
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT \tReference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION \tReference is a dataset region reference.
|
||||
///\param ref - IN: Reference to query
|
||||
///\return An object type, which can be one of the following:
|
||||
/// \li \c H5G_LINK (0) \tObject is a symbolic link.
|
||||
/// \li \c H5G_GROUP (1) \tObject is a group.
|
||||
/// \li \c H5G_DATASET (2) \tObject is a dataset.
|
||||
/// \li \c H5G_TYPE Object (3) \tis a named datatype
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t DataSet::getObjType(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
return(p_get_obj_type(ref, ref_type));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw DataSetIException("DataSet::getObjType", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::getRegion
|
||||
///\brief Retrieves a dataspace with the region pointed to selected.
|
||||
///\param ref_type - IN: Type of reference to get region of - default
|
||||
/// to H5R_DATASET_REGION
|
||||
///\param ref - IN: Reference to get region of
|
||||
///\return DataSpace instance
|
||||
///\exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace DataSet::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
DataSpace dataspace(p_get_region(ref, ref_type));
|
||||
return(dataspace);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw DataSetIException("DataSet::getRegion", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::getId
|
||||
// Purpose: Get the id of this attribute
|
||||
///\brief Get the id of this dataset.
|
||||
// Description:
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
// AbstractDs and Attribute are moved out of H5Object. In
|
||||
@@ -586,8 +660,75 @@ hid_t DataSet::getId() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::p_setId
|
||||
///\brief Sets the identifier of this object to a new value.
|
||||
// Function: DataSet::p_read_fixed_len (private)
|
||||
// brief Reads a fixed length \a H5std_string from an dataset.
|
||||
// param mem_type - IN: DataSet datatype (in memory)
|
||||
// param strg - IN: Buffer for read string
|
||||
// exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2009
|
||||
// Modification
|
||||
// Jul 2009
|
||||
// Added in follow to the change in Attribute::read
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const
|
||||
{
|
||||
// Only allocate for fixed-len string.
|
||||
|
||||
// Get the size of the dataset's data
|
||||
size_t attr_size = getInMemDataSize();
|
||||
|
||||
// If there is data, allocate buffer and read it.
|
||||
if (attr_size > 0)
|
||||
{
|
||||
char *strg_C = NULL;
|
||||
|
||||
strg_C = new char [(size_t)attr_size+1];
|
||||
herr_t ret_value = H5Dread(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg_C);
|
||||
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
delete []strg_C; // de-allocate for fixed-len string
|
||||
throw DataSetIException("DataSet::read", "H5Dread failed for fixed length string");
|
||||
}
|
||||
|
||||
// Get string from the C char* and release resource allocated locally
|
||||
strg = strg_C;
|
||||
delete []strg_C;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::p_read_variable_len (private)
|
||||
// brief Reads a variable length \a H5std_string from an dataset.
|
||||
// param mem_type - IN: DataSet datatype (in memory)
|
||||
// param strg - IN: Buffer for read string
|
||||
// exception H5::DataSetIException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2009
|
||||
// Modification
|
||||
// Jul 2009
|
||||
// Added in follow to the change in Attribute::read
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const
|
||||
{
|
||||
// Prepare and call C API to read dataset.
|
||||
char *strg_C;
|
||||
|
||||
// Read dataset, no allocation for variable-len string; C library will
|
||||
herr_t ret_value = H5Dread(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, &strg_C);
|
||||
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw DataSetIException("DataSet::read", "H5Dread failed for variable length string");
|
||||
}
|
||||
|
||||
// Get string from the C char* and release resource allocated by C API
|
||||
strg = strg_C;
|
||||
HDfree(strg_C);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataSet::p_setId (private)
|
||||
///\brief Sets the identifier of this dataset to a new value.
|
||||
///
|
||||
///\exception H5::IdComponentException when the attempt to close the HDF5
|
||||
/// object fails
|
||||
@@ -629,10 +770,8 @@ void DataSet::close()
|
||||
{
|
||||
throw DataSetIException("DataSet::close", "H5Dclose failed");
|
||||
}
|
||||
// reset the id when the dataset that it represents is no longer
|
||||
// referenced
|
||||
if (getCounter() == 0)
|
||||
id = 0;
|
||||
// reset the id
|
||||
id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,10 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
|
||||
void getSpaceStatus(H5D_space_status_t& status) const;
|
||||
|
||||
// Returns the amount of storage size required for this dataset.
|
||||
hsize_t getStorageSize() const;
|
||||
virtual hsize_t getStorageSize() const;
|
||||
|
||||
// Returns the in memory size of this attribute's data.
|
||||
virtual size_t getInMemDataSize() const;
|
||||
|
||||
// Returns the number of bytes required to store VL data.
|
||||
hsize_t getVlenBufSize( DataType& type, DataSpace& space ) const;
|
||||
@@ -73,15 +76,10 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
|
||||
// Iterates the selected elements in the specified dataspace - not implemented in C++ style yet
|
||||
int iterateElems( void* buf, const DataType& type, const DataSpace& space, H5D_operator_t op, void* op_data = NULL );
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("DataSet"); }
|
||||
|
||||
// Creates a dataset by way of dereference.
|
||||
@@ -107,15 +105,21 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
|
||||
private:
|
||||
hid_t id; // HDF5 dataset id
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// This function contains the common code that is used by
|
||||
// getTypeClass and various API functions getXxxType
|
||||
// defined in AbstractDs for generic datatype and specific
|
||||
// sub-types
|
||||
virtual hid_t p_get_type() const;
|
||||
|
||||
// Reads variable or fixed len strings from this dataset.
|
||||
void p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const;
|
||||
void p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const;
|
||||
|
||||
protected:
|
||||
// Sets the dataset id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ hssize_t DataSpace::getSelectElemNpoints () const
|
||||
///\par Description
|
||||
/// For more information, please refer to the C layer Reference
|
||||
/// Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectElemPointList
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectElemPointList
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSpace::getSelectElemPointlist ( hsize_t startpoint, hsize_t numpoints, hsize_t *buf ) const
|
||||
@@ -432,7 +432,7 @@ void DataSpace::getSelectElemPointlist ( hsize_t startpoint, hsize_t numpoints,
|
||||
///\par Description
|
||||
/// For more information, please refer to the C layer Reference
|
||||
/// Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectBounds
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectBounds
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSpace::getSelectBounds ( hsize_t* start, hsize_t* end ) const
|
||||
@@ -458,7 +458,7 @@ void DataSpace::getSelectBounds ( hsize_t* start, hsize_t* end ) const
|
||||
///\par Description
|
||||
/// For more information, please refer to the C layer Reference
|
||||
/// Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectElements
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectElements
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSpace::selectElements ( H5S_seloper_t op, const size_t num_elements, const hsize_t *coord) const
|
||||
@@ -540,7 +540,7 @@ bool DataSpace::selectValid () const
|
||||
///\par Description
|
||||
/// For more information, please refer to the C layer Reference
|
||||
/// Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectHyperslab
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectHyperslab
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hsize_t *start, const hsize_t *stride, const hsize_t *block ) const
|
||||
@@ -612,10 +612,8 @@ void DataSpace::close()
|
||||
{
|
||||
throw DataSpaceIException("DataSpace::close", "H5Sclose failed");
|
||||
}
|
||||
// reset the id when the dataspace that it represents is no longer
|
||||
// referenced
|
||||
if (getCounter() == 0)
|
||||
id = 0;
|
||||
// reset the id
|
||||
id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ class H5_DLLCPP DataSpace : public IdComponent {
|
||||
// Sets or resets the size of this dataspace.
|
||||
void setExtentSimple( int rank, const hsize_t *current_size, const hsize_t *maximum_size = NULL ) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("DataSpace"); }
|
||||
|
||||
// Creates a DataSpace object using an existing dataspace id.
|
||||
|
||||
@@ -52,16 +52,14 @@ namespace H5 {
|
||||
// Function: DataType overloaded constructor
|
||||
///\brief Creates a datatype using an existing datatype's id
|
||||
///\param existing_id - IN: Id of the existing datatype
|
||||
///\param predefined - IN: Indicates whether or not this datatype is
|
||||
/// a predefined datatype; default to \c false
|
||||
// Description
|
||||
// Constructor creates a copy of an existing DataType using
|
||||
// its id. The argument "predefined" is default to false;
|
||||
// when a default datatype is created, this argument is set
|
||||
// to true so H5Tclose will not be called on it later. - need
|
||||
// a reassessment after changing to the new ref counting mech.
|
||||
// - BMR 5/2004
|
||||
// its id.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// Dec, 2005
|
||||
// Removed second argument, "predefined", after changing to the
|
||||
// new ref counting mechanism that relies on C's ref counting.
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::DataType(const hid_t existing_id) : H5Object()
|
||||
{
|
||||
@@ -95,7 +93,7 @@ DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object()
|
||||
///\param ref_type - IN: Reference type - default to H5R_OBJECT
|
||||
///\exception H5::ReferenceException
|
||||
///\par Description
|
||||
/// \c obj can be DataSet, Group, or named DataType, that
|
||||
/// \c obj can be DataSet, Group, or named DataType, that
|
||||
/// is a datatype that has been named by DataType::commit.
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
@@ -210,7 +208,7 @@ void DataType::copy( const DataType& like_type )
|
||||
///\param dset - IN: Dataset
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - Jan, 2007
|
||||
///\parDescription
|
||||
///\par Description
|
||||
/// The resulted dataset will be transient and modifiable.
|
||||
//--------------------------------------------------------------------------
|
||||
void DataType::copy(const DataSet& dset)
|
||||
@@ -517,7 +515,7 @@ DataType DataType::getSuper() const
|
||||
///\exception H5::DataTypeIException
|
||||
///\par Description
|
||||
/// For more information, please see:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-Register
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-Register
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DataType::registerFunc( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const
|
||||
@@ -681,51 +679,6 @@ bool DataType::isVariableStr() const
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::getObjType
|
||||
///\brief Retrieves the type of object that an object reference points to.
|
||||
///\param ref - IN: Reference to query
|
||||
///\param ref_type - IN: Type of reference to query
|
||||
///\return Object type, which can be one of the following:
|
||||
/// \li \c H5G_LINK Object is a symbolic link.
|
||||
/// \li \c H5G_GROUP Object is a group.
|
||||
/// \li \c H5G_DATASET Object is a dataset.
|
||||
/// \li \c H5G_TYPE Object is a named datatype
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t DataType::getObjType(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
return(p_get_obj_type(ref, ref_type));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw DataTypeIException(inMemFunc("getObjType"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::getRegion
|
||||
///\brief Retrieves a dataspace with the region pointed to selected.
|
||||
///\param ref - IN: Reference to get region of
|
||||
///\param ref_type - IN: Type of reference to get region of - default
|
||||
///\return DataSpace instance
|
||||
///\exception H5::DataTypeIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace DataType::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
DataSpace dataspace(p_get_region(ref, ref_type));
|
||||
return(dataspace);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw DataTypeIException(inMemFunc("getRegion"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DataType::getId
|
||||
// Purpose: Get the id of this attribute
|
||||
@@ -783,10 +736,8 @@ void DataType::close()
|
||||
{
|
||||
throw DataTypeIException(inMemFunc("close"), "H5Tclose failed");
|
||||
}
|
||||
// reset the id when the datatype that it represents is no longer
|
||||
// referenced
|
||||
if (getCounter() == 0)
|
||||
id = 0;
|
||||
// reset the id
|
||||
id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -796,17 +747,33 @@ void DataType::close()
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// - Replaced resetIdComponent() with decRefCount() to use C
|
||||
// library ID reference counting mechanism - BMR, Jun 1, 2004
|
||||
// library ID reference counting mechanism - BMR, Jun 1, 2004
|
||||
// - Replaced decRefCount with close() to let the C library
|
||||
// handle the reference counting - BMR, Jun 1, 2006
|
||||
// handle the reference counting - BMR, Jun 1, 2006
|
||||
// - Added the use of H5CPP_EXITED to terminate the HDF5 library
|
||||
// and elimiate previous memory leaks. See comments in the
|
||||
// header file "H5PredType.h" for details. - BMR, Mar 30, 2012
|
||||
//--------------------------------------------------------------------------
|
||||
DataType::~DataType()
|
||||
{
|
||||
try {
|
||||
close();
|
||||
} catch (Exception close_error) {
|
||||
cerr << inMemFunc("~DataType - ") << close_error.getDetailMsg() << endl;
|
||||
try
|
||||
{
|
||||
/* If this is the object AtExit, terminate the HDF5 library. This is
|
||||
to eliminate memory leaks due to the library being re-initiated
|
||||
(after the program has ended) and not re-terminated. */
|
||||
if (id == H5CPP_EXITED)
|
||||
{
|
||||
herr_t ret_value = H5close();
|
||||
if (ret_value == FAIL)
|
||||
throw DataTypeIException(inMemFunc("~DataType - "), "H5close failed");
|
||||
}
|
||||
// Close the HDF5 datatype
|
||||
else
|
||||
close();
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
cerr << inMemFunc("~DataType - ") << close_error.getDetailMsg() << endl;
|
||||
}
|
||||
}
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
} // end namespace
|
||||
|
||||
@@ -101,15 +101,10 @@ class H5_DLLCPP DataType : public H5Object {
|
||||
// Checks whether this datatype is a variable-length string.
|
||||
bool isVariableStr() const;
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("DataType"); }
|
||||
|
||||
// Creates a copy of an existing DataType using its id
|
||||
|
||||
@@ -106,8 +106,8 @@ int DSetCreatPropList::getChunk( int max_ndims, hsize_t* dim ) const
|
||||
///\param layout - IN: Type of storage layout for raw data
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For information on setting layout type, please refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetLayout
|
||||
/// For information on valid layout types, please refer to
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetLayout
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetCreatPropList::setLayout(H5D_layout_t layout) const
|
||||
@@ -211,7 +211,7 @@ void DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_p
|
||||
///\par
|
||||
/// For information on setting fill value, please refer to the
|
||||
/// C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFillValue
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFillValue
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetCreatPropList::setFillValue( const DataType& fvalue_type, const void* value ) const
|
||||
@@ -459,7 +459,7 @@ bool DSetCreatPropList::allFiltersAvail()
|
||||
///\par Description
|
||||
/// Please refer to the Reference Manual of \c H5Pset_shuffle for
|
||||
/// details.
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetShuffle
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetShuffle
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetCreatPropList::setShuffle() const
|
||||
|
||||
@@ -107,7 +107,7 @@ class H5_DLLCPP DSetCreatPropList : public PropList {
|
||||
// Sets SZIP compression method.
|
||||
void setSzip(unsigned int options_mask, unsigned int pixels_per_block) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("DSetCreatPropList"); }
|
||||
|
||||
// Copy constructor: creates a copy of a DSetCreatPropList object.
|
||||
|
||||
@@ -265,43 +265,6 @@ void DSetMemXferPropList::getVlenMemManager( H5MM_allocate_t& alloc_func, void**
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetMemXferPropList::setMulti
|
||||
///\brief Sets the data transfer property list for the multi-file driver.
|
||||
///\param memb_dxpl - OUT: Array of data access property lists
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// This function can only be used after the member map has
|
||||
/// been set with FileAccPropList::setMulti (not done - BMR.)
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetMemXferPropList::setMulti(const hid_t *memb_dxpl)
|
||||
{
|
||||
herr_t ret_value = H5Pset_dxpl_multi(id, memb_dxpl);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw PropListIException("DSetMemXferPropList::setMulti",
|
||||
"H5Pset_dxpl_multi failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetMemXferPropList::getMulti
|
||||
///\brief Returns multi-file data transfer property list information.
|
||||
///\param memb_dxpl - OUT: Array of data access property lists
|
||||
///\exception H5::PropListIException
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetMemXferPropList::getMulti(hid_t *memb_dxpl)
|
||||
{
|
||||
herr_t ret_value = H5Pget_dxpl_multi(id, memb_dxpl);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw PropListIException("DSetMemXferPropList::getMulti",
|
||||
"H5Pget_dxpl_multi failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: DSetMemXferPropList::setSmallDataBlockSize
|
||||
///\brief Sets the size of a contiguous block reserved for small data.
|
||||
@@ -309,7 +272,7 @@ void DSetMemXferPropList::getMulti(hid_t *memb_dxpl)
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For detail, please refer to the C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSmallData
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSmallData
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetMemXferPropList::setSmallDataBlockSize(hsize_t size)
|
||||
@@ -349,7 +312,7 @@ hsize_t DSetMemXferPropList::getSmallDataBlockSize()
|
||||
///\par Description
|
||||
/// For information, please refer to the C layer Reference
|
||||
/// Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetHyperVectorSize
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetHyperVectorSize
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void DSetMemXferPropList::setHyperVectorSize(size_t vector_size)
|
||||
|
||||
@@ -66,12 +66,6 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
|
||||
void getVlenMemManager( H5MM_allocate_t& alloc, void** alloc_info,
|
||||
H5MM_free_t& free, void** free_info ) const;
|
||||
|
||||
// Sets the data transfer property list for the multi-file driver.
|
||||
void setMulti(const hid_t *memb_dxpl);
|
||||
|
||||
// Returns multi-file data transfer property list information.
|
||||
void getMulti(hid_t *memb_dxpl);
|
||||
|
||||
// Sets the size of a contiguous block reserved for small data.
|
||||
void setSmallDataBlockSize(hsize_t size);
|
||||
|
||||
@@ -92,7 +86,7 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
|
||||
// Determines whether error-detection is enabled for dataset reads.
|
||||
H5Z_EDC_t getEDCCheck();
|
||||
|
||||
// Returns this class name.
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("DSetMemXferPropList"); }
|
||||
|
||||
// Copy constructor: makes a copy of a DSetMemXferPropList object.
|
||||
@@ -109,3 +103,4 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class H5_DLLCPP EnumType : public DataType {
|
||||
void valueOf( const char* name, void *value ) const;
|
||||
void valueOf( const H5std_string& name, void *value ) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("EnumType"); }
|
||||
|
||||
// Default constructor
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
const H5std_string Exception::DEFAULT_MSG("No detailed information provided");
|
||||
const char Exception::DEFAULT_MSG[] = "No detailed information provided";
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Exception default constructor
|
||||
@@ -252,7 +252,7 @@ void Exception::walkErrorStack( H5E_direction_t direction, H5E_walk2_t func, voi
|
||||
// Function: Exception::getDetailMsg
|
||||
///\brief Returns the detailed message set at the time the exception
|
||||
/// is thrown.
|
||||
///\return Text message - \c std::string
|
||||
///\return Text message - \c H5std_string
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string Exception::getDetailMsg() const
|
||||
@@ -275,7 +275,7 @@ const char* Exception::getCDetailMsg() const
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Exception::getFuncName
|
||||
///\brief Returns the name of the function, where the exception is thrown.
|
||||
///\return Text message - \c std::string
|
||||
///\return Text message - \c H5std_string
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string Exception::getFuncName() const
|
||||
|
||||
@@ -84,7 +84,7 @@ class H5_DLLCPP Exception {
|
||||
|
||||
protected:
|
||||
// Default value for detail_message
|
||||
static const H5std_string DEFAULT_MSG;
|
||||
static const char DEFAULT_MSG[];
|
||||
};
|
||||
|
||||
class H5_DLLCPP FileIException : public Exception {
|
||||
|
||||
@@ -76,7 +76,7 @@ void FileAccPropList::setStdio() const
|
||||
/// driver was set for the property list. The driver ID is
|
||||
/// only valid as long as the file driver remains registered.
|
||||
/// Valid driver identifiers can be found at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetDriver
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetDriver
|
||||
///\exception H5::PropListIException
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -99,7 +99,7 @@ hid_t FileAccPropList::getDriver() const
|
||||
///\par Description
|
||||
/// For a list of valid driver identifiers, please see the C
|
||||
/// layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetDriver
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetDriver
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setDriver(hid_t new_driver_id, const void *new_driver_info) const
|
||||
@@ -157,7 +157,7 @@ hsize_t FileAccPropList::getFamilyOffset() const
|
||||
///\par Description
|
||||
/// For more details on the use of \c H5FD_CORE driver, please
|
||||
/// refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplCore
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplCore
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setCore (size_t increment, hbool_t backing_store) const
|
||||
@@ -261,7 +261,7 @@ FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// Temporary - For information, please refer to:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplSplit
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplSplit
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
|
||||
@@ -292,47 +292,9 @@ void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& ra
|
||||
setSplit( meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str() );
|
||||
}
|
||||
|
||||
#ifdef H5_HAVE_STREAM // for Stream Virtual File Driver
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList::getStream
|
||||
///\brief Retrieves the streaming I/O driver settings
|
||||
///\return The streaming I/O file access property list structure
|
||||
/// For detail on this structure, please refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
|
||||
///\exception H5::PropListIException
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5FD_stream_fapl_t FileAccPropList::getStream() const
|
||||
{
|
||||
H5FD_stream_fapl_t fapl;
|
||||
herr_t ret_value = H5Pget_fapl_stream(id, &fapl);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException("FileAccPropList::getStream", "H5Pget_fapl_stream failed");
|
||||
}
|
||||
return(fapl);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList::setStream
|
||||
///\brief Modifies this file access property list to use the Stream
|
||||
/// driver.
|
||||
///\param fapl - IN: The streaming I/O file access property list
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For detail on \a fapl, please refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setStream(H5FD_stream_fapl_t &fapl) const
|
||||
{
|
||||
herr_t ret_value = H5Pset_fapl_stream (id, &fapl);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw PropListIException("FileAccPropList::setStream", "H5Pset_fapl_stream failed");
|
||||
}
|
||||
}
|
||||
#endif // Stream Virtual File Driver
|
||||
// Stream Virtual File Driver had been removed from the main library.
|
||||
// FileAccPropList::[s,g]etStream are now removed from the C++ API.
|
||||
// -BMR, March, 2012
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileAccPropList::getSieveBufSize
|
||||
@@ -360,7 +322,7 @@ size_t FileAccPropList::getSieveBufSize() const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For detail on data sieving, please refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSieveBufSize
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSieveBufSize
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setSieveBufSize(size_t bufsize) const
|
||||
@@ -380,7 +342,7 @@ void FileAccPropList::setSieveBufSize(size_t bufsize) const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For more detail, please see the C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetMetaBlockSize
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetMetaBlockSize
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setMetaBlockSize(hsize_t &block_size) const
|
||||
@@ -420,7 +382,7 @@ hsize_t FileAccPropList::getMetaBlockSize() const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For detail on \a flags, please refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplLog
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setLog(const char *logfile, unsigned flags, size_t buf_size) const
|
||||
@@ -477,7 +439,7 @@ void FileAccPropList::setSec2() const
|
||||
/// The parameter \a alignment must have a positive value.
|
||||
///
|
||||
/// For detail on \a setting alignment, please refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetAlignment
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetAlignment
|
||||
// Programmer: Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setAlignment( hsize_t threshold, hsize_t alignment ) const
|
||||
@@ -514,7 +476,7 @@ void FileAccPropList::getAlignment( hsize_t &threshold, hsize_t &alignment ) con
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// More details and valid values for \a dtype can be found at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetMultiType
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetMultiType
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setMultiType(H5FD_mem_t dtype) const
|
||||
@@ -533,7 +495,7 @@ void FileAccPropList::setMultiType(H5FD_mem_t dtype) const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// More details and possible returned values can be found at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetMultiType
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetMultiType
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5FD_mem_t FileAccPropList::getMultiType() const
|
||||
@@ -634,7 +596,7 @@ H5F_close_degree_t FileAccPropList::getFcloseDegree()
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For detail on \a fapl, please refer to
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetGCReferences
|
||||
// Programmer: Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void FileAccPropList::setGcReferences( unsigned gc_ref ) const
|
||||
|
||||
@@ -123,7 +123,7 @@ class H5_DLLCPP FileAccPropList : public PropList {
|
||||
// Returns garbage collecting references setting.
|
||||
unsigned getGcReferences() const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("FileAccPropList"); }
|
||||
|
||||
// Copy constructor: creates a copy of a FileAccPropList object.
|
||||
|
||||
@@ -55,6 +55,7 @@ FileCreatPropList::FileCreatPropList( const FileCreatPropList& original ) : Prop
|
||||
//--------------------------------------------------------------------------
|
||||
FileCreatPropList::FileCreatPropList(const hid_t plist_id) : PropList(plist_id) {}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileCreatPropList::getVersion
|
||||
///\brief Retrieves version information for various parts of a file.
|
||||
@@ -76,6 +77,7 @@ void FileCreatPropList::getVersion(unsigned& super, unsigned& freelist, unsigned
|
||||
"H5Pget_version failed");
|
||||
}
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: FileCreatPropList::setUserblock
|
||||
@@ -126,7 +128,7 @@ hsize_t FileCreatPropList::getUserblock() const
|
||||
///\par Description
|
||||
/// For information on setting sizes, please refer to the
|
||||
/// C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSizes
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSizes
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void FileCreatPropList::setSizes( size_t sizeof_addr, size_t sizeof_size ) const
|
||||
@@ -166,7 +168,7 @@ void FileCreatPropList::getSizes( size_t& sizeof_addr, size_t& sizeof_size ) con
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For information, please see the C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSymK
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void FileCreatPropList::setSymk( unsigned ik, unsigned lk ) const
|
||||
@@ -187,7 +189,7 @@ void FileCreatPropList::setSymk( unsigned ik, unsigned lk ) const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For information, please see
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetSymK
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void FileCreatPropList::getSymk( unsigned& ik, unsigned& lk ) const
|
||||
@@ -208,7 +210,7 @@ void FileCreatPropList::getSymk( unsigned& ik, unsigned& lk ) const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For information, please see the C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetIstoreK
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetIstoreK
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void FileCreatPropList::setIstorek( unsigned ik ) const
|
||||
@@ -228,7 +230,7 @@ void FileCreatPropList::setIstorek( unsigned ik ) const
|
||||
///\exception H5::PropListIException
|
||||
///\par Description
|
||||
/// For information, please see
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetIstoreK
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetIstoreK
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
unsigned FileCreatPropList::getIstorek() const
|
||||
|
||||
@@ -30,8 +30,10 @@ class H5_DLLCPP FileCreatPropList : public PropList {
|
||||
// Creates a file create property list.
|
||||
FileCreatPropList();
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves version information for various parts of a file.
|
||||
void getVersion( unsigned& super, unsigned& freelist, unsigned& stab, unsigned& shhdr ) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Sets the userblock size field of a file creation property list.
|
||||
void setUserblock( hsize_t size ) const;
|
||||
@@ -60,7 +62,7 @@ class H5_DLLCPP FileCreatPropList : public PropList {
|
||||
// indexing chunked datasets.
|
||||
void setIstorek( unsigned ik ) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("FileCreatPropList"); }
|
||||
|
||||
// Copy constructor: creates a copy of a FileCreatPropList object.
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace H5 {
|
||||
///\brief Default constructor: creates a stub H5File object.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File() : IdComponent(), id(0) {}
|
||||
H5File::H5File() : H5Location(), id(0) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File overloaded constructor
|
||||
@@ -61,7 +61,7 @@ H5File::H5File() : IdComponent(), id(0) {}
|
||||
/// modifying default file meta-data. Default to
|
||||
/// FileCreatPropList::DEFAULT
|
||||
///\param access_plist - IN: File access property list. Default to
|
||||
/// FileCreatPropList::DEFAULT
|
||||
/// FileAccPropList::DEFAULT
|
||||
///\par Description
|
||||
/// Valid values of \a flags include:
|
||||
/// \li \c H5F_ACC_TRUNC - Truncate file, if it already exists,
|
||||
@@ -76,30 +76,44 @@ H5File::H5File() : IdComponent(), id(0) {}
|
||||
/// For info on file creation in the case of an already-open file,
|
||||
/// please refer to the \b Special \b case section in the C layer
|
||||
/// Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5F.html#File-Create
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5F.html#File-Create
|
||||
// Notes With a PGI compiler (~2012-2013), the exception thrown by p_get_file
|
||||
// could not be caught in the applications. Added try block here
|
||||
// to catch then re-throw it. -BMR 2013/03/21
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : IdComponent(0)
|
||||
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(0)
|
||||
{
|
||||
p_get_file(name, flags, create_plist, access_plist);
|
||||
try {
|
||||
p_get_file(name, flags, create_plist, access_plist);
|
||||
} catch (FileIException open_file) {
|
||||
throw open_file;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File overloaded constructor
|
||||
///\brief This is another overloaded constructor. It differs from the
|
||||
/// above constructor only in the type of the \a name argument.
|
||||
///\param name - IN: Name of the file - \c std::string
|
||||
///\param name - IN: Name of the file - \c H5std_string
|
||||
///\param flags - IN: File access flags
|
||||
///\param create_plist - IN: File creation property list, used when
|
||||
/// modifying default file meta-data. Default to
|
||||
/// FileCreatPropList::DEFAULT
|
||||
///\param access_plist - IN: File access property list. Default to
|
||||
/// FileCreatPropList::DEFAULT
|
||||
/// FileAccPropList::DEFAULT
|
||||
// Notes With a PGI compiler (~2012-2013), the exception thrown by p_get_file
|
||||
// could not be caught in the applications. Added try block here
|
||||
// to catch then re-throw it. -BMR 2013/03/21
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : IdComponent(0)
|
||||
H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : H5Location(0)
|
||||
{
|
||||
p_get_file(name.c_str(), flags, create_plist, access_plist);
|
||||
try {
|
||||
p_get_file(name.c_str(), flags, create_plist, access_plist);
|
||||
} catch (FileIException open_file) {
|
||||
throw open_file;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -140,34 +154,15 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
|
||||
///\param original - IN: H5File instance to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5File::H5File(const H5File& original) : IdComponent(original)
|
||||
H5File::H5File(const H5File& original) : H5Location(original)
|
||||
{
|
||||
id = original.getId();
|
||||
incRefCount(); // increment number of references to this id
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::flush
|
||||
///\brief Flushes all buffers associated with a file to disk.
|
||||
///\param scope - IN: Specifies the scope of the flushing action,
|
||||
/// which can be either of these values:
|
||||
/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
|
||||
/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
|
||||
///\exception H5::FileIException
|
||||
// Programmer Binh-Minh Ribler - Dec. 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::flush(H5F_scope_t scope) const
|
||||
{
|
||||
herr_t ret_value = H5Fflush( id, scope );
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw FileIException("H5File::flush", "H5Fflush failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::isHdf5
|
||||
///\brief Determines whether a file in HDF5 format.
|
||||
///\brief Determines whether a file in HDF5 format. (Static)
|
||||
///\param name - IN: Name of the file
|
||||
///\return true if the file is in HDF5 format, and false, otherwise
|
||||
///\exception H5::FileIException
|
||||
@@ -191,8 +186,8 @@ bool H5File::isHdf5(const char* name)
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::isHdf5
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes an \c std::string for \a name.
|
||||
///\param name - IN: Name of the file - \c std::string
|
||||
/// It takes an \c H5std_string for \a name. (Static)
|
||||
///\param name - IN: Name of the file - \c H5std_string
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
bool H5File::isHdf5(const H5std_string& name )
|
||||
@@ -206,7 +201,7 @@ bool H5File::isHdf5(const H5std_string& name )
|
||||
///\param name - IN: Name of the file
|
||||
///\param flags - IN: File access flags
|
||||
///\param access_plist - IN: File access property list. Default to
|
||||
/// FileCreatPropList::DEFAULT
|
||||
/// FileAccPropList::DEFAULT
|
||||
///\par Description
|
||||
/// Valid values of \a flags include:
|
||||
/// H5F_ACC_RDWR: Open with read/write access. If the file is
|
||||
@@ -231,8 +226,8 @@ void H5File::openFile(const char* name, unsigned int flags, const FileAccPropLis
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::openFile
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It takes an \c std::string for \a name.
|
||||
///\param name - IN: Name of the file - \c std::string
|
||||
/// It takes an \c H5std_string for \a name.
|
||||
///\param name - IN: Name of the file - \c H5std_string
|
||||
///\param flags - IN: File access flags
|
||||
///\param access_plist - IN: File access property list. Default to
|
||||
/// FileAccPropList::DEFAULT
|
||||
@@ -269,8 +264,8 @@ void H5File::reOpen()
|
||||
throw FileIException("H5File::reOpen", close_error.getDetailMsg());
|
||||
}
|
||||
|
||||
// call C routine to reopen the file - Note: not sure about this
|
||||
// does id need to be closed later? which id to be the parameter?
|
||||
// call C routine to reopen the file - Note: not sure about this,
|
||||
// which id to be the parameter when closing?
|
||||
id = H5Freopen( id );
|
||||
if( id < 0 ) // Raise exception when H5Freopen returns a neg value
|
||||
throw FileIException("H5File::reOpen", "H5Freopen failed");
|
||||
@@ -278,12 +273,10 @@ void H5File::reOpen()
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::reopen
|
||||
///\brief Reopens this file.
|
||||
///
|
||||
///\exception H5::FileIException
|
||||
///\par Description
|
||||
/// This function will be replaced by the above function \c reOpen
|
||||
/// in future releases.
|
||||
// Purpose: Reopens this file.
|
||||
// Exception H5::FileIException
|
||||
// Description
|
||||
// This function is replaced by the above function reOpen.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::reopen()
|
||||
@@ -489,70 +482,6 @@ void H5File::getVFDHandle(void **file_handle) const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getFileName
|
||||
///\brief Gets the name of this file.
|
||||
///\return File name
|
||||
///\exception H5::FileIException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string H5File::getFileName() const
|
||||
{
|
||||
try {
|
||||
return(p_get_file_name());
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw FileIException("H5File::getFileName", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getObjType
|
||||
///\brief Retrieves the type of object that an object reference points to.
|
||||
///\param ref - IN: Reference to query
|
||||
///\param ref_type - IN: Type of reference, valid values are:
|
||||
/// \li \c H5R_OBJECT \tReference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION \tReference is a dataset region reference.
|
||||
///\return Object type, which can be one of the following:
|
||||
/// \li \c H5G_LINK - Object is a symbolic link.
|
||||
/// \li \c H5G_GROUP - Object is a group.
|
||||
/// \li \c H5G_DATASET - Object is a dataset.
|
||||
/// \li \c H5G_TYPE - Object is a named datatype
|
||||
///\exception H5::FileIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t H5File::getObjType(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
return(p_get_obj_type(ref, ref_type));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw FileIException("H5File::getObjType", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getRegion
|
||||
///\brief Retrieves a dataspace with the region pointed to selected.
|
||||
///\param ref - IN: Reference to get region of
|
||||
///\param ref_type - IN: Type of reference to get region of - default
|
||||
///\return DataSpace instance
|
||||
///\exception H5::FileIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace H5File::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
DataSpace dataspace(p_get_region(ref, ref_type));
|
||||
return(dataspace);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw FileIException("H5File::getRegion", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getFileSize
|
||||
///\brief Returns the file size of the HDF5 file.
|
||||
@@ -574,134 +503,6 @@ hsize_t H5File::getFileSize() const
|
||||
return (file_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::p_reference (protected)
|
||||
// Purpose Creates a reference to an HDF5 object or a dataset region.
|
||||
// Parameters
|
||||
// name - IN: Name of the object to be referenced
|
||||
// dataspace - IN: Dataspace with selection
|
||||
// ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
|
||||
// Exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const
|
||||
{
|
||||
herr_t ret_value = H5Rcreate(ref, getId(), name, ref_type, space_id);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw IdComponentException("", "H5Rcreate failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::reference
|
||||
///\brief Creates a reference to an HDF5 object or a dataset region.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced
|
||||
///\param dataspace - IN: Dataspace with selection
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT \tReference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION \tReference is a dataset region
|
||||
/// reference. - this is the default
|
||||
///\exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::reference(void* ref, const char* name, const DataSpace& dataspace, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
p_reference(ref, name, dataspace.getId(), ref_type);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw IdComponentException("H5File::reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::reference
|
||||
///\brief This is an overloaded function, provided for your convenience.
|
||||
/// It differs from the above function in that it only creates
|
||||
/// a reference to an HDF5 object, not to a dataset region.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced - \c char pointer
|
||||
///\exception H5::IdComponentException
|
||||
///\par Description
|
||||
// This function passes H5R_OBJECT and -1 to the protected
|
||||
// function for it to pass to the C API H5Rcreate
|
||||
// to create a reference to the named object.
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::reference(void* ref, const char* name) const
|
||||
{
|
||||
try {
|
||||
p_reference(ref, name, -1, H5R_OBJECT);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw IdComponentException("H5File::reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::reference
|
||||
///\brief This is an overloaded function, provided for your convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for the object's name.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced - \c std::string
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5File::reference(void* ref, const H5std_string& name) const
|
||||
{
|
||||
reference(ref, name.c_str());
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::p_get_obj_type (protected)
|
||||
// Purpose Retrieves the type of object that an object reference points to.
|
||||
// Parameters
|
||||
// ref - IN: Reference to query
|
||||
// ref_type - IN: Type of reference to query
|
||||
// Return An object type, which can be one of the following:
|
||||
// H5G_LINK Object is a symbolic link.
|
||||
// H5G_GROUP Object is a group.
|
||||
// H5G_DATASET Object is a dataset.
|
||||
// H5G_TYPE Object is a named datatype
|
||||
// Exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t H5File::p_get_obj_type(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
H5G_obj_t obj_type = H5Rget_obj_type1(getId(), ref_type, ref);
|
||||
|
||||
if (obj_type == H5G_UNKNOWN)
|
||||
{
|
||||
throw IdComponentException("", "H5Rget_obj_type failed");
|
||||
}
|
||||
return(obj_type);
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::p_get_region (protected)
|
||||
// Purpose Retrieves a dataspace with the region pointed to selected.
|
||||
// Parameters
|
||||
// ref_type - IN: Type of reference to get region of - default
|
||||
// to H5R_DATASET_REGION
|
||||
// ref - IN: Reference to get region of
|
||||
// Return Dataspace id
|
||||
// Exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t H5File::p_get_region(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
hid_t space_id = H5Rget_region(getId(), ref_type, ref);
|
||||
if (space_id < 0)
|
||||
{
|
||||
throw IdComponentException("", "H5Rget_region failed");
|
||||
}
|
||||
return(space_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5File::getLocId
|
||||
// Purpose: Get the id of this file
|
||||
@@ -772,10 +573,8 @@ void H5File::close()
|
||||
{
|
||||
throw FileIException("H5File::close", "H5Fclose failed");
|
||||
}
|
||||
// reset the id when the file that it represents is no longer
|
||||
// referenced
|
||||
if (getCounter() == 0)
|
||||
id = 0;
|
||||
// reset the id
|
||||
id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
class H5_DLLCPP H5File : public IdComponent, public CommonFG {
|
||||
class H5_DLLCPP H5File : public H5Location, public CommonFG {
|
||||
public:
|
||||
// Creates or opens an HDF5 file.
|
||||
H5File( const char* name, unsigned int flags,
|
||||
@@ -40,18 +40,12 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
|
||||
// Close this file.
|
||||
virtual void close();
|
||||
|
||||
// Flushes all buffers associated with this file to disk
|
||||
void flush(H5F_scope_t scope) const;
|
||||
|
||||
// Gets the access property list of this file.
|
||||
FileAccPropList getAccessPlist() const;
|
||||
|
||||
// Gets the creation property list of this file.
|
||||
FileCreatPropList getCreatePlist() const;
|
||||
|
||||
// Gets the name of this file.
|
||||
H5std_string getFileName() const;
|
||||
|
||||
// Retrieves the file size of an opened file.
|
||||
hsize_t getFileSize() const;
|
||||
|
||||
@@ -67,11 +61,6 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
|
||||
// and datatypes) in the same file.
|
||||
void getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const;
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
|
||||
@@ -87,14 +76,7 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
|
||||
void reOpen(); // added for better name
|
||||
void reopen();
|
||||
|
||||
// Creates a reference to a named HDF5 object or to a dataset region
|
||||
// in this object.
|
||||
void reference(void* ref, const char* name, const DataSpace& dataspace,
|
||||
H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
void reference(void* ref, const char* name) const;
|
||||
void reference(void* ref, const H5std_string& name) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("H5File"); }
|
||||
|
||||
// Throw file exception.
|
||||
@@ -124,17 +106,6 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
|
||||
// constructors taking a string or a char*
|
||||
void p_get_file( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist );
|
||||
|
||||
// Creates a reference to an HDF5 object or a dataset region.
|
||||
void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
hid_t p_get_region(void *ref, H5R_type_t ref_type) const;
|
||||
|
||||
protected:
|
||||
// Sets the HDF5 file id.
|
||||
virtual void p_setId(const hid_t new_id);
|
||||
|
||||
@@ -53,7 +53,7 @@ class H5_DLLCPP FloatType : public AtomType {
|
||||
// Sets the mantissa normalization of a floating-point datatype.
|
||||
void setNorm( H5T_norm_t norm ) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("FloatType"); }
|
||||
|
||||
// Default constructor
|
||||
|
||||
@@ -79,7 +79,7 @@ hid_t Group::getLocId() const
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group overloaded constructor
|
||||
///\brief Creates a Group object using the id of an existing group.
|
||||
///\param group_id - IN: Id of an existing group
|
||||
///\param existing_id - IN: Id of an existing group
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Group::Group(const hid_t existing_id) : H5Object()
|
||||
@@ -95,7 +95,7 @@ Group::Group(const hid_t existing_id) : H5Object()
|
||||
///\param ref_type - IN: Reference type - default to H5R_OBJECT
|
||||
///\exception H5::ReferenceException
|
||||
///\par Description
|
||||
/// \c obj can be DataSet, Group, or named DataType, that
|
||||
/// \c obj can be DataSet, Group, or named DataType, that
|
||||
/// is a datatype that has been named by DataType::commit.
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -147,62 +147,15 @@ Group::Group(Attribute& attr, const void* ref, H5R_type_t ref_type) : H5Object()
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group::getObjType
|
||||
///\brief Retrieves the type of object that an object reference points to.
|
||||
///\param ref - IN: Reference to query
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT \tReference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION \tReference is a dataset region reference.
|
||||
///\return An object type, which can be one of the following:
|
||||
/// H5G_LINK Object is a symbolic link.
|
||||
/// H5G_GROUP Object is a group.
|
||||
/// H5G_DATASET Object is a dataset.
|
||||
/// H5G_TYPE Object is a named datatype
|
||||
///\exception H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t Group::getObjType(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
return(p_get_obj_type(ref, ref_type));
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw GroupIException("Group::getObjType", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group::getRegion
|
||||
///\brief Retrieves a dataspace with the region pointed to selected.
|
||||
///\param ref - IN: Reference to get region of
|
||||
///\param ref_type - IN: Type of reference to get region of - default
|
||||
///\return DataSpace instance
|
||||
///\exception H5::GroupIException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
DataSpace Group::getRegion(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
DataSpace dataspace(p_get_region(ref, ref_type));
|
||||
return(dataspace);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw GroupIException("Group::getRegion", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Group::getId
|
||||
// Purpose: Get the id of this attribute
|
||||
// Modification:
|
||||
// May 2008 - BMR
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
// AbstractDS and Attribute are moved out of H5Object. In
|
||||
// addition, member IdComponent::id is moved into subclasses, and
|
||||
// IdComponent::getId now becomes pure virtual function.
|
||||
// Class hierarchy is revised to address bugzilla 1068. Class
|
||||
// AbstractDS and Attribute are moved out of H5Object. In
|
||||
// addition, member IdComponent::id is moved into subclasses, and
|
||||
// IdComponent::getId now becomes pure virtual function.
|
||||
// Programmer Binh-Minh Ribler - May, 2008
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t Group::getId() const
|
||||
@@ -215,11 +168,11 @@ hid_t Group::getId() const
|
||||
///\brief Sets the identifier of this object to a new value.
|
||||
///
|
||||
///\exception H5::IdComponentException when the attempt to close the HDF5
|
||||
/// object fails
|
||||
/// object fails
|
||||
// Description:
|
||||
// The underlaying reference counting in the C library ensures
|
||||
// that the current valid id of this object is properly closed.
|
||||
// Then the object's id is reset to the new id.
|
||||
// The underlaying reference counting in the C library ensures
|
||||
// that the current valid id of this object is properly closed.
|
||||
// Then the object's id is reset to the new id.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void Group::p_setId(const hid_t new_id)
|
||||
@@ -251,10 +204,8 @@ void Group::close()
|
||||
{
|
||||
throw GroupIException("Group::close", "H5Gclose failed");
|
||||
}
|
||||
// reset the id when the group that it represents is no longer
|
||||
// referenced
|
||||
if (getCounter() == 0)
|
||||
id = 0;
|
||||
// reset the id
|
||||
id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,15 +26,10 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
|
||||
// Close this group.
|
||||
virtual void close();
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("Group"); }
|
||||
|
||||
// Throw group exception.
|
||||
|
||||
@@ -13,11 +13,13 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifdef H5_VMS
|
||||
#ifdef OLD_HEADER_FILENAME
|
||||
#include <iostream.h>
|
||||
#else
|
||||
#include <iostream>
|
||||
#endif /*H5_VMS*/
|
||||
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
#include "H5Include.h"
|
||||
#include "H5Exception.h"
|
||||
#include "H5Library.h"
|
||||
@@ -129,7 +131,7 @@ int IdComponent::getCounter() const
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: hdfObjectType
|
||||
///\brief Given an id, returns the type of the object.
|
||||
///return a valid HDF object type, which may be one of the following:
|
||||
///\return a valid HDF object type, which may be one of the following:
|
||||
/// \li \c H5I_FILE
|
||||
/// \li \c H5I_GROUP
|
||||
/// \li \c H5I_DATATYPE
|
||||
@@ -161,6 +163,10 @@ H5I_type_t IdComponent::getHDFObjType(const hid_t obj_id)
|
||||
// copy the id from rhs to this object, and increment the
|
||||
// reference counter of the id to indicate that another object
|
||||
// is referencing that id.
|
||||
// Modification
|
||||
// 2010/5/9 - BMR
|
||||
// Removed close() and incRefCount() because setId/p_setId takes
|
||||
// care of close() and setId takes care incRefCount().
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
IdComponent& IdComponent::operator=( const IdComponent& rhs )
|
||||
@@ -169,16 +175,13 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
|
||||
{
|
||||
// handling references to this id
|
||||
try {
|
||||
close();
|
||||
setId(rhs.getId());
|
||||
// Note: a = b, so there are two objects with the same hdf5 id
|
||||
// that's why incRefCount is needed, and it is called by setId
|
||||
}
|
||||
catch (Exception close_error) {
|
||||
throw FileIException(inMemFunc("operator="), close_error.getDetailMsg());
|
||||
}
|
||||
|
||||
// copy the data members from the rhs object
|
||||
p_setId(rhs.getId());
|
||||
incRefCount(getId()); // a = b, so there are two objects with the same
|
||||
// hdf5 id
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@@ -190,9 +193,8 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
|
||||
///\exception H5::IdComponentException when the attempt to close the HDF5
|
||||
/// object fails
|
||||
// Description:
|
||||
// The underlaying reference counting in the C library ensures
|
||||
// that the current valid id of this object is properly closed.
|
||||
// Then the object's id is reset to the new id.
|
||||
// p_setId ensures that the current valid id of this object is
|
||||
// properly closed before resetting the object's id to the new id.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// 2008/7/23 - BMR
|
||||
|
||||
@@ -65,7 +65,7 @@ class H5_DLLCPP IdComponent {
|
||||
// <class-name> is returned by fromClass().
|
||||
H5std_string inMemFunc(const char* func_name) const;
|
||||
|
||||
// Returns this class name.
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass() const { return("IdComponent");}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
@@ -35,7 +35,7 @@ class H5_DLLCPP IntType : public AtomType {
|
||||
// Sets the sign proprety for an integer type.
|
||||
void setSign( H5T_sign_t sign ) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("IntType"); }
|
||||
|
||||
// Default constructor
|
||||
|
||||
@@ -106,7 +106,7 @@ void H5Library::getLibVersion( unsigned& majnum, unsigned& minnum, unsigned& rel
|
||||
///\par Description
|
||||
/// For information about library version, please refer to
|
||||
/// the C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5.html#Library-VersCheck
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5.html#Library-VersCheck
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum)
|
||||
@@ -161,7 +161,7 @@ void H5Library::garbageCollect()
|
||||
/// Setting a value of -1 for a limit means no limit of that type.
|
||||
/// For more information on free list limits, please refer to C
|
||||
/// layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5.html#Library-SetFreeListLimits
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5.html#Library-SetFreeListLimits
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim,
|
||||
|
||||
702
c++/src/H5Location.cpp
Normal file
702
c++/src/H5Location.cpp
Normal file
@@ -0,0 +1,702 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "H5Include.h"
|
||||
#include "H5Exception.h"
|
||||
#include "H5IdComponent.h"
|
||||
#include "H5PropList.h"
|
||||
#include "H5Location.h"
|
||||
#include "H5Object.h"
|
||||
#include "H5DcreatProp.h"
|
||||
#include "H5DxferProp.h"
|
||||
#include "H5FaccProp.h"
|
||||
#include "H5FcreatProp.h"
|
||||
#include "H5CommonFG.h"
|
||||
#include "H5DataType.h"
|
||||
#include "H5DataSpace.h"
|
||||
#include "H5AbstractDs.h"
|
||||
#include "H5File.h"
|
||||
#include "H5DataSet.h"
|
||||
#include "H5Attribute.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// userAttrOpWrpr simply interfaces between the user's function and the
|
||||
// C library function H5Aiterate2; used to resolve the different prototype
|
||||
// problem. May be moved to Iterator later.
|
||||
extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
|
||||
const H5A_info_t *ainfo, void *op_data)
|
||||
{
|
||||
H5std_string s_attr_name = H5std_string( attr_name );
|
||||
#ifdef NO_STATIC_CAST
|
||||
UserData4Aiterate* myData = (UserData4Aiterate *) op_data;
|
||||
#else
|
||||
UserData4Aiterate* myData = static_cast <UserData4Aiterate *> (op_data);
|
||||
#endif
|
||||
myData->op( *myData->location, s_attr_name, myData->opData );
|
||||
return 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location default constructor (protected)
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Location::H5Location() : IdComponent(0) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location overloaded constructor (protected)
|
||||
// Purpose Creates an H5Location object using the id of an existing HDF5
|
||||
// object.
|
||||
// Parameters object_id - IN: Id of an existing HDF5 object
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Location::H5Location(const hid_t object_id) : IdComponent(object_id) {}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location copy constructor
|
||||
///\brief Copy constructor: makes a copy of the original H5Location
|
||||
/// instance.
|
||||
///\param original - IN: H5Location instance to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Location::H5Location( const H5Location& original ) : IdComponent( original ) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::createAttribute
|
||||
///\brief Creates an attribute for a group, dataset, or named datatype.
|
||||
///\param name - IN: Name of the attribute
|
||||
///\param data_type - IN: Datatype for the attribute
|
||||
///\param data_space - IN: Dataspace for the attribute - only simple
|
||||
/// dataspaces are allowed at this time
|
||||
///\param create_plist - IN: Creation property list - default to
|
||||
/// PropList::DEFAULT
|
||||
///\return Attribute instance
|
||||
///\exception H5::AttributeIException
|
||||
///\par Description
|
||||
/// The attribute name specified in \a name must be unique.
|
||||
/// Attempting to create an attribute with the same name as an
|
||||
/// existing attribute will raise an exception, leaving the
|
||||
/// pre-existing attribute intact. To overwrite an existing
|
||||
/// attribute with a new attribute of the same name, first
|
||||
/// delete the existing one with \c H5Location::removeAttr, then
|
||||
/// recreate it with this function.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Location::createAttribute( const char* name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
|
||||
{
|
||||
hid_t type_id = data_type.getId();
|
||||
hid_t space_id = data_space.getId();
|
||||
hid_t plist_id = create_plist.getId();
|
||||
hid_t attr_id = H5Acreate2(getId(), name, type_id, space_id, plist_id, H5P_DEFAULT );
|
||||
|
||||
// If the attribute id is valid, create and return the Attribute object
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
}
|
||||
else
|
||||
throw AttributeIException(inMemFunc("createAttribute"), "H5Acreate2 failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::createAttribute
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Location::createAttribute( const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
|
||||
{
|
||||
return( createAttribute( name.c_str(), data_type, data_space, create_plist ));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::openAttribute
|
||||
///\brief Opens an attribute given its name.
|
||||
///\param name - IN: Name of the attribute
|
||||
///\return Attribute instance
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Location::openAttribute( const char* name ) const
|
||||
{
|
||||
hid_t attr_id = H5Aopen(getId(), name, H5P_DEFAULT);
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::openAttribute
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Location::openAttribute( const H5std_string& name ) const
|
||||
{
|
||||
return( openAttribute( name.c_str()) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::openAttribute
|
||||
///\brief Opens an attribute given its index.
|
||||
///\param idx - IN: Index of the attribute, a 0-based, non-negative integer
|
||||
///\return Attribute instance
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Location::openAttribute( const unsigned int idx ) const
|
||||
{
|
||||
hid_t attr_id = H5Aopen_by_idx(getId(), ".", H5_INDEX_CRT_ORDER,
|
||||
H5_ITER_INC, (hsize_t)idx, H5P_DEFAULT, H5P_DEFAULT);
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen_by_idx failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::iterateAttrs
|
||||
///\brief Iterates a user's function over all the attributes of an H5
|
||||
/// object, which may be a group, dataset or named datatype.
|
||||
///\param user_op - IN: User's function to operate on each attribute
|
||||
///\param _idx - IN/OUT: Starting (IN) and ending (OUT) attribute indices
|
||||
///\param op_data - IN: User's data to pass to user's operator function
|
||||
///\return Returned value of the last operator if it was non-zero, or
|
||||
/// zero if all attributes were processed
|
||||
///\exception H5::AttributeIException
|
||||
///\par Description
|
||||
/// The signature of user_op is
|
||||
/// void (*)(H5::H5Location&, H5std_string, void*).
|
||||
/// For information, please refer to the C layer Reference Manual
|
||||
/// at:
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-Iterate
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
int H5Location::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_data )
|
||||
{
|
||||
// store the user's function and data
|
||||
UserData4Aiterate* userData = new UserData4Aiterate;
|
||||
userData->opData = op_data;
|
||||
userData->op = user_op;
|
||||
userData->location = this;
|
||||
|
||||
// call the C library routine H5Aiterate2 to iterate the attributes
|
||||
hsize_t idx = _idx ? (hsize_t)*_idx : 0;
|
||||
int ret_value = H5Aiterate2(getId(), H5_INDEX_NAME, H5_ITER_INC, &idx,
|
||||
userAttrOpWrpr, (void *) userData);
|
||||
|
||||
// release memory
|
||||
delete userData;
|
||||
|
||||
if( ret_value >= 0 ) {
|
||||
/* Pass back update index value to calling code */
|
||||
if (_idx)
|
||||
*_idx = (unsigned)idx;
|
||||
|
||||
return( ret_value );
|
||||
}
|
||||
else // raise exception when H5Aiterate returns a negative value
|
||||
throw AttributeIException(inMemFunc("iterateAttrs"), "H5Aiterate2 failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::getNumAttrs
|
||||
///\brief Returns the number of attributes attached to this HDF5 object.
|
||||
///\return Number of attributes
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
int H5Location::getNumAttrs() const
|
||||
{
|
||||
H5O_info_t oinfo; /* Object info */
|
||||
|
||||
if(H5Oget_info(getId(), &oinfo) < 0)
|
||||
throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed");
|
||||
else
|
||||
return( (int)oinfo.num_attrs );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::attrExists
|
||||
///\brief Checks whether the named attribute exists at this location.
|
||||
///\param name - IN: Name of the attribute to be queried
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2013
|
||||
//--------------------------------------------------------------------------
|
||||
bool H5Location::attrExists(const char* name) const
|
||||
{
|
||||
// Call C routine H5Aexists to determine whether an attribute exists
|
||||
// at this location, which could be specified by a file, group, dataset,
|
||||
// or named datatype.
|
||||
herr_t ret_value = H5Aexists(getId(), name);
|
||||
if( ret_value > 0 )
|
||||
return true;
|
||||
else if(ret_value == 0)
|
||||
return false;
|
||||
else // Raise exception when H5Aexists returns a negative value
|
||||
throw AttributeIException(inMemFunc("attrExists"), "H5Aexists failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::attrExists
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
bool H5Location::attrExists(const H5std_string& name) const
|
||||
{
|
||||
return(attrExists(name.c_str()));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::removeAttr
|
||||
///\brief Removes the named attribute from this object.
|
||||
///\param name - IN: Name of the attribute to be removed
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::removeAttr( const char* name ) const
|
||||
{
|
||||
herr_t ret_value = H5Adelete(getId(), name);
|
||||
if( ret_value < 0 )
|
||||
throw AttributeIException(inMemFunc("removeAttr"), "H5Adelete failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::removeAttr
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c H5std_string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::removeAttr( const H5std_string& name ) const
|
||||
{
|
||||
removeAttr( name.c_str() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::renameAttr
|
||||
///\brief Renames the named attribute from this object.
|
||||
///\param oldname - IN: Name of the attribute to be renamed
|
||||
///\param newname - IN: New name ame of the attribute
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Mar, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::renameAttr(const char* oldname, const char* newname) const
|
||||
{
|
||||
herr_t ret_value = H5Arename(getId(), oldname, newname);
|
||||
if (ret_value < 0)
|
||||
throw AttributeIException(inMemFunc("renameAttr"), "H5Arename failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::renameAttr
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c H5std_string for the names.
|
||||
// Programmer Binh-Minh Ribler - Mar, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::renameAttr(const H5std_string& oldname, const H5std_string& newname) const
|
||||
{
|
||||
renameAttr (oldname.c_str(), newname.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::flush
|
||||
///\brief Flushes all buffers associated with a location to disk.
|
||||
///\param scope - IN: Specifies the scope of the flushing action,
|
||||
/// which can be either of these values:
|
||||
/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
|
||||
/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
|
||||
///\exception H5::FileIException
|
||||
///\par Description
|
||||
/// This location is used to identify the file to be flushed.
|
||||
// Programmer Binh-Minh Ribler - 2012
|
||||
// Modification
|
||||
// Sep 2012 - BMR
|
||||
// Moved from H5File/H5Object
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::flush(H5F_scope_t scope) const
|
||||
{
|
||||
herr_t ret_value = H5Fflush(getId(), scope);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw FileIException(inMemFunc("flush"), "H5Fflush failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::getFileName
|
||||
///\brief Gets the name of the file, in which this HDF5 object belongs.
|
||||
///\return File name
|
||||
///\exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string H5Location::getFileName() const
|
||||
{
|
||||
try {
|
||||
return(p_get_file_name());
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw FileIException(inMemFunc("getFileName"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::p_reference (protected)
|
||||
// Purpose Creates a reference to an HDF5 object or a dataset region.
|
||||
// Parameters
|
||||
// name - IN: Name of the object to be referenced
|
||||
// dataspace - IN: Dataspace with selection
|
||||
// ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
|
||||
// Exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const
|
||||
{
|
||||
herr_t ret_value = H5Rcreate(ref, getId(), name, ref_type, space_id);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw ReferenceException("", "H5Rcreate failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::reference
|
||||
///\brief Creates a reference to an HDF5 object or a dataset region.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced
|
||||
///\param dataspace - IN: Dataspace with selection
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT - Reference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION - Reference is a dataset region
|
||||
/// reference. - this is the default
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::reference(void* ref, const char* name, const DataSpace& dataspace, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
p_reference(ref, name, dataspace.getId(), ref_type);
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException("H5Location::reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::reference
|
||||
///\brief This is an overloaded function, provided for your convenience.
|
||||
/// It differs from the above function in that it only creates
|
||||
/// a reference to an HDF5 object, not to a dataset region.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced - \c char pointer
|
||||
///\exception H5::ReferenceException
|
||||
///\par Description
|
||||
// This function passes H5R_OBJECT and -1 to the protected
|
||||
// function for it to pass to the C API H5Rcreate
|
||||
// to create a reference to the named object.
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::reference(void* ref, const char* name) const
|
||||
{
|
||||
try {
|
||||
p_reference(ref, name, -1, H5R_OBJECT);
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException("H5Location::reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::reference
|
||||
///\brief This is an overloaded function, provided for your convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c H5std_string for the object's name.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced - \c H5std_string
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::reference(void* ref, const H5std_string& name) const
|
||||
{
|
||||
reference(ref, name.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::p_dereference (protected)
|
||||
// Purpose Dereference a ref into an hdf5 object.
|
||||
// Parameters
|
||||
// loc_id - IN: An hdf5 identifier specifying the location of the
|
||||
// referenced object
|
||||
// ref - IN: Reference pointer
|
||||
// ref_type - IN: Reference type
|
||||
// Exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May 2008 - BMR
|
||||
// Moved from IdComponent.
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t H5Location::p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type)
|
||||
{
|
||||
hid_t temp_id;
|
||||
temp_id = H5Rdereference2(loc_id, H5P_DEFAULT, ref_type, ref);
|
||||
if (temp_id < 0)
|
||||
{
|
||||
throw ReferenceException("", "H5Rdereference failed");
|
||||
}
|
||||
|
||||
// No failure, set id to the object
|
||||
return(temp_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::dereference
|
||||
///\brief Dereferences a reference into an HDF5 object, given an HDF5 object.
|
||||
///\param obj - IN: Object specifying the location of the referenced object
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May, 2008
|
||||
// Corrected missing parameters. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::dereference(H5Object& obj, const void* ref, H5R_type_t ref_type)
|
||||
{
|
||||
hid_t temp_id;
|
||||
try {
|
||||
temp_id = p_dereference(obj.getId(), ref, ref_type);
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException("H5Location::dereference - located by object", E.getDetailMsg());
|
||||
}
|
||||
p_setId(temp_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::dereference
|
||||
///\brief Dereferences a reference into an HDF5 object, given an HDF5 file.
|
||||
///\param h5file - IN: HDF5 file specifying the location of the referenced object
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May, 2008
|
||||
// Corrected missing parameters. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::dereference(H5File& h5file, const void* ref, H5R_type_t ref_type)
|
||||
{
|
||||
hid_t temp_id;
|
||||
try {
|
||||
temp_id = p_dereference(h5file.getId(), ref, ref_type);
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException("H5Location::dereference - located by file", E.getDetailMsg());
|
||||
}
|
||||
p_setId(temp_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::dereference
|
||||
///\brief Dereferences a reference into an HDF5 object, given an attribute.
|
||||
///\param attr - IN: Attribute specifying the location of the referenced object
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May, 2008
|
||||
// Corrected missing parameters. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Location::dereference(Attribute& attr, const void* ref, H5R_type_t ref_type)
|
||||
{
|
||||
hid_t temp_id;
|
||||
try {
|
||||
temp_id = p_dereference(attr.getId(), ref, ref_type);
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException("H5Location::dereference - located by attribute", E.getDetailMsg());
|
||||
}
|
||||
p_setId(temp_id);
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::getObjType
|
||||
///\brief Retrieves the type of object that an object reference points to.
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT \tReference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION \tReference is a dataset region reference.
|
||||
///\param ref - IN: Reference to query
|
||||
///\return An object type, which can be one of the following:
|
||||
/// \li \c H5G_UNKNOWN \tA failure occurs. (-1)
|
||||
/// \li \c H5G_GROUP \tObject is a group.
|
||||
/// \li \c H5G_DATASET \tObject is a dataset.
|
||||
/// \li \c H5G_TYPE Object \tis a named datatype
|
||||
/// \li \c H5G_LINK \tObject is a symbolic link.
|
||||
/// \li \c H5G_UDLINK \tObject is a user-defined link.
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
// Modification
|
||||
// Sep 2012: Moved up from H5File, Group, DataSet, and DataType
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t H5Location::getObjType(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
return(p_get_obj_type(ref, ref_type));
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException("H5Location::getObjType", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::p_get_obj_type (protected)
|
||||
// Purpose Retrieves the type of object that an object reference points to.
|
||||
// Parameters
|
||||
// ref - IN: Reference to query
|
||||
// ref_type - IN: Type of reference to query
|
||||
// Return An object type, which can be one of the following:
|
||||
// H5G_UNKNOWN \tFailure occurs (-1)
|
||||
// H5G_GROUP \tObject is a group.
|
||||
// H5G_DATASET \tObject is a dataset.
|
||||
// H5G_TYPE Object \tis a named datatype.
|
||||
// H5G_LINK \tObject is a symbolic link.
|
||||
// H5G_UDLINK \tObject is a user-defined link.
|
||||
// Exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t H5Location::p_get_obj_type(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
H5G_obj_t obj_type = H5Rget_obj_type1(getId(), ref_type, ref);
|
||||
|
||||
if (obj_type == H5G_UNKNOWN)
|
||||
{
|
||||
throw ReferenceException("", "H5Rget_obj_type1 failed");
|
||||
}
|
||||
return(obj_type);
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::getRefObjType
|
||||
///\brief Retrieves the type of object that an object reference points to.
|
||||
///\param ref - IN: Reference to query
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT - Reference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION - Reference is a dataset region reference.
|
||||
///\return An object type, which can be one of the following:
|
||||
/// \li \c H5O_TYPE_UNKNOWN - Unknown object type (-1)
|
||||
/// \li \c H5O_TYPE_GROUP - Object is a group
|
||||
/// \li \c H5O_TYPE_DATASET - Object is a dataset
|
||||
/// \li \c H5O_TYPE_NAMED_DATATYPE - Object is a named datatype
|
||||
/// \li \c H5O_TYPE_NTYPES - Number of different object types
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5O_type_t H5Location::getRefObjType(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
return(p_get_ref_obj_type(ref, ref_type));
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException("H5Location::getRefObjType", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::p_get_ref_obj_type (protected)
|
||||
// Purpose Retrieves the type of object that an object reference points to.
|
||||
// Parameters
|
||||
// ref - IN: Reference to query
|
||||
// ref_type - IN: Type of reference to query
|
||||
// Return An object type, which can be one of the following:
|
||||
// H5O_TYPE_UNKNOWN - Unknown object type (-1)
|
||||
// H5O_TYPE_GROUP - Object is a group
|
||||
// H5O_TYPE_DATASET - Object is a dataset
|
||||
// H5O_TYPE_NAMED_DATATYPE - Object is a named datatype
|
||||
// H5O_TYPE_NTYPES - Number of object types
|
||||
// Exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5O_type_t H5Location::p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
H5O_type_t obj_type = H5O_TYPE_UNKNOWN;
|
||||
herr_t ret_value = H5Rget_obj_type2(getId(), ref_type, ref, &obj_type);
|
||||
|
||||
if (obj_type == H5O_TYPE_UNKNOWN || obj_type >= H5O_TYPE_NTYPES)
|
||||
{
|
||||
throw ReferenceException("", "H5Rget_obj_type2 failed");
|
||||
}
|
||||
return(obj_type);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location::p_get_region (protected)
|
||||
// Purpose Retrieves a dataspace with the region pointed to selected.
|
||||
// Parameters
|
||||
// ref_type - IN: Type of reference to get region of - default
|
||||
// to H5R_DATASET_REGION
|
||||
// ref - IN: Reference to get region of
|
||||
// Return Dataspace id
|
||||
// Exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t H5Location::p_get_region(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
hid_t space_id = H5Rget_region(getId(), ref_type, ref);
|
||||
if (space_id < 0)
|
||||
{
|
||||
throw ReferenceException("", "H5Rget_region failed");
|
||||
}
|
||||
return(space_id);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Location destructor
|
||||
///\brief Noop destructor.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Location::~H5Location() {}
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
} // end namespace
|
||||
#endif
|
||||
150
c++/src/H5Location.h
Normal file
150
c++/src/H5Location.h
Normal file
@@ -0,0 +1,150 @@
|
||||
// C++ informative line for the emacs editor: -*- C++ -*-
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _H5Location_H
|
||||
#define _H5Location_H
|
||||
|
||||
#include "H5Classes.h" // constains forward class declarations
|
||||
|
||||
// H5Location is an abstract class. It provides a collection of wrappers
|
||||
// of C functions which take location IDs. Most of these were in H5Object
|
||||
// but are now moved here for H5File's access.
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
class H5_DLLCPP H5Location; // forward declaration for UserData4Aiterate
|
||||
|
||||
// Define the operator function pointer for H5Aiterate().
|
||||
typedef void (*attr_operator_t)( H5Location& loc/*in*/,
|
||||
const H5std_string attr_name/*in*/,
|
||||
void *operator_data/*in,out*/);
|
||||
|
||||
class UserData4Aiterate { // user data for attribute iteration
|
||||
public:
|
||||
attr_operator_t op;
|
||||
void* opData;
|
||||
H5Location* location;
|
||||
};
|
||||
|
||||
// An H5Location can be a file, group, dataset, named datatype, or attribute.
|
||||
|
||||
class H5_DLLCPP H5Location : public IdComponent {
|
||||
public:
|
||||
// Creates an attribute for the specified object at this location
|
||||
// PropList is currently not used, so always be default.
|
||||
Attribute createAttribute( const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
|
||||
Attribute createAttribute( const H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
|
||||
|
||||
// Given its name, opens the attribute that belongs to an object at
|
||||
// this location.
|
||||
Attribute openAttribute( const char* name ) const;
|
||||
Attribute openAttribute( const H5std_string& name ) const;
|
||||
|
||||
// Given its index, opens the attribute that belongs to an object at
|
||||
// this location.
|
||||
Attribute openAttribute( const unsigned int idx ) const;
|
||||
|
||||
// Flushes all buffers associated with this location to disk.
|
||||
void flush( H5F_scope_t scope ) const;
|
||||
|
||||
// Gets the name of the file, specified by this location.
|
||||
H5std_string getFileName() const;
|
||||
|
||||
// Determines the number of attributes at this location.
|
||||
int getNumAttrs() const;
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5O_type_t getRefObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
|
||||
// Note: getRefObjType deprecates getObjType, but getObjType's name is
|
||||
// misleading, so getRefObjType is used in the new function instead.
|
||||
|
||||
// Iterate user's function over the attributes at this location.
|
||||
int iterateAttrs(attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL);
|
||||
|
||||
// Checks whether the named attribute exists at this location.
|
||||
bool attrExists(const char* name) const;
|
||||
bool attrExists(const H5std_string& name) const;
|
||||
|
||||
// Removes the named attribute from this location.
|
||||
void removeAttr(const char* name) const;
|
||||
void removeAttr(const H5std_string& name) const;
|
||||
|
||||
// Renames the named attribute to a new name.
|
||||
void renameAttr(const char* oldname, const char* newname) const;
|
||||
void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
|
||||
|
||||
// Creates a reference to a named object or to a dataset region
|
||||
// in this object.
|
||||
void reference(void* ref, const char* name, const DataSpace& dataspace,
|
||||
H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
void reference(void* ref, const char* name) const;
|
||||
void reference(void* ref, const H5std_string& name) const;
|
||||
|
||||
// Open a referenced object whose location is specified by either
|
||||
// a file, an HDF5 object, or an attribute.
|
||||
void dereference(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
void dereference(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
void dereference(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
|
||||
// For subclasses.
|
||||
virtual hid_t getId() const = 0;
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Default constructor,
|
||||
H5Location();
|
||||
|
||||
// Creates a copy of an existing object giving the location id.
|
||||
H5Location(const hid_t loc_id);
|
||||
|
||||
// Copy constructor.
|
||||
H5Location(const H5Location& original);
|
||||
|
||||
// Creates a reference to an HDF5 object or a dataset region.
|
||||
void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
|
||||
|
||||
// Dereferences a ref into an HDF5 id.
|
||||
hid_t p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type);
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5O_type_t p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const;
|
||||
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
hid_t p_get_region(void *ref, H5R_type_t ref_type) const;
|
||||
|
||||
// Noop destructor.
|
||||
virtual ~H5Location();
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
}; /* end class H5Location */
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -37,30 +37,11 @@ namespace H5 {
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// userAttrOpWrpr simply interfaces between the user's function and the
|
||||
// C library function H5Aiterate2; used to resolve the different prototype
|
||||
// problem. May be moved to Iterator later.
|
||||
extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
|
||||
const H5A_info_t *ainfo, void *op_data)
|
||||
{
|
||||
H5std_string s_attr_name = H5std_string( attr_name );
|
||||
#ifdef NO_STATIC_CAST
|
||||
UserData4Aiterate* myData = (UserData4Aiterate *) op_data;
|
||||
#else
|
||||
UserData4Aiterate* myData = static_cast <UserData4Aiterate *> (op_data);
|
||||
#endif
|
||||
myData->op( *myData->object, s_attr_name, myData->opData );
|
||||
return 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object default constructor (protected)
|
||||
// Description
|
||||
// The id is set by IdComponent() but subclass constructor will
|
||||
// set it to a valid HDF5 id.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Object::H5Object() : IdComponent(0) {}
|
||||
H5Object::H5Object() : H5Location() {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object overloaded constructor (protected)
|
||||
@@ -69,7 +50,7 @@ H5Object::H5Object() : IdComponent(0) {}
|
||||
// Parameters object_id - IN: Id of an existing HDF5 object
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Object::H5Object( const hid_t object_id ) : IdComponent( object_id ) {}
|
||||
H5Object::H5Object( const hid_t object_id ) : H5Location( object_id ) {}
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
@@ -80,493 +61,7 @@ H5Object::H5Object( const hid_t object_id ) : IdComponent( object_id ) {}
|
||||
///\param original - IN: H5Object instance to copy
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
H5Object::H5Object( const H5Object& original ) : IdComponent( original ) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::createAttribute
|
||||
///\brief Creates an attribute for a group, dataset, or named datatype.
|
||||
///\param name - IN: Name of the attribute
|
||||
///\param data_type - IN: Datatype for the attribute
|
||||
///\param data_space - IN: Dataspace for the attribute - only simple
|
||||
/// dataspaces are allowed at this time
|
||||
///\param create_plist - IN: Creation property list - default to
|
||||
/// PropList::DEFAULT
|
||||
///\return Attribute instance
|
||||
///\exception H5::AttributeIException
|
||||
///\par Description
|
||||
/// The attribute name specified in \a name must be unique.
|
||||
/// Attempting to create an attribute with the same name as an
|
||||
/// existing attribute will raise an exception, leaving the
|
||||
/// pre-existing attribute intact. To overwrite an existing
|
||||
/// attribute with a new attribute of the same name, first
|
||||
/// delete the existing one with \c H5Object::removeAttr, then
|
||||
/// recreate it with this function.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Object::createAttribute( const char* name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
|
||||
{
|
||||
hid_t type_id = data_type.getId();
|
||||
hid_t space_id = data_space.getId();
|
||||
hid_t plist_id = create_plist.getId();
|
||||
hid_t attr_id = H5Acreate2(getId(), name, type_id, space_id, plist_id, H5P_DEFAULT );
|
||||
|
||||
// If the attribute id is valid, create and return the Attribute object
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
}
|
||||
else
|
||||
throw AttributeIException(inMemFunc("createAttribute"), "H5Acreate2 failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::createAttribute
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c std::string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Object::createAttribute( const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
|
||||
{
|
||||
return( createAttribute( name.c_str(), data_type, data_space, create_plist ));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::openAttribute
|
||||
///\brief Opens an attribute given its name.
|
||||
///\param name - IN: Name of the attribute
|
||||
///\return Attribute instance
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Object::openAttribute( const char* name ) const
|
||||
{
|
||||
hid_t attr_id = H5Aopen(getId(), name, H5P_DEFAULT);
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::openAttribute
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c std::string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Object::openAttribute( const H5std_string& name ) const
|
||||
{
|
||||
return( openAttribute( name.c_str()) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::openAttribute
|
||||
///\brief Opens an attribute given its index.
|
||||
///\param idx - IN: Index of the attribute, a 0-based, non-negative integer
|
||||
///\return Attribute instance
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
Attribute H5Object::openAttribute( const unsigned int idx ) const
|
||||
{
|
||||
hid_t attr_id = H5Aopen_by_idx(getId(), ".", H5_INDEX_CRT_ORDER,
|
||||
H5_ITER_INC, (hsize_t)idx, H5P_DEFAULT, H5P_DEFAULT);
|
||||
if( attr_id > 0 )
|
||||
{
|
||||
Attribute attr( attr_id );
|
||||
return( attr );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw AttributeIException(inMemFunc("openAttribute"), "H5Aopen_by_idx failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::iterateAttrs
|
||||
///\brief Iterates a user's function over all the attributes of an H5
|
||||
/// object, which may be a group, dataset or named datatype.
|
||||
///\param user_op - IN: User's function to operate on each attribute
|
||||
///\param idx - IN/OUT: Starting (IN) and ending (OUT) attribute indices
|
||||
///\param op_data - IN: User's data to pass to user's operator function
|
||||
///\return Returned value of the last operator if it was non-zero, or
|
||||
/// zero if all attributes were processed
|
||||
///\exception H5::AttributeIException
|
||||
///\par Description
|
||||
/// For information, please refer to the C layer Reference Manual
|
||||
/// at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5A.html#Annot-Iterate
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
int H5Object::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_data )
|
||||
{
|
||||
// store the user's function and data
|
||||
UserData4Aiterate* userData = new UserData4Aiterate;
|
||||
userData->opData = op_data;
|
||||
userData->op = user_op;
|
||||
userData->object = this;
|
||||
|
||||
// call the C library routine H5Aiterate2 to iterate the attributes
|
||||
hsize_t idx = (hsize_t)*_idx;
|
||||
int ret_value = H5Aiterate2(getId(), H5_INDEX_NAME, H5_ITER_INC, &idx,
|
||||
userAttrOpWrpr, (void *) userData);
|
||||
|
||||
// release memory
|
||||
delete userData;
|
||||
|
||||
if( ret_value >= 0 ) {
|
||||
/* Pass back update index value to calling code */
|
||||
*_idx = (unsigned)idx;
|
||||
|
||||
return( ret_value );
|
||||
}
|
||||
else // raise exception when H5Aiterate returns a negative value
|
||||
throw AttributeIException(inMemFunc("iterateAttrs"), "H5Aiterate2 failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::getNumAttrs
|
||||
///\brief Returns the number of attributes attached to this HDF5 object.
|
||||
///\return Number of attributes
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
int H5Object::getNumAttrs() const
|
||||
{
|
||||
H5O_info_t oinfo; /* Object info */
|
||||
|
||||
if(H5Oget_info(getId(), &oinfo) < 0)
|
||||
throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed");
|
||||
else
|
||||
return( (int)oinfo.num_attrs );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::removeAttr
|
||||
///\brief Removes the named attribute from this object.
|
||||
///\param name - IN: Name of the attribute to be removed
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::removeAttr( const char* name ) const
|
||||
{
|
||||
herr_t ret_value = H5Adelete(getId(), name);
|
||||
if( ret_value < 0 )
|
||||
throw AttributeIException(inMemFunc("removeAttr"), "H5Adelete failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::removeAttr
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c std::string for \a name.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::removeAttr( const H5std_string& name ) const
|
||||
{
|
||||
removeAttr( name.c_str() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::renameAttr
|
||||
///\brief Renames the named attribute from this object.
|
||||
///\param oldname - IN: Name of the attribute to be renamed
|
||||
///\param newname - IN: New name ame of the attribute
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - Mar, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::renameAttr(const char* oldname, const char* newname) const
|
||||
{
|
||||
herr_t ret_value = H5Arename(getId(), oldname, newname);
|
||||
if (ret_value < 0)
|
||||
throw AttributeIException(inMemFunc("renameAttr"), "H5Arename failed");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::renameAttr
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes
|
||||
/// a reference to an \c std::string for the names.
|
||||
// Programmer Binh-Minh Ribler - Mar, 2005
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::renameAttr(const H5std_string& oldname, const H5std_string& newname) const
|
||||
{
|
||||
renameAttr (oldname.c_str(), newname.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::flush
|
||||
///\brief Flushes all buffers associated with a file to disk.
|
||||
///\param scope - IN: Specifies the scope of the flushing action,
|
||||
/// which can be either of these values:
|
||||
/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
|
||||
/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
|
||||
///\exception H5::AttributeIException
|
||||
///\par Description
|
||||
/// This object is used to identify the file to be flushed.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::flush(H5F_scope_t scope) const
|
||||
{
|
||||
herr_t ret_value = H5Fflush(getId(), scope);
|
||||
if( ret_value < 0 )
|
||||
{
|
||||
throw FileIException(inMemFunc("flush"), "H5Fflush failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::getFileName
|
||||
///\brief Gets the name of the file, in which this HDF5 object belongs.
|
||||
///\return File name
|
||||
///\exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - Jul, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string H5Object::getFileName() const
|
||||
{
|
||||
try {
|
||||
return(p_get_file_name());
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw FileIException(inMemFunc("getFileName"), E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::p_reference (protected)
|
||||
// Purpose Creates a reference to an HDF5 object or a dataset region.
|
||||
// Parameters
|
||||
// name - IN: Name of the object to be referenced
|
||||
// dataspace - IN: Dataspace with selection
|
||||
// ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
|
||||
// Exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const
|
||||
{
|
||||
herr_t ret_value = H5Rcreate(ref, getId(), name, ref_type, space_id);
|
||||
if (ret_value < 0)
|
||||
{
|
||||
throw IdComponentException("", "H5Rcreate failed");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::reference
|
||||
///\brief Creates a reference to an HDF5 object or a dataset region.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced
|
||||
///\param dataspace - IN: Dataspace with selection
|
||||
///\param ref_type - IN: Type of reference to query, valid values are:
|
||||
/// \li \c H5R_OBJECT \tReference is an object reference.
|
||||
/// \li \c H5R_DATASET_REGION \tReference is a dataset region
|
||||
/// reference. - this is the default
|
||||
///\exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::reference(void* ref, const char* name, const DataSpace& dataspace, H5R_type_t ref_type) const
|
||||
{
|
||||
try {
|
||||
p_reference(ref, name, dataspace.getId(), ref_type);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw IdComponentException("H5Object::reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::reference
|
||||
///\brief This is an overloaded function, provided for your convenience.
|
||||
/// It differs from the above function in that it only creates
|
||||
/// a reference to an HDF5 object, not to a dataset region.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced - \c char pointer
|
||||
///\exception H5::IdComponentException
|
||||
///\par Description
|
||||
// This function passes H5R_OBJECT and -1 to the protected
|
||||
// function for it to pass to the C API H5Rcreate
|
||||
// to create a reference to the named object.
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::reference(void* ref, const char* name) const
|
||||
{
|
||||
try {
|
||||
p_reference(ref, name, -1, H5R_OBJECT);
|
||||
}
|
||||
catch (IdComponentException E) {
|
||||
throw IdComponentException("H5Object::reference", E.getDetailMsg());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::reference
|
||||
///\brief This is an overloaded function, provided for your convenience.
|
||||
/// It differs from the above function in that it takes an
|
||||
/// \c std::string for the object's name.
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param name - IN: Name of the object to be referenced - \c std::string
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::reference(void* ref, const H5std_string& name) const
|
||||
{
|
||||
reference(ref, name.c_str());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::p_dereference (protected)
|
||||
// Purpose Dereference a ref into an hdf5 object.
|
||||
// Parameters
|
||||
// loc_id - IN: An hdf5 identifier specifying the location of the
|
||||
// referenced object
|
||||
// ref - IN: Reference pointer
|
||||
// ref_type - IN: Reference type
|
||||
// Exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May 2008 - BMR
|
||||
// Moved from IdComponent.
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t H5Object::p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type)
|
||||
{
|
||||
hid_t temp_id;
|
||||
temp_id = H5Rdereference(loc_id, ref_type, ref);
|
||||
if (temp_id < 0)
|
||||
{
|
||||
throw ReferenceException("", "H5Rdereference failed");
|
||||
}
|
||||
|
||||
// No failure, set id to the object
|
||||
return(temp_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::dereference
|
||||
///\brief Dereferences a reference into an HDF5 object, given an HDF5 object.
|
||||
///\param obj - IN: Object specifying the location of the referenced object
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May, 2008
|
||||
// Corrected missing parameters. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::dereference(H5Object& obj, const void* ref, H5R_type_t ref_type)
|
||||
{
|
||||
hid_t temp_id;
|
||||
try {
|
||||
temp_id = p_dereference(obj.getId(), ref, ref_type);
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException("H5Object::dereference - located by object", E.getDetailMsg());
|
||||
}
|
||||
p_setId(temp_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::dereference
|
||||
///\brief Dereferences a reference into an HDF5 object, given an HDF5 file.
|
||||
///\param h5file - IN: HDF5 file specifying the location of the referenced object
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May, 2008
|
||||
// Corrected missing parameters. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::dereference(H5File& h5file, const void* ref, H5R_type_t ref_type)
|
||||
{
|
||||
hid_t temp_id;
|
||||
try {
|
||||
temp_id = p_dereference(h5file.getId(), ref, ref_type);
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException("H5Object::dereference - located by file", E.getDetailMsg());
|
||||
}
|
||||
p_setId(temp_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::dereference
|
||||
///\brief Dereferences a reference into an HDF5 object, given an attribute.
|
||||
///\param attr - IN: Attribute specifying the location of the referenced object
|
||||
///\param ref - IN: Reference pointer
|
||||
///\param ref_type - IN: Reference type
|
||||
///\exception H5::ReferenceException
|
||||
// Programmer Binh-Minh Ribler - Oct, 2006
|
||||
// Modification
|
||||
// May, 2008
|
||||
// Corrected missing parameters. - BMR
|
||||
//--------------------------------------------------------------------------
|
||||
void H5Object::dereference(Attribute& attr, const void* ref, H5R_type_t ref_type)
|
||||
{
|
||||
hid_t temp_id;
|
||||
try {
|
||||
temp_id = p_dereference(attr.getId(), ref, ref_type);
|
||||
}
|
||||
catch (ReferenceException E) {
|
||||
throw ReferenceException("H5Object::dereference - located by attribute", E.getDetailMsg());
|
||||
}
|
||||
p_setId(temp_id);
|
||||
}
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::p_get_obj_type (protected)
|
||||
// Purpose Retrieves the type of object that an object reference points to.
|
||||
// Parameters
|
||||
// ref - IN: Reference to query
|
||||
// ref_type - IN: Type of reference to query
|
||||
// Return An object type, which can be one of the following:
|
||||
// H5G_LINK Object is a symbolic link.
|
||||
// H5G_GROUP Object is a group.
|
||||
// H5G_DATASET Object is a dataset.
|
||||
// H5G_TYPE Object is a named datatype
|
||||
// Exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
H5G_obj_t H5Object::p_get_obj_type(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
H5G_obj_t obj_type = H5Rget_obj_type1(getId(), ref_type, ref);
|
||||
|
||||
if (obj_type == H5G_UNKNOWN)
|
||||
{
|
||||
throw IdComponentException("", "H5Rget_obj_type failed");
|
||||
}
|
||||
return(obj_type);
|
||||
}
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object::p_get_region (protected)
|
||||
// Purpose Retrieves a dataspace with the region pointed to selected.
|
||||
// Parameters
|
||||
// ref_type - IN: Type of reference to get region of - default
|
||||
// to H5R_DATASET_REGION
|
||||
// ref - IN: Reference to get region of
|
||||
// Return Dataspace id
|
||||
// Exception H5::IdComponentException
|
||||
// Programmer Binh-Minh Ribler - May, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
hid_t H5Object::p_get_region(void *ref, H5R_type_t ref_type) const
|
||||
{
|
||||
hid_t space_id = H5Rget_region(getId(), ref_type, ref);
|
||||
if (space_id < 0)
|
||||
{
|
||||
throw IdComponentException("", "H5Rget_region failed");
|
||||
}
|
||||
return(space_id);
|
||||
}
|
||||
|
||||
H5Object::H5Object( const H5Object& original ) : H5Location( original ) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: H5Object destructor
|
||||
|
||||
@@ -17,81 +17,29 @@
|
||||
#ifndef _H5Object_H
|
||||
#define _H5Object_H
|
||||
|
||||
#include "H5Location.h"
|
||||
#include "H5Classes.h" // constains forward class declarations
|
||||
|
||||
// H5Object is a baseclass. It has these subclasses:
|
||||
// Group, DataSet, and DataType.
|
||||
// DataType, in turn, has several specific datatypes as subclasses.
|
||||
// Modification:
|
||||
// Sept 18, 2012: Added class H5Location in between IdComponent and
|
||||
// H5Object. An H5File now inherits from H5Location. All HDF5
|
||||
// wrappers in H5Object are moved up to H5Location. H5Object
|
||||
// is left mostly empty for future wrappers that are only for
|
||||
// group, dataset, and named datatype. Note that the reason for
|
||||
// adding H5Location instead of simply moving H5File to be under
|
||||
// H5Object is H5File is not an HDF5 object, and renaming H5Object
|
||||
// to H5Location will risk breaking user applications.
|
||||
// -BMR
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate
|
||||
|
||||
// Define the operator function pointer for H5Aiterate().
|
||||
typedef void (*attr_operator_t)( H5Object& loc/*in*/,
|
||||
const H5std_string attr_name/*in*/,
|
||||
void *operator_data/*in,out*/);
|
||||
|
||||
class UserData4Aiterate { // user data for attribute iteration
|
||||
class H5_DLLCPP H5Object : public H5Location {
|
||||
public:
|
||||
attr_operator_t op;
|
||||
void* opData;
|
||||
H5Object* object;
|
||||
};
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
// The above part is being moved into Iterator, but not completed
|
||||
|
||||
class H5_DLLCPP H5Object : public IdComponent {
|
||||
public:
|
||||
// Creates an attribute for a group, dataset, or named datatype.
|
||||
// PropList is currently not used, so always be default.
|
||||
Attribute createAttribute( const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
|
||||
Attribute createAttribute( const H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
|
||||
|
||||
// Opens an attribute given its name.
|
||||
Attribute openAttribute( const char* name ) const;
|
||||
Attribute openAttribute( const H5std_string& name ) const;
|
||||
|
||||
// Opens an attribute given its index.
|
||||
Attribute openAttribute( const unsigned int idx ) const;
|
||||
|
||||
// Flushes all buffers associated with this object to disk
|
||||
void flush( H5F_scope_t scope ) const;
|
||||
|
||||
// Gets the name of the file, in which this HDF5 object belongs.
|
||||
H5std_string getFileName() const;
|
||||
|
||||
// Determines the number of attributes attached to this object.
|
||||
int getNumAttrs() const;
|
||||
|
||||
// Iterate user's function over the attributes of this object
|
||||
int iterateAttrs( attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL );
|
||||
|
||||
// Removes the named attribute from this object.
|
||||
void removeAttr( const char* name ) const;
|
||||
void removeAttr( const H5std_string& name ) const;
|
||||
|
||||
// Renames the attribute to a new name.
|
||||
void renameAttr(const char* oldname, const char* newname) const;
|
||||
void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
|
||||
|
||||
// Creates a reference to a named Hdf5 object or to a dataset region
|
||||
// in this object.
|
||||
void reference(void* ref, const char* name, const DataSpace& dataspace,
|
||||
H5R_type_t ref_type = H5R_DATASET_REGION) const;
|
||||
void reference(void* ref, const char* name) const;
|
||||
void reference(void* ref, const H5std_string& name) const;
|
||||
|
||||
// Open a referenced HDF5 object whose location is specified by either
|
||||
// a file, an HDF5 object, or an attribute.
|
||||
void dereference(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
void dereference(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
void dereference(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
|
||||
|
||||
// Copy constructor: makes copy of an H5Object object.
|
||||
H5Object(const H5Object& original);
|
||||
|
||||
@@ -106,23 +54,6 @@ class H5_DLLCPP H5Object : public IdComponent {
|
||||
// Creates a copy of an existing object giving the object id
|
||||
H5Object( const hid_t object_id );
|
||||
|
||||
// Gets the id of the H5 file in which the given object is located.
|
||||
hid_t p_get_file_id();
|
||||
|
||||
// Creates a reference to an HDF5 object or a dataset region.
|
||||
void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
|
||||
|
||||
// Dereferences a ref into an hdf5 id.
|
||||
hid_t p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type);
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
// Retrieves the type of object that an object reference points to.
|
||||
H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
// Retrieves a dataspace with the region pointed to selected.
|
||||
hid_t p_get_region(void *ref, H5R_type_t ref_type) const;
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
}; /* end class H5Object */
|
||||
|
||||
@@ -44,7 +44,10 @@ namespace H5 {
|
||||
//--------------------------------------------------------------------------
|
||||
PredType::PredType( const hid_t predtype_id ) : AtomType( predtype_id )
|
||||
{
|
||||
id = H5Tcopy(predtype_id);
|
||||
if (predtype_id == H5CPP_EXITED)
|
||||
id = predtype_id;
|
||||
else
|
||||
id = H5Tcopy(predtype_id);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -62,7 +65,8 @@ PredType::PredType() : AtomType() {}
|
||||
//--------------------------------------------------------------------------
|
||||
PredType::PredType( const PredType& original ) : AtomType( original ) {}
|
||||
|
||||
const PredType PredType::NotAtexit; // only for atexit/global dest. problem
|
||||
// Flag to terminate HDF5 library in DataType::~DataType
|
||||
const PredType PredType::AtExit(H5CPP_EXITED);
|
||||
|
||||
// Definition of pre-defined types
|
||||
const PredType PredType::C_S1( H5T_C_S1 );
|
||||
@@ -289,7 +293,6 @@ void PredType::commit( H5Object& loc, const H5std_string& name )
|
||||
bool PredType::committed()
|
||||
{
|
||||
throw DataTypeIException("PredType::committed", "Error: Attempting to check for commit status on a predefined datatype." );
|
||||
return (0);
|
||||
}
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
|
||||
@@ -26,9 +26,17 @@
|
||||
namespace H5 {
|
||||
#endif
|
||||
|
||||
/* This constant is defined for a workaround to eliminate memory leaks due to
|
||||
the library being re-initiated when PredType destructors are invoked. A
|
||||
PredType instant with H5CPP_EXITED as the value of its "id" is constructed
|
||||
before the other PredType objects are created. At exit, when this special
|
||||
PredType object is to be destructed, no HDF5 library function will be called
|
||||
and the library will be terminated. -BMR, Mar 30, 2012 */
|
||||
#define H5CPP_EXITED -3 // -3 is less likely to be used elsewhere
|
||||
|
||||
class H5_DLLCPP PredType : public AtomType {
|
||||
public:
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("PredType"); }
|
||||
|
||||
// Makes a copy of the predefined type and stores the new
|
||||
@@ -229,9 +237,10 @@ class H5_DLLCPP PredType : public AtomType {
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
private:
|
||||
// added this to work around the atexit/global destructor problem
|
||||
// temporarily - it'll prevent the use of atexit to clean up
|
||||
static const PredType NotAtexit; // not working yet
|
||||
// Added this to work around the atexit/global destructor problem.
|
||||
// It'll help to terminate the library after other PredType instances
|
||||
// are closed. -BMR, Mar 30, 2012
|
||||
static const PredType AtExit;
|
||||
|
||||
protected:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "H5PropList.h"
|
||||
#include "H5private.h" // for HDfree
|
||||
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
#ifndef H5_NO_STD
|
||||
@@ -65,29 +66,35 @@ PropList::PropList(const PropList& original) : IdComponent(original)
|
||||
///\param plist_id - IN: Id of the existing property list
|
||||
///\exception H5::PropListIException
|
||||
// Description
|
||||
// This function calls H5Pcreate to create a new property list
|
||||
// if the given id, plist_id, is that of a property class. If
|
||||
// the given id is equal to H5P_ROOT, then set this
|
||||
// property's id to H5P_DEFAULT, otherwise, to the given id.
|
||||
// Note: someone else added this code without comments and this
|
||||
// description was what I came up with from reading the code.
|
||||
// This function creates a new property list if a property
|
||||
// class is provided or makes a copy of a property list if one
|
||||
// is given. If the given id is anything else, then set this
|
||||
// property's id to H5P_DEFAULT.
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
PropList::PropList( const hid_t plist_id ) : IdComponent()
|
||||
{
|
||||
if (H5I_GENPROP_CLS == H5Iget_type(plist_id)) {
|
||||
// call C routine to create the new property
|
||||
id = H5Pcreate(plist_id);
|
||||
if( id < 0 )
|
||||
{
|
||||
throw PropListIException("PropList constructor", "H5Pcreate failed");
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(plist_id==H5P_ROOT)
|
||||
id=H5P_DEFAULT;
|
||||
else
|
||||
id=plist_id;
|
||||
H5I_type_t id_type = H5Iget_type(plist_id);
|
||||
switch (id_type) {
|
||||
case H5I_GENPROP_CLS:
|
||||
// call C routine to create a new property from the given prop class
|
||||
id = H5Pcreate(plist_id);
|
||||
if( id < 0 )
|
||||
{
|
||||
throw PropListIException("PropList constructor", "H5Pcreate failed");
|
||||
}
|
||||
break;
|
||||
case H5I_GENPROP_LST:
|
||||
// call C routine to make a copy of the given property list
|
||||
id = H5Pcopy(plist_id);
|
||||
if( id < 0 )
|
||||
{
|
||||
throw PropListIException("PropList constructor", "H5Pcopy failed");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
id = H5P_DEFAULT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,10 +270,8 @@ void PropList::close()
|
||||
{
|
||||
throw PropListIException(inMemFunc("close"), "H5Pclose failed");
|
||||
}
|
||||
// reset the id when the property list that it represents is no longer
|
||||
// referenced
|
||||
if (getCounter() == 0)
|
||||
id = 0;
|
||||
// reset the id
|
||||
id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,7 +570,7 @@ void PropList::setProperty(const H5std_string& name, void* value) const
|
||||
/// It differs from the above function only in what arguments it
|
||||
/// accepts.
|
||||
///\param name - IN: Name of property to set - \c H5std_string
|
||||
///\param strg - IN: Value for the property is a \c std::string
|
||||
///\param strg - IN: Value for the property is a \c H5std_string
|
||||
// Programmer: Binh-Minh Ribler - April, 2004
|
||||
//--------------------------------------------------------------------------
|
||||
void PropList::setProperty(const H5std_string& name, H5std_string& strg) const
|
||||
|
||||
@@ -94,7 +94,7 @@ class H5_DLLCPP PropList : public IdComponent {
|
||||
void removeProp(const char *name) const;
|
||||
void removeProp(const H5std_string& name) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("PropList"); }
|
||||
|
||||
// Default constructor: creates a stub PropList object.
|
||||
|
||||
@@ -87,7 +87,7 @@ StrType::StrType( const PredType& pred_type, const size_t& size ) : AtomType()
|
||||
// Function: StrType overloaded constructor
|
||||
///\brief Creates a string datatype with a specified length
|
||||
///\param dummy - IN: To simplify calling the previous constructor
|
||||
// and avoid prototype clash with another constructor
|
||||
/// and avoid prototype clash with another constructor
|
||||
///\param size - IN: Length of the new string type
|
||||
///\exception H5::DataTypeIException
|
||||
///\par Description
|
||||
@@ -209,7 +209,7 @@ H5T_str_t StrType::getStrpad() const
|
||||
///\exception H5::DataTypeIException
|
||||
///\par Description
|
||||
/// For detail, please refer to the C layer Reference Manual at:
|
||||
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetStrpad
|
||||
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetStrpad
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
//--------------------------------------------------------------------------
|
||||
void StrType::setStrpad( H5T_str_t strpad ) const
|
||||
|
||||
@@ -47,7 +47,7 @@ class H5_DLLCPP StrType : public AtomType {
|
||||
// Defines the storage mechanism for character strings.
|
||||
void setStrpad(H5T_str_t strpad) const;
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("StrType"); }
|
||||
|
||||
// default constructor
|
||||
|
||||
@@ -30,7 +30,7 @@ class H5_DLLCPP VarLenType : public DataType {
|
||||
// on the specified base type.
|
||||
VarLenType(const DataType* base_type);
|
||||
|
||||
// Returns this class name
|
||||
///\brief Returns this class name.
|
||||
virtual H5std_string fromClass () const { return("VarLenType"); }
|
||||
|
||||
// Copy constructor: makes copy of the original object.
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#
|
||||
|
||||
include $(top_srcdir)/config/commence.am
|
||||
include $(top_srcdir)/config/lt_vers.am
|
||||
|
||||
# Include src directory
|
||||
INCLUDES=-I$(top_srcdir)/src
|
||||
@@ -26,30 +27,37 @@ INCLUDES=-I$(top_srcdir)/src
|
||||
# This is our main target
|
||||
lib_LTLIBRARIES=libhdf5_cpp.la
|
||||
|
||||
# Add libtool numbers to the HDF5 C++ library (from config/lt_vers.am)
|
||||
libhdf5_cpp_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS)
|
||||
|
||||
# Shared C++ libraries aren't universally supported.
|
||||
if CXX_SHARED_CONDITIONAL
|
||||
else
|
||||
AM_LDFLAGS=-static
|
||||
AM_LDFLAGS+=-static
|
||||
endif
|
||||
|
||||
bin_SCRIPTS=h5c++
|
||||
|
||||
# Source files for the library
|
||||
libhdf5_cpp_la_SOURCES=H5Exception.cpp H5IdComponent.cpp H5Library.cpp \
|
||||
H5Attribute.cpp H5Object.cpp H5PropList.cpp H5FaccProp.cpp \
|
||||
H5FcreatProp.cpp H5DcreatProp.cpp H5DxferProp.cpp H5DataType.cpp \
|
||||
H5DataSpace.cpp H5AbstractDs.cpp H5AtomType.cpp H5PredType.cpp \
|
||||
H5EnumType.cpp H5IntType.cpp H5FloatType.cpp H5StrType.cpp \
|
||||
H5ArrayType.cpp H5VarLenType.cpp H5CompType.cpp H5DataSet.cpp \
|
||||
H5CommonFG.cpp H5Group.cpp H5File.cpp
|
||||
H5Attribute.cpp H5Location.cpp H5Object.cpp H5PropList.cpp \
|
||||
H5FaccProp.cpp H5FcreatProp.cpp H5DcreatProp.cpp H5DxferProp.cpp \
|
||||
H5DataType.cpp H5DataSpace.cpp H5AbstractDs.cpp H5AtomType.cpp \
|
||||
H5PredType.cpp H5EnumType.cpp H5IntType.cpp H5FloatType.cpp \
|
||||
H5StrType.cpp H5ArrayType.cpp H5VarLenType.cpp H5CompType.cpp \
|
||||
H5DataSet.cpp H5CommonFG.cpp H5Group.cpp H5File.cpp
|
||||
|
||||
# HDF5 C++ library depends on HDF5 Library.
|
||||
libhdf5_cpp_la_LIBADD=$(LIBHDF5)
|
||||
|
||||
# Public headers
|
||||
include_HEADERS=H5Cpp.h H5AbstractDs.h H5AtomType.h H5Attribute.h H5Classes.h \
|
||||
H5CommonFG.h H5CompType.h H5DataSet.h H5DataSpace.h H5DataType.h \
|
||||
H5DcreatProp.h H5DxferProp.h H5EnumType.h H5Exception.h H5FaccProp.h \
|
||||
H5FcreatProp.h H5File.h H5FloatType.h H5Group.h H5IdComponent.h \
|
||||
H5Include.h H5IntType.h H5Library.h H5Object.h H5PredType.h \
|
||||
H5PropList.h H5StrType.h H5CppDoc.h H5ArrayType.h H5VarLenType.h
|
||||
H5Include.h H5IntType.h H5Library.h H5Location.h H5Object.h \
|
||||
H5PredType.h H5PropList.h H5StrType.h H5CppDoc.h H5ArrayType.h \
|
||||
H5VarLenType.h
|
||||
|
||||
# h5c++ and libhdf5.settings are generated during configure. Remove only when
|
||||
# distclean.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.12.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -34,9 +34,27 @@
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
@@ -53,88 +71,159 @@ build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/h5c++.in \
|
||||
$(top_srcdir)/bin/depcomp $(top_srcdir)/bin/mkinstalldirs \
|
||||
$(top_srcdir)/config/commence.am \
|
||||
$(top_srcdir)/config/conclude.am
|
||||
$(top_srcdir)/config/conclude.am \
|
||||
$(top_srcdir)/config/lt_vers.am
|
||||
|
||||
# Shared C++ libraries aren't universally supported.
|
||||
@CXX_SHARED_CONDITIONAL_FALSE@am__append_1 = -static
|
||||
TESTS =
|
||||
subdir = c++/src
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/H5config.h
|
||||
CONFIG_CLEAN_FILES = h5c++
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
|
||||
"$(DESTDIR)$(includedir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libhdf5_cpp_la_LIBADD =
|
||||
libhdf5_cpp_la_DEPENDENCIES = $(LIBHDF5)
|
||||
am_libhdf5_cpp_la_OBJECTS = H5Exception.lo H5IdComponent.lo \
|
||||
H5Library.lo H5Attribute.lo H5Object.lo H5PropList.lo \
|
||||
H5FaccProp.lo H5FcreatProp.lo H5DcreatProp.lo H5DxferProp.lo \
|
||||
H5DataType.lo H5DataSpace.lo H5AbstractDs.lo H5AtomType.lo \
|
||||
H5PredType.lo H5EnumType.lo H5IntType.lo H5FloatType.lo \
|
||||
H5StrType.lo H5ArrayType.lo H5VarLenType.lo H5CompType.lo \
|
||||
H5DataSet.lo H5CommonFG.lo H5Group.lo H5File.lo
|
||||
H5Library.lo H5Attribute.lo H5Location.lo H5Object.lo \
|
||||
H5PropList.lo H5FaccProp.lo H5FcreatProp.lo H5DcreatProp.lo \
|
||||
H5DxferProp.lo H5DataType.lo H5DataSpace.lo H5AbstractDs.lo \
|
||||
H5AtomType.lo H5PredType.lo H5EnumType.lo H5IntType.lo \
|
||||
H5FloatType.lo H5StrType.lo H5ArrayType.lo H5VarLenType.lo \
|
||||
H5CompType.lo H5DataSet.lo H5CommonFG.lo H5Group.lo H5File.lo
|
||||
libhdf5_cpp_la_OBJECTS = $(am_libhdf5_cpp_la_OBJECTS)
|
||||
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
libhdf5_cpp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
|
||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS) $(libhdf5_cpp_la_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
|
||||
depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
AM_V_CXX = $(am__v_CXX_@AM_V@)
|
||||
am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
|
||||
am__v_CXX_0 = @echo " CXX " $@;
|
||||
am__v_CXX_1 =
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
|
||||
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
|
||||
am__v_CXXLD_0 = @echo " CXXLD " $@;
|
||||
am__v_CXXLD_1 =
|
||||
SOURCES = $(libhdf5_cpp_la_SOURCES)
|
||||
DIST_SOURCES = $(libhdf5_cpp_la_SOURCES)
|
||||
includeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
HEADERS = $(include_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__tty_colors_dummy = \
|
||||
mgn= red= grn= lgn= blu= brg= std=; \
|
||||
am__color_tests=no
|
||||
am__tty_colors = $(am__tty_colors_dummy)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
|
||||
AMTAR = @AMTAR@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used when building hdf5,
|
||||
# but which should not be exported to h5cc for building other programs.
|
||||
# AM_CFLAGS is an automake construct which should be used by Makefiles
|
||||
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
|
||||
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
|
||||
AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
|
||||
AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
|
||||
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ $(am__append_1)
|
||||
AM_MAKEFLAGS = @AM_MAKEFLAGS@
|
||||
AR = @AR@
|
||||
|
||||
# Set the paths for AFS installs of autotools for Linux machines
|
||||
# Ideally, these tools should never be needed during the build.
|
||||
AUTOCONF = /home1/packages/autoconf/autoconf-2.60/bin/autoconf
|
||||
AUTOHEADER = /home1/packages/autoconf/autoconf-2.60/bin/autoheader
|
||||
AUTOMAKE = /home1/packages/automake/automake-1.9.6/bin/automake-1.9
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BYTESEX = @BYTESEX@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CC_VERSION = @CC_VERSION@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
|
||||
# but which shouldn't be exported to h5cc for building other programs.
|
||||
CFLAGS = @CFLAGS@ @H5_CFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CLEARFILEBUF = @CLEARFILEBUF@
|
||||
CODESTACK = @CODESTACK@
|
||||
CONFIG_DATE = @CONFIG_DATE@
|
||||
CONFIG_MODE = @CONFIG_MODE@
|
||||
CONFIG_USER = @CONFIG_USER@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CXX_VERSION = @CXX_VERSION@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEBUG_PKG = @DEBUG_PKG@
|
||||
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
|
||||
@@ -142,6 +231,7 @@ DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
|
||||
DIRECT_VFD = @DIRECT_VFD@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
DYNAMIC_DIRS = @DYNAMIC_DIRS@
|
||||
@@ -157,9 +247,11 @@ F9XMODEXT = @F9XMODEXT@
|
||||
F9XMODFLAG = @F9XMODFLAG@
|
||||
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
|
||||
FC = @FC@
|
||||
FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
|
||||
FC2003 = @FC2003@
|
||||
FCFLAGS = @FCFLAGS@
|
||||
FCFLAGS_f90 = @FCFLAGS_f90@
|
||||
FCLIBS = @FCLIBS@
|
||||
FC_VERSION = @FC_VERSION@
|
||||
FGREP = @FGREP@
|
||||
FILTERS = @FILTERS@
|
||||
FSEARCH_DIRS = @FSEARCH_DIRS@
|
||||
@@ -168,15 +260,21 @@ GREP = @GREP@
|
||||
H5_CFLAGS = @H5_CFLAGS@
|
||||
H5_CPPFLAGS = @H5_CPPFLAGS@
|
||||
H5_CXXFLAGS = @H5_CXXFLAGS@
|
||||
H5_CXX_SHARED = @H5_CXX_SHARED@
|
||||
H5_FCFLAGS = @H5_FCFLAGS@
|
||||
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
|
||||
H5_LDFLAGS = @H5_LDFLAGS@
|
||||
H5_LONE_COLON = @H5_LONE_COLON@
|
||||
H5_VERSION = @H5_VERSION@
|
||||
HADDR_T = @HADDR_T@
|
||||
HAVE_DMALLOC = @HAVE_DMALLOC@
|
||||
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
|
||||
HAVE_PTHREAD = @HAVE_PTHREAD@
|
||||
HDF5_HL = @HDF5_HL@
|
||||
HDF5_INTERFACES = @HDF5_INTERFACES@
|
||||
HDF_CXX = @HDF_CXX@
|
||||
HDF_FORTRAN = @HDF_FORTRAN@
|
||||
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
|
||||
HID_T = @HID_T@
|
||||
HL = @HL@
|
||||
HL_FOR = @HL_FOR@
|
||||
@@ -189,12 +287,12 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTRUMENT = @INSTRUMENT@
|
||||
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
|
||||
LARGEFILE = @LARGEFILE@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LINUX_LFS = @LINUX_LFS@
|
||||
LIPO = @LIPO@
|
||||
LL_PATH = @LL_PATH@
|
||||
LN_S = @LN_S@
|
||||
@@ -202,6 +300,7 @@ LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_STATIC_EXEC = @LT_STATIC_EXEC@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPE = @MPE@
|
||||
MPI_GET_SIZE = @MPI_GET_SIZE@
|
||||
@@ -217,11 +316,11 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PARALLEL = @PARALLEL@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PTHREAD = @PTHREAD@
|
||||
RANLIB = @RANLIB@
|
||||
ROOT = @ROOT@
|
||||
RUNPARALLEL = @RUNPARALLEL@
|
||||
@@ -252,10 +351,12 @@ USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
|
||||
USE_FILTER_SZIP = @USE_FILTER_SZIP@
|
||||
USINGMEMCHECKER = @USINGMEMCHECKER@
|
||||
VERSION = @VERSION@
|
||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
@@ -274,6 +375,8 @@ build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
docdir = $(exec_prefix)/doc
|
||||
dvidir = @dvidir@
|
||||
enable_shared = @enable_shared@
|
||||
@@ -285,16 +388,13 @@ host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
includedir = $(exec_prefix)/include
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
@@ -307,6 +407,7 @@ sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@@ -316,12 +417,12 @@ CP = cp
|
||||
|
||||
# Some machines need a command to run executables; this is that command
|
||||
# so that our tests will run.
|
||||
# We use RUNTESTS instead of RUNSERIAL directly because it may be that
|
||||
# We use RUNEXEC instead of RUNSERIAL directly because it may be that
|
||||
# some tests need to be run with a different command. Older versions
|
||||
# of the makefiles used the command
|
||||
# $(LIBTOOL) --mode=execute
|
||||
# in some directories, for instance.
|
||||
RUNTESTS = $(RUNSERIAL)
|
||||
RUNEXEC = $(RUNSERIAL)
|
||||
|
||||
# Libraries to link to while building
|
||||
LIBHDF5 = $(top_builddir)/src/libhdf5.la
|
||||
@@ -334,14 +435,25 @@ 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
|
||||
# insert tracing macros.
|
||||
@@ -352,33 +464,43 @@ TRACE = perl $(top_srcdir)/bin/trace
|
||||
# *.clog are from the MPE option.
|
||||
CHECK_CLEANFILES = *.chkexe *.chklog *.clog
|
||||
|
||||
# Add libtool shared library version numbers to the HDF5 library
|
||||
# See libtool versioning documentation online.
|
||||
LT_VERS_INTERFACE = 6
|
||||
LT_VERS_REVISION = 139
|
||||
LT_VERS_AGE = 0
|
||||
|
||||
# Include src directory
|
||||
INCLUDES = -I$(top_srcdir)/src
|
||||
|
||||
# This is our main target
|
||||
lib_LTLIBRARIES = libhdf5_cpp.la
|
||||
|
||||
# Shared C++ libraries aren't universally supported.
|
||||
@CXX_SHARED_CONDITIONAL_FALSE@AM_LDFLAGS = -static
|
||||
# Add libtool numbers to the HDF5 C++ library (from config/lt_vers.am)
|
||||
libhdf5_cpp_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS)
|
||||
bin_SCRIPTS = h5c++
|
||||
|
||||
# Source files for the library
|
||||
libhdf5_cpp_la_SOURCES = H5Exception.cpp H5IdComponent.cpp H5Library.cpp \
|
||||
H5Attribute.cpp H5Object.cpp H5PropList.cpp H5FaccProp.cpp \
|
||||
H5FcreatProp.cpp H5DcreatProp.cpp H5DxferProp.cpp H5DataType.cpp \
|
||||
H5DataSpace.cpp H5AbstractDs.cpp H5AtomType.cpp H5PredType.cpp \
|
||||
H5EnumType.cpp H5IntType.cpp H5FloatType.cpp H5StrType.cpp \
|
||||
H5ArrayType.cpp H5VarLenType.cpp H5CompType.cpp H5DataSet.cpp \
|
||||
H5CommonFG.cpp H5Group.cpp H5File.cpp
|
||||
H5Attribute.cpp H5Location.cpp H5Object.cpp H5PropList.cpp \
|
||||
H5FaccProp.cpp H5FcreatProp.cpp H5DcreatProp.cpp H5DxferProp.cpp \
|
||||
H5DataType.cpp H5DataSpace.cpp H5AbstractDs.cpp H5AtomType.cpp \
|
||||
H5PredType.cpp H5EnumType.cpp H5IntType.cpp H5FloatType.cpp \
|
||||
H5StrType.cpp H5ArrayType.cpp H5VarLenType.cpp H5CompType.cpp \
|
||||
H5DataSet.cpp H5CommonFG.cpp H5Group.cpp H5File.cpp
|
||||
|
||||
|
||||
# HDF5 C++ library depends on HDF5 Library.
|
||||
libhdf5_cpp_la_LIBADD = $(LIBHDF5)
|
||||
|
||||
# Public headers
|
||||
include_HEADERS = H5Cpp.h H5AbstractDs.h H5AtomType.h H5Attribute.h H5Classes.h \
|
||||
H5CommonFG.h H5CompType.h H5DataSet.h H5DataSpace.h H5DataType.h \
|
||||
H5DcreatProp.h H5DxferProp.h H5EnumType.h H5Exception.h H5FaccProp.h \
|
||||
H5FcreatProp.h H5File.h H5FloatType.h H5Group.h H5IdComponent.h \
|
||||
H5Include.h H5IntType.h H5Library.h H5Object.h H5PredType.h \
|
||||
H5PropList.h H5StrType.h H5CppDoc.h H5ArrayType.h H5VarLenType.h
|
||||
H5Include.h H5IntType.h H5Library.h H5Location.h H5Object.h \
|
||||
H5PredType.h H5PropList.h H5StrType.h H5CppDoc.h H5ArrayType.h \
|
||||
H5VarLenType.h
|
||||
|
||||
|
||||
# h5c++ and libhdf5.settings are generated during configure. Remove only when
|
||||
@@ -399,6 +521,10 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
|
||||
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
|
||||
$(EXTRA_PROG)
|
||||
|
||||
chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
|
||||
TEST_EXTENSIONS = .sh
|
||||
SH_LOG_COMPILER = $(SHELL)
|
||||
AM_SH_LOG_FLAGS =
|
||||
TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
|
||||
TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
|
||||
TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
|
||||
@@ -407,18 +533,18 @@ all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/lt_vers.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/src/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/src/Makefile
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/src/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/src/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
@@ -428,6 +554,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
$(top_srcdir)/config/commence.am $(top_srcdir)/config/lt_vers.am $(top_srcdir)/config/conclude.am:
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
@@ -436,56 +563,80 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
h5c++: $(top_builddir)/config.status $(srcdir)/h5c++.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||
}
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libhdf5_cpp.la: $(libhdf5_cpp_la_OBJECTS) $(libhdf5_cpp_la_DEPENDENCIES)
|
||||
$(CXXLINK) -rpath $(libdir) $(libhdf5_cpp_la_OBJECTS) $(libhdf5_cpp_la_LIBADD) $(LIBS)
|
||||
@list='$(lib_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
libhdf5_cpp.la: $(libhdf5_cpp_la_OBJECTS) $(libhdf5_cpp_la_DEPENDENCIES) $(EXTRA_libhdf5_cpp_la_DEPENDENCIES)
|
||||
$(AM_V_CXXLD)$(libhdf5_cpp_la_LINK) -rpath $(libdir) $(libhdf5_cpp_la_OBJECTS) $(libhdf5_cpp_la_LIBADD) $(LIBS)
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n' \
|
||||
-e 'h;s|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
|
||||
if (++n[d] == $(am__install_max)) { \
|
||||
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
|
||||
else { print "f", d "/" $$4, $$1 } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 's,.*/,,;$(transform)'`; \
|
||||
dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
@@ -514,6 +665,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5IdComponent.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5IntType.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Library.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Location.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Object.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5PredType.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5PropList.Plo@am__quote@
|
||||
@@ -521,25 +673,25 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VarLenType.Plo@am__quote@
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cpp.obj:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cpp.lo:
|
||||
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@@ -548,35 +700,39 @@ clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
$(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
|
||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
@@ -584,29 +740,48 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
cscopelist: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
@@ -627,13 +802,17 @@ distdir: $(DISTFILES)
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@@ -655,16 +834,22 @@ install-am: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@@ -687,6 +872,8 @@ dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
@@ -695,18 +882,28 @@ install-data-am: install-includeHEADERS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-binSCRIPTS install-libLTLIBRARIES
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
@@ -730,11 +927,11 @@ ps-am:
|
||||
uninstall-am: uninstall-binSCRIPTS uninstall-includeHEADERS \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \
|
||||
clean clean-generic clean-libLTLIBRARIES clean-libtool ctags \
|
||||
distclean distclean-compile distclean-generic \
|
||||
clean clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
cscopelist ctags distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binSCRIPTS \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
@@ -761,6 +958,19 @@ uninstall-am: uninstall-binSCRIPTS uninstall-includeHEADERS \
|
||||
help:
|
||||
@$(top_srcdir)/bin/makehelp
|
||||
|
||||
# Copyright by The HDF Group.
|
||||
# Copyright by the Board of Trustees of the University of Illinois.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This file is part of HDF5. The full HDF5 copyright notice, including
|
||||
# terms governing use, modification, and redistribution, is contained in
|
||||
# the files COPYING and Copyright.html. COPYING can be found at the root
|
||||
# of the source code distribution tree; Copyright.html can be found at the
|
||||
# root level of an installed copy of the electronic HDF5 document set and
|
||||
# is linked from the top-level documents page. It can also be found at
|
||||
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
|
||||
# access to either file, you may request a copy from help@hdfgroup.org.
|
||||
|
||||
# Some C++ compilers/linkers (PGI?) create a directory named "ii_files" that
|
||||
# holds *.ii files, which are template entity instantiations.
|
||||
# This entire directory should be cleaned.
|
||||
@@ -773,7 +983,7 @@ mostlyclean-local:
|
||||
# build files in this directory.
|
||||
build-lib: $(LIB)
|
||||
build-progs: $(LIB) $(PROGS)
|
||||
build-tests: $(LIB) $(PROGS) $(TESTS)
|
||||
build-tests: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
|
||||
# General rule for recursive building targets.
|
||||
# BUILT_SOURCES contain targets that need to be built before anything else
|
||||
@@ -799,7 +1009,7 @@ check-clean ::
|
||||
# Tell Automake to build tests when the user types `make all' (this is
|
||||
# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
|
||||
# Automake won't build them automatically, either.
|
||||
all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(TESTS)
|
||||
all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
|
||||
|
||||
# make install-doc doesn't do anything outside of doc directory, but
|
||||
# Makefiles should recognize it.
|
||||
@@ -823,7 +1033,7 @@ check-install: installcheck
|
||||
# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop.
|
||||
# The timestamps give a rough idea how much time the tests use.
|
||||
#
|
||||
# Note that targets in TESTS (defined above) will be built when the user
|
||||
# Note that targets in chk_TESTS (defined above) will be built when the user
|
||||
# types 'make tests' or 'make check', but only programs in TEST_PROG,
|
||||
# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed.
|
||||
check-TESTS: test
|
||||
@@ -833,7 +1043,7 @@ test _test:
|
||||
@$(MAKE) build-check-p
|
||||
|
||||
# Actual execution of check-s.
|
||||
build-check-s: $(LIB) $(PROGS) $(TESTS)
|
||||
build-check-s: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
|
||||
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
|
||||
fi
|
||||
@@ -869,7 +1079,7 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
|
||||
fi; \
|
||||
echo "============================" >> $${log}; \
|
||||
srcdir="$(srcdir)" \
|
||||
$(TIME) $(RUNTESTS) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
|
||||
$(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
|
||||
&& touch $(@:.chkexe_=.chkexe) || \
|
||||
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
|
||||
(cat $${log} && false) || exit 1; \
|
||||
@@ -923,7 +1133,7 @@ $(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
|
||||
fi
|
||||
|
||||
# Actual execution of check-p.
|
||||
build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
|
||||
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
|
||||
fi
|
||||
@@ -940,7 +1150,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
@for test in $(TEST_PROG_PARA) dummy; do \
|
||||
if test $$test != dummy; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
|
||||
RUNTESTS="$(RUNPARALLEL)" || exit 1; \
|
||||
RUNEXEC="$(RUNPARALLEL)" || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@for test in $(TEST_SCRIPT_PARA) dummy; do \
|
||||
@@ -953,7 +1163,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
fi
|
||||
|
||||
# Run test with different Virtual File Driver
|
||||
check-vfd: $(LIB) $(PROGS) $(TESTS)
|
||||
check-vfd: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@for vfd in $(VFD_LIST) dummy; do \
|
||||
if test $$vfd != dummy; then \
|
||||
echo "============================"; \
|
||||
@@ -963,6 +1173,7 @@ check-vfd: $(LIB) $(PROGS) $(TESTS)
|
||||
HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
92
c++/src/h5c++.in
Executable file → Normal file
92
c++/src/h5c++.in
Executable file → Normal file
@@ -30,12 +30,35 @@ libdir="@libdir@"
|
||||
includedir="@includedir@"
|
||||
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, CXXFLAGS, LDFLAGS, or LIBS in the h5cc compile line: ##
|
||||
## $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS ##
|
||||
## $LDFLAGS $LIBS $clibpath $link_objs $link_args $shared_link ##
|
||||
## ##
|
||||
## These settings can be overriden by setting HDF5_CXXFLAGS, ##
|
||||
## HDF5_CPPFLAGS, HDF5_LDFLAGS, or HDF5_LIBS in the environment. ##
|
||||
## ##
|
||||
############################################################################
|
||||
CXXFLAGSBASE=""
|
||||
CPPFLAGSBASE=""
|
||||
LDFLAGSBASE=""
|
||||
LIBSBASE=""
|
||||
|
||||
############################################################################
|
||||
## ##
|
||||
## You shouldn't have to modify anything below this line. ##
|
||||
## ##
|
||||
############################################################################
|
||||
|
||||
# Constants definitions
|
||||
EXIT_SUCCESS=0
|
||||
EXIT_FAILURE=1
|
||||
|
||||
host_os="@host_os@"
|
||||
|
||||
prog_name="`basename $0`"
|
||||
@@ -56,15 +79,38 @@ get_output_file="no"
|
||||
SHOW="eval"
|
||||
CXXBASE="@CXX@"
|
||||
CXXLINKERBASE="@CXX@"
|
||||
CXXFLAGS="@CXXFLAGS@"
|
||||
CPPFLAGS="@CPPFLAGS@"
|
||||
LDFLAGS="@LDFLAGS@"
|
||||
LIBS="@LIBS@"
|
||||
|
||||
# CXXFLAGS, 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 CXXFLAGS come after their H5BLD counterparts. 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. The order of the flags is intended to give precedence
|
||||
# to the user's flags.
|
||||
H5BLD_CXXFLAGS="@AM_CXXFLAGS@ @CXXFLAGS@"
|
||||
H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@"
|
||||
H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
|
||||
H5BLD_LIBS="@LIBS@"
|
||||
|
||||
CXX="${HDF5_CXX:-$CXXBASE}"
|
||||
CXXLINKER="${HDF5_CLINKER:-$CXXLINKERBASE}"
|
||||
CXXFLAGS="${HDF5_CXXFLAGS:-$CXXFLAGSBASE}"
|
||||
CPPFLAGS="${HDF5_CPPFLAGS:-$CPPFLAGSBASE}"
|
||||
LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}"
|
||||
LIBS="${HDF5_LIBS:-$LIBSBASE}"
|
||||
|
||||
USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
|
||||
# If a static library is available, the default will be to use it. If the only
|
||||
# available library is shared, it will be used by default. The user can
|
||||
# override either default, although choosing an unavailable library will result
|
||||
# in link errors.
|
||||
STATIC_AVAILABLE="@enable_static@"
|
||||
if test "${STATIC_AVAILABLE}" = "yes"; then
|
||||
USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
|
||||
else
|
||||
USE_SHARED_LIB="${HDF5_USE_SHLIB:-yes}"
|
||||
fi
|
||||
|
||||
usage() {
|
||||
# A wonderfully informative "usage" message.
|
||||
@@ -76,8 +122,9 @@ usage() {
|
||||
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"
|
||||
echo " -noshlib Compile with static HDF5 libraries [default]"
|
||||
echo " -shlib Compile with shared HDF5 libraries [default when built with"
|
||||
echo " disable-static]"
|
||||
echo " -noshlib Compile with static HDF5 libraries [default when static available]"
|
||||
echo " "
|
||||
echo " <compile line> - the normal compile line options for your compiler."
|
||||
echo " $prog_name uses the same compiler you used to compile"
|
||||
@@ -90,8 +137,20 @@ usage() {
|
||||
echo " "
|
||||
echo " HDF5_CXX - use a different C++ compiler"
|
||||
echo " HDF5_CXXLINKER - use a different linker"
|
||||
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 " "
|
||||
exit 1
|
||||
echo " Variable Current value to be replaced"
|
||||
echo " HDF5_CPPFLAGS \"$CPPFLAGSBASE\""
|
||||
echo " HDF5_CXXFLAGS \"$CXXFLAGSBASE\""
|
||||
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
|
||||
}
|
||||
|
||||
# Show the configuration summary of the library recorded in the
|
||||
@@ -103,7 +162,7 @@ showconfigure()
|
||||
}
|
||||
|
||||
# Main
|
||||
status=0
|
||||
status=$EXIT_SUCCESS
|
||||
|
||||
if test "$#" = "0"; then
|
||||
# No parameters specified, issue usage statement and exit.
|
||||
@@ -160,7 +219,7 @@ for arg in $@ ; do
|
||||
get_output_file="yes"
|
||||
fi
|
||||
;;
|
||||
-E|-M)
|
||||
-E|-M|-MT)
|
||||
allargs="$allargs $arg"
|
||||
compile_args="$compile_args $arg"
|
||||
dash_c="yes"
|
||||
@@ -240,7 +299,7 @@ if test "x$do_compile" = "xyes"; then
|
||||
compile_args="-c $compile_args"
|
||||
fi
|
||||
|
||||
$SHOW $CXX -I$includedir $CPPFLAGS $CXXFLAGS $compile_args
|
||||
$SHOW $CXX -I$includedir $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $compile_args
|
||||
status=$?
|
||||
|
||||
if test "$status" != "0"; then
|
||||
@@ -315,9 +374,16 @@ 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"
|
||||
link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
|
||||
|
||||
$SHOW $CXXLINKER $CPPFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $link_args $shared_link
|
||||
# User's CPPFLAGS and CXXFLAGS come after their H5BLD counterparts. 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. The order of the flags is intended to give precedence
|
||||
# to the user's flags.
|
||||
|
||||
$SHOW $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link
|
||||
|
||||
status=$?
|
||||
fi
|
||||
|
||||
92
c++/test/CMakeLists.txt
Normal file
92
c++/test/CMakeLists.txt
Normal file
@@ -0,0 +1,92 @@
|
||||
cmake_minimum_required (VERSION 2.8.10)
|
||||
PROJECT (HDF5_CPP_TEST)
|
||||
# --------------------------------------------------------------------
|
||||
# Notes: When creating unit test executables they should be prefixed
|
||||
# with "cpp_". This allows for easier filtering of the test suite when
|
||||
# using ctest. An example would be
|
||||
# ctest -R cpp_
|
||||
# which would only run the C++ based unit tests.
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Define Sources
|
||||
#-----------------------------------------------------------------------------
|
||||
SET (CPP_TEST_SRCS
|
||||
${HDF5_CPP_TEST_SOURCE_DIR}/testhdf5.cpp
|
||||
${HDF5_CPP_TEST_SOURCE_DIR}/tattr.cpp
|
||||
${HDF5_CPP_TEST_SOURCE_DIR}/tcompound.cpp
|
||||
${HDF5_CPP_TEST_SOURCE_DIR}/tfile.cpp
|
||||
${HDF5_CPP_TEST_SOURCE_DIR}/tfilter.cpp
|
||||
${HDF5_CPP_TEST_SOURCE_DIR}/th5s.cpp
|
||||
${HDF5_CPP_TEST_SOURCE_DIR}/tlinks.cpp
|
||||
${HDF5_CPP_TEST_SOURCE_DIR}/trefer.cpp
|
||||
${HDF5_CPP_TEST_SOURCE_DIR}/ttypes.cpp
|
||||
${HDF5_CPP_TEST_SOURCE_DIR}/tvlstr.cpp
|
||||
${HDF5_CPP_TEST_SOURCE_DIR}/dsets.cpp
|
||||
${HDF5_CPP_TEST_SOURCE_DIR}/h5cpputil.cpp
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Generate the H5srcdir_str.h file containing user settings needed by compilation
|
||||
#-----------------------------------------------------------------------------
|
||||
SET (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
CONFIGURE_FILE (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
|
||||
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR} )
|
||||
|
||||
ADD_EXECUTABLE (cpp_testhdf5 ${CPP_TEST_SRCS} )
|
||||
TARGET_NAMING (cpp_testhdf5 ${LIB_TYPE})
|
||||
TARGET_LINK_LIBRARIES (cpp_testhdf5
|
||||
${HDF5_CPP_LIB_TARGET}
|
||||
${HDF5_LIB_TARGET}
|
||||
${HDF5_TEST_LIB_TARGET}
|
||||
)
|
||||
SET_TARGET_PROPERTIES (cpp_testhdf5 PROPERTIES FOLDER test/cpp)
|
||||
|
||||
ADD_CUSTOM_COMMAND (
|
||||
TARGET cpp_testhdf5
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different ${HDF5_CPP_TEST_SOURCE_DIR}/th5s.h5 ${PROJECT_BINARY_DIR}/th5s.h5
|
||||
)
|
||||
|
||||
ADD_TEST (NAME cpp_testhdf5 COMMAND $<TARGET_FILE:cpp_testhdf5>)
|
||||
|
||||
IF (HDF5_TEST_VFD)
|
||||
|
||||
SET (VFD_LIST
|
||||
sec2
|
||||
stdio
|
||||
core
|
||||
split
|
||||
multi
|
||||
family
|
||||
)
|
||||
|
||||
IF (DIRECT_VFD)
|
||||
SET (VFD_LIST ${VFD_LIST} direct)
|
||||
ENDIF (DIRECT_VFD)
|
||||
|
||||
MACRO (ADD_VFD_TEST vfdname resultcode)
|
||||
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
|
||||
ADD_TEST (
|
||||
NAME VFD-${vfdname}-cpp_testhdf5
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VFD:STRING=${vfdname}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=cpp_testhdf5"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
|
||||
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
|
||||
)
|
||||
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
|
||||
ENDMACRO (ADD_VFD_TEST)
|
||||
|
||||
# Run test with different Virtual File Driver
|
||||
FOREACH (vfd ${VFD_LIST})
|
||||
ADD_VFD_TEST (${vfd} 0)
|
||||
ENDFOREACH (vfd ${VFD_LIST})
|
||||
|
||||
ENDIF (HDF5_TEST_VFD)
|
||||
22
c++/test/H5srcdir_str.h.in
Normal file
22
c++/test/H5srcdir_str.h.in
Normal file
@@ -0,0 +1,22 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/* If you are reading this file and it has a '.h' suffix, it was automatically
|
||||
* generated from the '.in' version. Make changes there.
|
||||
*/
|
||||
|
||||
/* Set the 'srcdir' path from configure time */
|
||||
static const char *config_srcdir = "@srcdir@";
|
||||
|
||||
@@ -26,20 +26,20 @@ INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/c++/src
|
||||
# Shared C++ libraries aren't universally supported.
|
||||
if CXX_SHARED_CONDITIONAL
|
||||
else
|
||||
AM_LDFLAGS=-static
|
||||
AM_LDFLAGS+=-static
|
||||
endif
|
||||
|
||||
# These are our main targets. They should be listed in the order to be
|
||||
# executed, generally most specific tests to least specific tests.
|
||||
TEST_PROG=dsets testhdf5
|
||||
TEST_PROG=testhdf5
|
||||
check_PROGRAMS=$(TEST_PROG)
|
||||
|
||||
# The tests depend on the hdf5 library, test library, and the c++ library
|
||||
LDADD=$(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5)
|
||||
|
||||
dsets_SOURCES=dsets.cpp h5cpputil.cpp
|
||||
testhdf5_SOURCES=testhdf5.cpp tattr.cpp tcompound.cpp tfile.cpp tfilter.cpp \
|
||||
th5s.cpp trefer.cpp ttypes.cpp tvlstr.cpp h5cpputil.cpp
|
||||
testhdf5_SOURCES=testhdf5.cpp dsets.cpp tattr.cpp tcompound.cpp \
|
||||
tfile.cpp tfilter.cpp th5s.cpp tlinks.cpp trefer.cpp \
|
||||
ttypes.cpp tvlstr.cpp h5cpputil.cpp
|
||||
|
||||
# Tell conclude.am that these are C++ tests.
|
||||
CXX_API=yes
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.12.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -31,9 +31,27 @@
|
||||
# HDF5-C++ Makefile(.in)
|
||||
#
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
@@ -48,79 +66,125 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
DIST_COMMON = $(srcdir)/H5srcdir_str.h.in $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/bin/depcomp \
|
||||
$(top_srcdir)/bin/mkinstalldirs \
|
||||
$(top_srcdir)/config/commence.am \
|
||||
$(top_srcdir)/config/conclude.am
|
||||
|
||||
# Shared C++ libraries aren't universally supported.
|
||||
@CXX_SHARED_CONDITIONAL_FALSE@am__append_1 = -static
|
||||
check_PROGRAMS = $(am__EXEEXT_1)
|
||||
TESTS = $(check_PROGRAMS)
|
||||
TESTS = $(am__EXEEXT_1)
|
||||
subdir = c++/test
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/H5config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__EXEEXT_1 = dsets$(EXEEXT) testhdf5$(EXEEXT)
|
||||
am_dsets_OBJECTS = dsets.$(OBJEXT) h5cpputil.$(OBJEXT)
|
||||
dsets_OBJECTS = $(am_dsets_OBJECTS)
|
||||
dsets_LDADD = $(LDADD)
|
||||
dsets_DEPENDENCIES = $(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5)
|
||||
am_testhdf5_OBJECTS = testhdf5.$(OBJEXT) tattr.$(OBJEXT) \
|
||||
tcompound.$(OBJEXT) tfile.$(OBJEXT) tfilter.$(OBJEXT) \
|
||||
th5s.$(OBJEXT) trefer.$(OBJEXT) ttypes.$(OBJEXT) \
|
||||
tvlstr.$(OBJEXT) h5cpputil.$(OBJEXT)
|
||||
CONFIG_CLEAN_FILES = H5srcdir_str.h
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__EXEEXT_1 = testhdf5$(EXEEXT)
|
||||
am_testhdf5_OBJECTS = testhdf5.$(OBJEXT) dsets.$(OBJEXT) \
|
||||
tattr.$(OBJEXT) tcompound.$(OBJEXT) tfile.$(OBJEXT) \
|
||||
tfilter.$(OBJEXT) th5s.$(OBJEXT) tlinks.$(OBJEXT) \
|
||||
trefer.$(OBJEXT) ttypes.$(OBJEXT) tvlstr.$(OBJEXT) \
|
||||
h5cpputil.$(OBJEXT)
|
||||
testhdf5_OBJECTS = $(am_testhdf5_OBJECTS)
|
||||
testhdf5_LDADD = $(LDADD)
|
||||
testhdf5_DEPENDENCIES = $(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
|
||||
depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
AM_V_CXX = $(am__v_CXX_@AM_V@)
|
||||
am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
|
||||
am__v_CXX_0 = @echo " CXX " $@;
|
||||
am__v_CXX_1 =
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = $(dsets_SOURCES) $(testhdf5_SOURCES)
|
||||
DIST_SOURCES = $(dsets_SOURCES) $(testhdf5_SOURCES)
|
||||
CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
|
||||
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
|
||||
am__v_CXXLD_0 = @echo " CXXLD " $@;
|
||||
am__v_CXXLD_1 =
|
||||
SOURCES = $(testhdf5_SOURCES)
|
||||
DIST_SOURCES = $(testhdf5_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__tty_colors_dummy = \
|
||||
mgn= red= grn= lgn= blu= brg= std=; \
|
||||
am__color_tests=no
|
||||
am__tty_colors = $(am__tty_colors_dummy)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
|
||||
AMTAR = @AMTAR@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used when building hdf5,
|
||||
# but which should not be exported to h5cc for building other programs.
|
||||
# AM_CFLAGS is an automake construct which should be used by Makefiles
|
||||
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
|
||||
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
|
||||
AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
|
||||
AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
|
||||
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ $(am__append_1)
|
||||
AM_MAKEFLAGS = @AM_MAKEFLAGS@
|
||||
AR = @AR@
|
||||
|
||||
# Set the paths for AFS installs of autotools for Linux machines
|
||||
# Ideally, these tools should never be needed during the build.
|
||||
AUTOCONF = /home1/packages/autoconf/autoconf-2.60/bin/autoconf
|
||||
AUTOHEADER = /home1/packages/autoconf/autoconf-2.60/bin/autoheader
|
||||
AUTOMAKE = /home1/packages/automake/automake-1.9.6/bin/automake-1.9
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BYTESEX = @BYTESEX@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CC_VERSION = @CC_VERSION@
|
||||
|
||||
# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
|
||||
# but which shouldn't be exported to h5cc for building other programs.
|
||||
CFLAGS = @CFLAGS@ @H5_CFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CLEARFILEBUF = @CLEARFILEBUF@
|
||||
CODESTACK = @CODESTACK@
|
||||
CONFIG_DATE = @CONFIG_DATE@
|
||||
CONFIG_MODE = @CONFIG_MODE@
|
||||
CONFIG_USER = @CONFIG_USER@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CXX_VERSION = @CXX_VERSION@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEBUG_PKG = @DEBUG_PKG@
|
||||
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
|
||||
@@ -128,6 +192,7 @@ DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
|
||||
DIRECT_VFD = @DIRECT_VFD@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
DYNAMIC_DIRS = @DYNAMIC_DIRS@
|
||||
@@ -143,9 +208,11 @@ F9XMODEXT = @F9XMODEXT@
|
||||
F9XMODFLAG = @F9XMODFLAG@
|
||||
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
|
||||
FC = @FC@
|
||||
FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
|
||||
FC2003 = @FC2003@
|
||||
FCFLAGS = @FCFLAGS@
|
||||
FCFLAGS_f90 = @FCFLAGS_f90@
|
||||
FCLIBS = @FCLIBS@
|
||||
FC_VERSION = @FC_VERSION@
|
||||
FGREP = @FGREP@
|
||||
FILTERS = @FILTERS@
|
||||
FSEARCH_DIRS = @FSEARCH_DIRS@
|
||||
@@ -154,15 +221,21 @@ GREP = @GREP@
|
||||
H5_CFLAGS = @H5_CFLAGS@
|
||||
H5_CPPFLAGS = @H5_CPPFLAGS@
|
||||
H5_CXXFLAGS = @H5_CXXFLAGS@
|
||||
H5_CXX_SHARED = @H5_CXX_SHARED@
|
||||
H5_FCFLAGS = @H5_FCFLAGS@
|
||||
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
|
||||
H5_LDFLAGS = @H5_LDFLAGS@
|
||||
H5_LONE_COLON = @H5_LONE_COLON@
|
||||
H5_VERSION = @H5_VERSION@
|
||||
HADDR_T = @HADDR_T@
|
||||
HAVE_DMALLOC = @HAVE_DMALLOC@
|
||||
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
|
||||
HAVE_PTHREAD = @HAVE_PTHREAD@
|
||||
HDF5_HL = @HDF5_HL@
|
||||
HDF5_INTERFACES = @HDF5_INTERFACES@
|
||||
HDF_CXX = @HDF_CXX@
|
||||
HDF_FORTRAN = @HDF_FORTRAN@
|
||||
HDF_FORTRAN2003 = @HDF_FORTRAN2003@
|
||||
HID_T = @HID_T@
|
||||
HL = @HL@
|
||||
HL_FOR = @HL_FOR@
|
||||
@@ -175,12 +248,12 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTRUMENT = @INSTRUMENT@
|
||||
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
|
||||
LARGEFILE = @LARGEFILE@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LINUX_LFS = @LINUX_LFS@
|
||||
LIPO = @LIPO@
|
||||
LL_PATH = @LL_PATH@
|
||||
LN_S = @LN_S@
|
||||
@@ -188,6 +261,7 @@ LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_STATIC_EXEC = @LT_STATIC_EXEC@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPE = @MPE@
|
||||
MPI_GET_SIZE = @MPI_GET_SIZE@
|
||||
@@ -203,11 +277,11 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PARALLEL = @PARALLEL@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PTHREAD = @PTHREAD@
|
||||
RANLIB = @RANLIB@
|
||||
ROOT = @ROOT@
|
||||
RUNPARALLEL = @RUNPARALLEL@
|
||||
@@ -238,10 +312,12 @@ USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
|
||||
USE_FILTER_SZIP = @USE_FILTER_SZIP@
|
||||
USINGMEMCHECKER = @USINGMEMCHECKER@
|
||||
VERSION = @VERSION@
|
||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
@@ -260,6 +336,8 @@ build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
docdir = $(exec_prefix)/doc
|
||||
dvidir = @dvidir@
|
||||
enable_shared = @enable_shared@
|
||||
@@ -271,16 +349,13 @@ host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
|
||||
# Install directories that automake doesn't know about
|
||||
includedir = $(exec_prefix)/include
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
@@ -293,6 +368,7 @@ sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@@ -302,12 +378,12 @@ CP = cp
|
||||
|
||||
# Some machines need a command to run executables; this is that command
|
||||
# so that our tests will run.
|
||||
# We use RUNTESTS instead of RUNSERIAL directly because it may be that
|
||||
# We use RUNEXEC instead of RUNSERIAL directly because it may be that
|
||||
# some tests need to be run with a different command. Older versions
|
||||
# of the makefiles used the command
|
||||
# $(LIBTOOL) --mode=execute
|
||||
# in some directories, for instance.
|
||||
RUNTESTS = $(RUNSERIAL)
|
||||
RUNEXEC = $(RUNSERIAL)
|
||||
|
||||
# Libraries to link to while building
|
||||
LIBHDF5 = $(top_builddir)/src/libhdf5.la
|
||||
@@ -320,14 +396,25 @@ 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
|
||||
# insert tracing macros.
|
||||
@@ -341,18 +428,15 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
|
||||
# Include src, test, and c++/src directories
|
||||
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/c++/src
|
||||
|
||||
# Shared C++ libraries aren't universally supported.
|
||||
@CXX_SHARED_CONDITIONAL_FALSE@AM_LDFLAGS = -static
|
||||
|
||||
# These are our main targets. They should be listed in the order to be
|
||||
# executed, generally most specific tests to least specific tests.
|
||||
TEST_PROG = dsets testhdf5
|
||||
TEST_PROG = testhdf5
|
||||
|
||||
# The tests depend on the hdf5 library, test library, and the c++ library
|
||||
LDADD = $(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5)
|
||||
dsets_SOURCES = dsets.cpp h5cpputil.cpp
|
||||
testhdf5_SOURCES = testhdf5.cpp tattr.cpp tcompound.cpp tfile.cpp tfilter.cpp \
|
||||
th5s.cpp trefer.cpp ttypes.cpp tvlstr.cpp h5cpputil.cpp
|
||||
testhdf5_SOURCES = testhdf5.cpp dsets.cpp tattr.cpp tcompound.cpp \
|
||||
tfile.cpp tfilter.cpp th5s.cpp tlinks.cpp trefer.cpp \
|
||||
ttypes.cpp tvlstr.cpp h5cpputil.cpp
|
||||
|
||||
|
||||
# Tell conclude.am that these are C++ tests.
|
||||
@@ -369,6 +453,10 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
|
||||
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
|
||||
$(EXTRA_PROG)
|
||||
|
||||
chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
|
||||
TEST_EXTENSIONS = .sh
|
||||
SH_LOG_COMPILER = $(SHELL)
|
||||
AM_SH_LOG_FLAGS =
|
||||
TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
|
||||
TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
|
||||
TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
|
||||
@@ -381,14 +469,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/test/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/test/Makefile
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign c++/test/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign c++/test/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
@@ -398,6 +486,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
$(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am:
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
@@ -406,19 +495,21 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
H5srcdir_str.h: $(top_builddir)/config.status $(srcdir)/H5srcdir_str.h.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
clean-checkPROGRAMS:
|
||||
@list='$(check_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
dsets$(EXEEXT): $(dsets_OBJECTS) $(dsets_DEPENDENCIES)
|
||||
@rm -f dsets$(EXEEXT)
|
||||
$(CXXLINK) $(dsets_OBJECTS) $(dsets_LDADD) $(LIBS)
|
||||
testhdf5$(EXEEXT): $(testhdf5_OBJECTS) $(testhdf5_DEPENDENCIES)
|
||||
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
testhdf5$(EXEEXT): $(testhdf5_OBJECTS) $(testhdf5_DEPENDENCIES) $(EXTRA_testhdf5_DEPENDENCIES)
|
||||
@rm -f testhdf5$(EXEEXT)
|
||||
$(CXXLINK) $(testhdf5_OBJECTS) $(testhdf5_LDADD) $(LIBS)
|
||||
$(AM_V_CXXLD)$(CXXLINK) $(testhdf5_OBJECTS) $(testhdf5_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
@@ -434,30 +525,31 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfile.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfilter.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/th5s.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlinks.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trefer.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttypes.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvlstr.Po@am__quote@
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cpp.obj:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cpp.lo:
|
||||
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@@ -470,14 +562,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
@@ -485,29 +577,48 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
cscopelist: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
@@ -528,13 +639,17 @@ distdir: $(DISTFILES)
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@@ -554,16 +669,22 @@ install-am: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@@ -585,6 +706,8 @@ dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
@@ -593,18 +716,28 @@ install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
@@ -627,11 +760,11 @@ ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \
|
||||
clean clean-checkPROGRAMS clean-generic clean-libtool ctags \
|
||||
distclean distclean-compile distclean-generic \
|
||||
clean clean-checkPROGRAMS clean-generic clean-libtool \
|
||||
cscopelist ctags distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
@@ -667,7 +800,7 @@ mostlyclean-local:
|
||||
# build files in this directory.
|
||||
build-lib: $(LIB)
|
||||
build-progs: $(LIB) $(PROGS)
|
||||
build-tests: $(LIB) $(PROGS) $(TESTS)
|
||||
build-tests: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
|
||||
# General rule for recursive building targets.
|
||||
# BUILT_SOURCES contain targets that need to be built before anything else
|
||||
@@ -693,7 +826,7 @@ check-clean ::
|
||||
# Tell Automake to build tests when the user types `make all' (this is
|
||||
# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
|
||||
# Automake won't build them automatically, either.
|
||||
all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(TESTS)
|
||||
all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
|
||||
|
||||
# make install-doc doesn't do anything outside of doc directory, but
|
||||
# Makefiles should recognize it.
|
||||
@@ -717,7 +850,7 @@ check-install: installcheck
|
||||
# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop.
|
||||
# The timestamps give a rough idea how much time the tests use.
|
||||
#
|
||||
# Note that targets in TESTS (defined above) will be built when the user
|
||||
# Note that targets in chk_TESTS (defined above) will be built when the user
|
||||
# types 'make tests' or 'make check', but only programs in TEST_PROG,
|
||||
# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed.
|
||||
check-TESTS: test
|
||||
@@ -727,7 +860,7 @@ test _test:
|
||||
@$(MAKE) build-check-p
|
||||
|
||||
# Actual execution of check-s.
|
||||
build-check-s: $(LIB) $(PROGS) $(TESTS)
|
||||
build-check-s: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
|
||||
echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
|
||||
fi
|
||||
@@ -763,7 +896,7 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
|
||||
fi; \
|
||||
echo "============================" >> $${log}; \
|
||||
srcdir="$(srcdir)" \
|
||||
$(TIME) $(RUNTESTS) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
|
||||
$(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
|
||||
&& touch $(@:.chkexe_=.chkexe) || \
|
||||
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
|
||||
(cat $${log} && false) || exit 1; \
|
||||
@@ -817,7 +950,7 @@ $(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
|
||||
fi
|
||||
|
||||
# Actual execution of check-p.
|
||||
build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
|
||||
echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
|
||||
fi
|
||||
@@ -834,7 +967,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
@for test in $(TEST_PROG_PARA) dummy; do \
|
||||
if test $$test != dummy; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
|
||||
RUNTESTS="$(RUNPARALLEL)" || exit 1; \
|
||||
RUNEXEC="$(RUNPARALLEL)" || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@for test in $(TEST_SCRIPT_PARA) dummy; do \
|
||||
@@ -847,7 +980,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
|
||||
fi
|
||||
|
||||
# Run test with different Virtual File Driver
|
||||
check-vfd: $(LIB) $(PROGS) $(TESTS)
|
||||
check-vfd: $(LIB) $(PROGS) $(chk_TESTS)
|
||||
@for vfd in $(VFD_LIST) dummy; do \
|
||||
if test $$vfd != dummy; then \
|
||||
echo "============================"; \
|
||||
@@ -857,6 +990,7 @@ check-vfd: $(LIB) $(PROGS) $(TESTS)
|
||||
HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#endif // H5_NO_STD
|
||||
#endif
|
||||
|
||||
#include "testhdf5.h" // C test header file
|
||||
#include "H5Cpp.h" // C++ API header file
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
@@ -62,7 +61,6 @@ const int H5Z_FILTER_BOGUS = 305;
|
||||
static size_t filter_bogus(unsigned int flags, size_t cd_nelmts,
|
||||
const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_create
|
||||
*
|
||||
@@ -82,7 +80,7 @@ static size_t filter_bogus(unsigned int flags, size_t cd_nelmts,
|
||||
static herr_t
|
||||
test_create( H5File& file)
|
||||
{
|
||||
TESTING("create, open, close");
|
||||
SUBTEST("create, open, close");
|
||||
|
||||
// Setting this to NULL for cleaning up in failure situations
|
||||
DataSet *dataset = NULL;
|
||||
@@ -180,7 +178,7 @@ test_create( H5File& file)
|
||||
return -1;
|
||||
}
|
||||
} // test_create
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_simple_io
|
||||
*
|
||||
@@ -203,7 +201,7 @@ static herr_t
|
||||
test_simple_io( H5File& file)
|
||||
{
|
||||
|
||||
TESTING("simple I/O");
|
||||
SUBTEST("simple I/O");
|
||||
|
||||
int points[100][200];
|
||||
int check[100][200];
|
||||
@@ -267,7 +265,72 @@ test_simple_io( H5File& file)
|
||||
return -1;
|
||||
}
|
||||
} // test_simple_io
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_datasize
|
||||
*
|
||||
* Purpose: Tests DataSet::getInMemDataSize().
|
||||
*
|
||||
* Return: Success: 0
|
||||
*
|
||||
* Failure: -1
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler
|
||||
* Thursday, March 22, 2012
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
test_datasize()
|
||||
{
|
||||
SUBTEST("DataSet::getInMemDataSize()");
|
||||
try
|
||||
{
|
||||
// Open FILE1.
|
||||
H5File file(FILE1, H5F_ACC_RDWR, FileCreatPropList::DEFAULT, FileAccPropList::DEFAULT);
|
||||
|
||||
// Open dataset DSET_SIMPLE_IO_NAME.
|
||||
DataSet dset = file.openDataSet (DSET_SIMPLE_IO_NAME);
|
||||
|
||||
// Get the dataset's dataspace to calculate the size for verification.
|
||||
DataSpace space(dset.getSpace());
|
||||
|
||||
// Get the dimension sizes.
|
||||
hsize_t dims[2];
|
||||
int n_dims = space.getSimpleExtentDims(dims);
|
||||
|
||||
// Calculate the supposed size. Size of each value is int (4), from
|
||||
// test_simple_io.
|
||||
int expected_size = 4 * dims[0] * dims[1];
|
||||
|
||||
// getInMemDataSize() returns the in memory size of the data.
|
||||
size_t ds_size = dset.getInMemDataSize();
|
||||
|
||||
// Verify the data size.
|
||||
if (ds_size != expected_size)
|
||||
{
|
||||
H5_FAILED();
|
||||
cerr << " Expected data size = " << expected_size;
|
||||
cerr << " but dset.getInMemDataSize() returned " << ds_size << endl;
|
||||
throw Exception("test_compression", "Failed in testing DataSet::getInMemDataSize()");
|
||||
}
|
||||
|
||||
PASSED();
|
||||
return 0;
|
||||
} // end try
|
||||
|
||||
// catch all dataset, space, plist exceptions
|
||||
catch (Exception E)
|
||||
{
|
||||
cerr << " FAILED" << endl;
|
||||
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
} // test_datasize
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_tconv
|
||||
*
|
||||
@@ -294,7 +357,7 @@ test_tconv( H5File& file)
|
||||
in = new char [4*1000000];
|
||||
//assert (in);
|
||||
|
||||
TESTING("data type conversion");
|
||||
SUBTEST("data type conversion");
|
||||
|
||||
// Initialize the dataset
|
||||
for (int i = 0; i < 1000000; i++) {
|
||||
@@ -352,7 +415,7 @@ test_tconv( H5File& file)
|
||||
} // test_tconv
|
||||
|
||||
/* This message derives from H5Z */
|
||||
const H5Z_class_t H5Z_BOGUS[1] = {{
|
||||
const H5Z_class2_t H5Z_BOGUS[1] = {{
|
||||
H5Z_CLASS_T_VERS, /* H5Z_class_t version number */
|
||||
H5Z_FILTER_BOGUS, /* Filter id number */
|
||||
1, 1, /* Encode and decode enabled */
|
||||
@@ -390,7 +453,6 @@ filter_bogus(unsigned int flags, size_t cd_nelmts,
|
||||
return nbytes;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_compression
|
||||
*
|
||||
@@ -449,7 +511,7 @@ test_compression(H5File& file)
|
||||
dscreatplist.setDeflate (6);
|
||||
|
||||
#ifdef H5_HAVE_FILTER_DEFLATE
|
||||
TESTING("compression (setup)");
|
||||
SUBTEST("Compression (setup)");
|
||||
|
||||
// Create the dataset
|
||||
dataset = new DataSet (file.createDataSet
|
||||
@@ -461,7 +523,7 @@ test_compression(H5File& file)
|
||||
* STEP 1: Read uninitialized data. It should be zero.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
TESTING("compression (uninitialized read)");
|
||||
SUBTEST("Compression (uninitialized read)");
|
||||
|
||||
dataset->read ((void*) check, PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
|
||||
|
||||
@@ -483,7 +545,7 @@ test_compression(H5File& file)
|
||||
* to it.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
TESTING("compression (write)");
|
||||
SUBTEST("Compression (write)");
|
||||
|
||||
for (i=n=0; i<size[0]; i++)
|
||||
{
|
||||
@@ -501,7 +563,7 @@ test_compression(H5File& file)
|
||||
* STEP 3: Try to read the data we just wrote.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
TESTING("compression (read)");
|
||||
SUBTEST("Compression (read)");
|
||||
|
||||
// Read the dataset back
|
||||
dataset->read ((void*)check, PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer);
|
||||
@@ -524,7 +586,7 @@ test_compression(H5File& file)
|
||||
* dataset although we rewrite the whole thing.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
TESTING("compression (modify)");
|
||||
SUBTEST("Compression (modify)");
|
||||
|
||||
for (i=0; i<size[0]; i++)
|
||||
{
|
||||
@@ -555,7 +617,7 @@ test_compression(H5File& file)
|
||||
* object header.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
TESTING("compression (re-open)");
|
||||
SUBTEST("Compression (re-open)");
|
||||
|
||||
// close this dataset to reuse the var
|
||||
delete dataset;
|
||||
@@ -581,7 +643,7 @@ test_compression(H5File& file)
|
||||
* boundaries (we know that case already works from above tests).
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
TESTING("compression (partial I/O)");
|
||||
SUBTEST("Compression (partial I/O)");
|
||||
|
||||
const hsize_t hs_size[2] = {4, 50};
|
||||
const hsize_t hs_offset[2] = {7, 30};
|
||||
@@ -617,7 +679,7 @@ test_compression(H5File& file)
|
||||
PASSED();
|
||||
|
||||
#else
|
||||
TESTING("deflate filter");
|
||||
SUBTEST("deflate filter");
|
||||
SKIPPED();
|
||||
cerr << not_supported << endl;
|
||||
#endif
|
||||
@@ -627,7 +689,7 @@ test_compression(H5File& file)
|
||||
* to write and then read the dataset.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
TESTING("compression (app-defined method)");
|
||||
SUBTEST("Compression (app-defined method)");
|
||||
|
||||
if (H5Zregister (H5Z_BOGUS)<0)
|
||||
throw Exception("test_compression", "Failed in app-defined method");
|
||||
@@ -699,7 +761,7 @@ static herr_t
|
||||
test_multiopen (H5File& file)
|
||||
{
|
||||
|
||||
TESTING("multi-open with extending");
|
||||
SUBTEST("Multi-open with extending");
|
||||
|
||||
DataSpace* space = NULL;
|
||||
try {
|
||||
@@ -760,7 +822,6 @@ test_multiopen (H5File& file)
|
||||
}
|
||||
} // test_multiopen
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_types
|
||||
*
|
||||
@@ -780,7 +841,7 @@ test_multiopen (H5File& file)
|
||||
static herr_t
|
||||
test_types(H5File& file)
|
||||
{
|
||||
TESTING("various datatypes");
|
||||
SUBTEST("Various datatypes");
|
||||
|
||||
size_t i;
|
||||
DataSet* dset = NULL;
|
||||
@@ -949,9 +1010,9 @@ test_types(H5File& file)
|
||||
return -1;
|
||||
}
|
||||
} // test_types
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: main
|
||||
* Function: test_dset
|
||||
*
|
||||
* Purpose: Tests the dataset interface (H5D)
|
||||
*
|
||||
@@ -972,13 +1033,16 @@ test_types(H5File& file)
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
main()
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
void test_dset()
|
||||
{
|
||||
hid_t fapl_id;
|
||||
fapl_id = h5_fileaccess(); // in h5test.c, returns a file access template
|
||||
|
||||
int nerrors=0; // keep track of number of failures occurr
|
||||
|
||||
try
|
||||
{
|
||||
// Turn of the auto-printing when failure occurs so that we can
|
||||
@@ -1002,19 +1066,19 @@ main()
|
||||
nerrors += test_compression(file)<0 ?1:0;
|
||||
nerrors += test_multiopen (file)<0 ?1:0;
|
||||
nerrors += test_types(file)<0 ?1:0;
|
||||
|
||||
// Close the file before testing data size.
|
||||
file.close();
|
||||
nerrors += test_datasize() <0 ? 1:0;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
return(test_report(nerrors, H5std_string(" Dataset")));
|
||||
test_report(nerrors, H5std_string(" Dataset"));
|
||||
}
|
||||
|
||||
// Clean up data file
|
||||
cleanup_dsets();
|
||||
|
||||
// Print out dsets test results
|
||||
cerr << endl << endl;
|
||||
return(test_report(nerrors, H5std_string(" Dataset")));
|
||||
} // main
|
||||
} // test_dset
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: cleanup_dsets
|
||||
|
||||
@@ -100,6 +100,7 @@ void issue_fail_msg(const char* where, int line, const char* file_name,
|
||||
{
|
||||
//if (GetTestVerbosity()>=VERBO_HI)
|
||||
{
|
||||
cerr << endl;
|
||||
cerr << ">>> FAILED in " << where << " at line " << line
|
||||
<< " in " << file_name << " - " << message << endl << endl;
|
||||
}
|
||||
@@ -138,6 +139,43 @@ int check_values (hsize_t i, hsize_t j, int apoint, int acheck)
|
||||
return 0;
|
||||
} // check_values
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: verify_val (const char*, const char*,...)
|
||||
*
|
||||
* Purpose: Compares two character strings. If they are
|
||||
* different, the function will print out a message and the
|
||||
* different values.
|
||||
*
|
||||
* Return: Success: 0
|
||||
*
|
||||
* Failure: -1
|
||||
*
|
||||
* Programmer: Binh-Minh Ribler
|
||||
* May 2, 2010
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void verify_val(const char* x, const char* value, const char* where, int line, const char* file_name)
|
||||
{
|
||||
if (GetTestVerbosity()>=VERBO_HI)
|
||||
{
|
||||
cerr << endl;
|
||||
cerr << " Call to routine: " << where << " at line " << line
|
||||
<< " in " << file_name << " had value " << x << endl;
|
||||
}
|
||||
if (strcmp(x, value) != 0)
|
||||
{
|
||||
cerr << endl;
|
||||
cerr << "*** UNEXPECTED VALUE from " << where << " should be "
|
||||
<< value << ", but is " << x << " at line " << line
|
||||
<< " in " << file_name << endl;
|
||||
IncTestNumErrs();
|
||||
throw TestFailedException(where, "");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: InvalidActionException default constructor
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -35,7 +35,8 @@ using std::cerr;
|
||||
using std::endl;
|
||||
#endif
|
||||
|
||||
#define SUBTEST(WHAT) {printf(" Subtest: %-52s",WHAT); fflush(stdout);}
|
||||
#define MESSAGE(V,A) {if (HDGetTestVerbosity()>(V)) print_func A;}
|
||||
#define SUBTEST(TEST) {printf(" Subtest: %-52s",TEST); fflush(stdout);}
|
||||
|
||||
int check_values (hsize_t i, hsize_t j, int apoint, int acheck);
|
||||
int test_report (int, const H5std_string&);
|
||||
@@ -56,6 +57,9 @@ class TestFailedException : public Exception {
|
||||
virtual ~TestFailedException();
|
||||
};
|
||||
|
||||
// Overloaded/Template functions to verify values and display proper info
|
||||
void verify_val(const char* x, const char* value, const char* where, int line, const char* file_name);
|
||||
|
||||
template <class Type1, class Type2>
|
||||
void verify_val(Type1 x, Type2 value, const char* where, int line, const char* file_name)
|
||||
{
|
||||
@@ -113,25 +117,28 @@ template <class Type1, class Type2>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void test_attr(void);
|
||||
void test_compound(void);
|
||||
void test_file(void);
|
||||
void test_filters(void);
|
||||
void test_h5s(void);
|
||||
void test_reference(void);
|
||||
void test_types(void);
|
||||
void test_vlstrings(void);
|
||||
void test_attr();
|
||||
void test_compound();
|
||||
void test_file();
|
||||
void test_filters();
|
||||
void test_links();
|
||||
void test_h5s();
|
||||
void test_reference();
|
||||
void test_types();
|
||||
void test_vlstrings();
|
||||
void test_dset();
|
||||
|
||||
/* Prototypes for the cleanup routines */
|
||||
void cleanup_attr(void);
|
||||
void cleanup_compound(void);
|
||||
void cleanup_dsets(void);
|
||||
void cleanup_file(void);
|
||||
void cleanup_filters(void);
|
||||
void cleanup_h5s(void);
|
||||
void cleanup_reference(void);
|
||||
void cleanup_types(void);
|
||||
void cleanup_vlstrings(void);
|
||||
void cleanup_attr();
|
||||
void cleanup_compound();
|
||||
void cleanup_dsets();
|
||||
void cleanup_file();
|
||||
void cleanup_filters();
|
||||
void cleanup_links();
|
||||
void cleanup_h5s();
|
||||
void cleanup_reference();
|
||||
void cleanup_types();
|
||||
void cleanup_vlstrings();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user