summaryrefslogtreecommitdiffstats
path: root/fortran/examples
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2010-05-12 20:55:52 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2010-05-12 20:55:52 (GMT)
commitfa416bde84a8c219fa570660bbf3ec8ab16320e7 (patch)
tree5430f5c54b5d4a458859f7e9e10723c09e4e7673 /fortran/examples
parenteeeb3937624f7db68680e1074b1154adc780d516 (diff)
downloadhdf5-fa416bde84a8c219fa570660bbf3ec8ab16320e7.zip
hdf5-fa416bde84a8c219fa570660bbf3ec8ab16320e7.tar.gz
hdf5-fa416bde84a8c219fa570660bbf3ec8ab16320e7.tar.bz2
[svn-r18779] Add ${DESTDIR} to scripts and Makefiles so that make DESTDIR=<install directory> install, installcheck and uninstall is supported for installing examples, since they are now installed as part of make install. This was necessary for rpmbuilds, but should also be supported otherwise.
Tested: amani, jam, linew with committest, rpmbuild on jam and amani.
Diffstat (limited to 'fortran/examples')
-rw-r--r--fortran/examples/Makefile.am2
-rw-r--r--fortran/examples/Makefile.in12
-rwxr-xr-xfortran/examples/testh5fc.sh.in2
3 files changed, 8 insertions, 8 deletions
diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am
index bb3be1a..5d03d2a 100644
--- a/fortran/examples/Makefile.am
+++ b/fortran/examples/Makefile.am
@@ -64,7 +64,7 @@ $(EXTRA_PROG): $(H5FC)
endif
# Tell automake how to install examples
-EXAMPLEDIR=$(exec_prefix)/examples/fortran
+EXAMPLEDIR=${DESTDIR}/$(exec_prefix)/share/hdf5_examples/fortran
# List dependencies for each example. Normally, automake would take
# care of this for us, but if we tell automake about the programs it
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index aa67d82..05ebe21 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -317,11 +317,11 @@ LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
# 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++
# The trace script; this is used on source files from the C library to
# insert tracing macros.
@@ -357,7 +357,7 @@ INSTALL_FILES = dsetexample.f90 fileexample.f90 rwdsetexample.f90 \
FORTRAN_API = yes
# Tell automake how to install examples
-EXAMPLEDIR = $(exec_prefix)/examples/fortran
+EXAMPLEDIR = ${DESTDIR}/$(exec_prefix)/share/hdf5_examples/fortran
# Assume that all tests in this directory are examples, and tell
# conclude.am when to build them.
diff --git a/fortran/examples/testh5fc.sh.in b/fortran/examples/testh5fc.sh.in
index 234d4e2..8228ca6 100755
--- a/fortran/examples/testh5fc.sh.in
+++ b/fortran/examples/testh5fc.sh.in
@@ -25,7 +25,7 @@ EXIT_SUCCESS=0
EXIT_FAILURE=1
# Where the tool is installed.
-prefix="${prefix:-@prefix@}"
+prefix="${prefix:-${DESTDIR}/@prefix@}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"