summaryrefslogtreecommitdiffstats
path: root/hl/examples
diff options
context:
space:
mode:
Diffstat (limited to 'hl/examples')
-rw-r--r--hl/examples/Makefile.am5
-rw-r--r--hl/examples/Makefile.in25
-rwxr-xr-xhl/examples/run-hl-ex.sh12
-rwxr-xr-xhl/examples/run-hlc-ex.sh.in3
4 files changed, 31 insertions, 14 deletions
diff --git a/hl/examples/Makefile.am b/hl/examples/Makefile.am
index 64a29d4..d1f67bc 100644
--- a/hl/examples/Makefile.am
+++ b/hl/examples/Makefile.am
@@ -26,8 +26,9 @@ if BUILD_PARALLEL_CONDITIONAL
endif
# Example directory
-EXAMPLEDIR=${DESTDIR}/$(exec_prefix)/share/hdf5_examples/hl/c
-EXAMPLETOPDIR=${DESTDIR}/$(exec_prefix)/share/hdf5_examples/hl
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/c
+EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
# Example programs.
# Don't tell automake about them, because if it knew they were programs,
diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in
index 8e15960..48cc9d9 100644
--- a/hl/examples/Makefile.in
+++ b/hl/examples/Makefile.in
@@ -314,14 +314,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
@@ -335,8 +345,9 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
@BUILD_PARALLEL_CONDITIONAL_TRUE@TEST_PROG_PARA =
# Example directory
-EXAMPLEDIR = ${DESTDIR}/$(exec_prefix)/share/hdf5_examples/hl/c
-EXAMPLETOPDIR = ${DESTDIR}/$(exec_prefix)/share/hdf5_examples/hl
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/c
+EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
# Example programs.
# Don't tell automake about them, because if it knew they were programs,
diff --git a/hl/examples/run-hl-ex.sh b/hl/examples/run-hl-ex.sh
index 0478f76..5fa97c0 100755
--- a/hl/examples/run-hl-ex.sh
+++ b/hl/examples/run-hl-ex.sh
@@ -25,10 +25,14 @@
if (echo "Run hl c examples" && \
(cd c; sh ./run-hlc-ex.sh) && \
- echo "Run hl fortran examples" && \
- (cd fortran; sh ./run-hlfortran-ex.sh) && \
- echo "Run hl c++ examples" && \
- (cd c++; sh ./run-hlc++-ex.sh)); then
+ (if test -d fortran; then
+ echo "Run hl fortran examples"
+ cd fortran; sh ./run-hlfortran-ex.sh
+ fi)
+ (if test -d c++; then
+ echo "Run hl c++ examples"
+ cd c++; sh ./run-hlc++-ex.sh
+ fi)); then
echo "Finished running hl examples"
exit 0
else
diff --git a/hl/examples/run-hlc-ex.sh.in b/hl/examples/run-hlc-ex.sh.in
index d66d9e0..86c6276 100755
--- a/hl/examples/run-hlc-ex.sh.in
+++ b/hl/examples/run-hlc-ex.sh.in
@@ -32,7 +32,8 @@ EXIT_SUCCESS=0
EXIT_FAILURE=1
# Where the tool is installed.
-prefix="${prefix:-${DESTDIR}/@prefix@}"
+# Note: no '/' after DESTDIR. Explanation in commence.am
+prefix="${prefix:-${DESTDIR}@prefix@}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"