summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/CMakeLists.txt8
-rw-r--r--tools/lib/Makefile.in20
-rw-r--r--tools/lib/h5diff.c26
3 files changed, 34 insertions, 20 deletions
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index 05fd607..879e30e 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -55,7 +55,7 @@ INSTALL (
FILES
${H5_TOOLS_LIB_HDRS}
DESTINATION
- include/tools
+ ${HDF5_INSTALL_INCLUDE_DIR}/tools
COMPONENT
toolsheaders
)
@@ -84,8 +84,8 @@ IF (HDF5_EXPORTED_TARGETS)
${HDF5_TOOLS_LIB_TARGET}
EXPORT
${HDF5_EXPORTED_TARGETS}
- LIBRARY DESTINATION lib/tools COMPONENT toolslibraries
- ARCHIVE DESTINATION lib/tools COMPONENT toolslibraries
- RUNTIME DESTINATION bin/tools COMPONENT toolslibraries
+ LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR}/tools COMPONENT toolslibraries
+ ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR}/tools COMPONENT toolslibraries
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR}/tools COMPONENT toolslibraries
)
ENDIF (HDF5_EXPORTED_TARGETS)
diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in
index 020dab5..5e8ac33 100644
--- a/tools/lib/Makefile.in
+++ b/tools/lib/Makefile.in
@@ -334,14 +334,24 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
-H5CPP = $(bindir)/h5c++
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
ACLOCAL_AMFLAGS = "-I m4"
# The trace script; this is used on source files from the C library to
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index d462b45..640a20a 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -14,8 +14,8 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <stdlib.h>
-#include "h5diff.h"
#include "H5private.h"
+#include "h5diff.h"
#include "ph5diff.h"
#include "h5tools.h"
#include "h5tools_utils.h"
@@ -235,7 +235,7 @@ out:
* Programmer: Jonathan Kim
* Date: Aug 23, 2010
*------------------------------------------------------------------------*/
-static int is_exclude_path (trav_path_t * paths, diff_opt_t *options)
+static int is_exclude_path (char * path, h5trav_type_t type, diff_opt_t *options)
{
struct exclude_path_list * exclude_path_ptr;
int ret_cmp;
@@ -255,7 +255,7 @@ static int is_exclude_path (trav_path_t * paths, diff_opt_t *options)
/* if given object is group, exclude its members as well */
if (exclude_path_ptr->obj_type == H5TRAV_TYPE_GROUP)
{
- ret_cmp = HDstrncmp(exclude_path_ptr->obj_path, paths->path,
+ ret_cmp = HDstrncmp(exclude_path_ptr->obj_path, path,
strlen(exclude_path_ptr->obj_path));
if (ret_cmp == 0)
{
@@ -265,7 +265,7 @@ static int is_exclude_path (trav_path_t * paths, diff_opt_t *options)
* not under “/grp1xxx/” group.
*/
len_grp = HDstrlen(exclude_path_ptr->obj_path);
- if (paths->path[len_grp] == '/')
+ if (path[len_grp] == '/')
{
/* belong to excluded group! */
ret = 1;
@@ -276,14 +276,14 @@ static int is_exclude_path (trav_path_t * paths, diff_opt_t *options)
/* exclude target is not group, just exclude the object */
else
{
- ret_cmp = HDstrcmp(exclude_path_ptr->obj_path, paths->path);
+ ret_cmp = HDstrcmp(exclude_path_ptr->obj_path, path);
if (ret_cmp == 0)
{
/* excluded non-group object */
ret = 1;
/* assign type as scan progress, which is sufficient to
* determine type for excluding groups from the above if. */
- exclude_path_ptr->obj_type = paths->type;
+ exclude_path_ptr->obj_type = type;
break; /* while */
}
}
@@ -342,6 +342,8 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch
unsigned infile[2];
char * path1_lp;
char * path2_lp;
+ h5trav_type_t type1_l;
+ h5trav_type_t type2_l;
int path1_offset = 0;
int path2_offset = 0;
int cmp;
@@ -371,12 +373,14 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch
path1_lp = (info1->paths[curr1].path) + path1_offset;
path2_lp = (info2->paths[curr2].path) + path2_offset;
+ type1_l = info1->paths[curr1].type;
+ type2_l = info2->paths[curr2].type;
/* criteria is string compare */
cmp = HDstrcmp(path1_lp, path2_lp);
if(cmp == 0) {
- if(!is_exclude_path(&(info1->paths[curr1]), options))
+ if(!is_exclude_path(path1_lp, type1_l, options))
{
infile[0] = 1;
infile[1] = 1;
@@ -387,7 +391,7 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch
} /* end if */
else if(cmp < 0)
{
- if(!is_exclude_path(&(info1->paths[curr1]), options))
+ if(!is_exclude_path(path1_lp, type1_l, options))
{
infile[0] = 1;
infile[1] = 0;
@@ -397,7 +401,7 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch
} /* end else-if */
else
{
- if (!is_exclude_path(&(info2->paths[curr2]), options))
+ if (!is_exclude_path(path2_lp, type2_l, options))
{
infile[0] = 0;
infile[1] = 1;
@@ -412,7 +416,7 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch
infile[1] = 0;
while(curr1 < info1->nused)
{
- if(!is_exclude_path(&(info1->paths[curr1]), options))
+ if(!is_exclude_path(path1_lp, type1_l, options))
{
path1_lp = (info1->paths[curr1].path) + path1_offset;
trav_table_addflags(infile, path1_lp, info1->paths[curr1].type, table);
@@ -425,7 +429,7 @@ static void build_match_list (const char *objname1, trav_info_t *info1, const ch
infile[1] = 1;
while(curr2 < info2->nused)
{
- if (!is_exclude_path(&(info2->paths[curr2]), options))
+ if (!is_exclude_path(path2_lp, type2_l, options))
{
path2_lp = (info2->paths[curr2].path) + path2_offset;
trav_table_addflags(infile, path2_lp, info2->paths[curr2].type, table);