mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
Let us override the examples directory using --with-examplesdir=DIR.
This is handy for NetBSD where HDF5 examples are installed by convention in $prefix/share/examples/hdf5/ rather than in ${prefix}/share/hdf5_examples/, which is the HDF5 default. Place hdf5_examples/ under ${datarootdir} which on most systems will be ${prefix}/share/, anyway.
This commit is contained in:
parent
bbc1264ea6
commit
b8a93a7224
@ -49,8 +49,8 @@ CXX_API=yes
|
||||
|
||||
# Where to install examples
|
||||
# Note: no '/' after DESTDIR. Explanation in commence.am
|
||||
EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/c++
|
||||
EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples
|
||||
EXAMPLEDIR=$(examplesdir)/c++
|
||||
EXAMPLETOPDIR=$(examplesdir)
|
||||
|
||||
# How to build programs using h5c++
|
||||
$(EXTRA_PROG): $(H5CPP)
|
||||
|
@ -18,7 +18,7 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# This script will compile and run the c++ examples from source files #
|
||||
# installed in .../share/hdf5_examples/c++ using h5c++. The #
|
||||
# installed in @examplesdir@/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 #
|
||||
|
22
configure.ac
22
configure.ac
@ -2966,6 +2966,28 @@ fi
|
||||
## Checkpoint the cache
|
||||
AC_CACHE_SAVE
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Use custom examples path.
|
||||
##
|
||||
AC_MSG_CHECKING([for custom examples path definition])
|
||||
AC_ARG_WITH([examplesdir],
|
||||
[AS_HELP_STRING([--with-examplesdir=location],
|
||||
[Specify path for examples
|
||||
[default="DATAROOTDIR/hdf5_examples"]])],,
|
||||
withval="${datarootdir}/hdf5_examples")
|
||||
|
||||
if test "X$withval" = "X"; then
|
||||
AC_MSG_RESULT([default])
|
||||
examplesdir="${datarootdir}/hdf5_examples"
|
||||
else
|
||||
AC_MSG_RESULT([$withval])
|
||||
examplesdir=$withval
|
||||
fi
|
||||
|
||||
AC_SUBST([examplesdir])
|
||||
AC_DEFINE_UNQUOTED([EXAMPLESDIR], ["$examplesdir"],
|
||||
[Define the examples directory])
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Enable custom plugin default path for library. It requires SHARED support.
|
||||
##
|
||||
|
@ -84,8 +84,8 @@ CHECK_CLEANFILES+=$(EXTLINK_DIRS)
|
||||
|
||||
# Example directory
|
||||
# Note: no '/' after DESTDIR. Explanation in commence.am
|
||||
EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/c
|
||||
EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples
|
||||
EXAMPLEDIR=$(examplesdir)/c
|
||||
EXAMPLETOPDIR=$(examplesdir)
|
||||
|
||||
# List dependencies for each program. Normally, automake would take
|
||||
# care of this for us, but if we tell automake about the programs it
|
||||
|
@ -18,7 +18,7 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# This script will compile and run the c examples from source files installed #
|
||||
# in .../share/hdf5_examples/c using h5cc or h5pc. The order for running #
|
||||
# in @examplesdir@/c using h5cc or h5pc. 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. #
|
||||
|
@ -74,8 +74,8 @@ endif
|
||||
|
||||
# Tell automake how to install examples
|
||||
# Note: no '/' after DESTDIR. Explanation in commence.am
|
||||
EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/fortran
|
||||
EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples
|
||||
EXAMPLEDIR=$(examplesdir)/fortran
|
||||
EXAMPLETOPDIR=$(examplesdir)
|
||||
|
||||
# List dependencies for each example. Normally, automake would take
|
||||
# care of this for us, but if we tell automake about the programs it
|
||||
|
@ -18,7 +18,7 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# This script will compile and run the fortran examples from source files #
|
||||
# installed in .../share/hdf5_examples/fortran using h5fc or h5pfc. The #
|
||||
# installed in @examplesdir@/fortran using h5fc or h5pfc. 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 #
|
||||
|
@ -33,8 +33,8 @@ CXX_API=yes
|
||||
|
||||
# Where to install examples
|
||||
# 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
|
||||
EXAMPLEDIR=$(examplesdir)/hl/c++
|
||||
EXAMPLETOPDIR=$(examplesdir)/hl
|
||||
|
||||
# How to build programs using h5c++
|
||||
$(EXTRA_PROG): $(H5CPP)
|
||||
|
@ -18,7 +18,7 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# This script will compile and run the c++ examples from source files #
|
||||
# installed in .../share/hdf5_examples/hl/c++ using h5c++. The #
|
||||
# installed in @examplesdir@/hl/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 #
|
||||
|
@ -25,8 +25,8 @@ endif
|
||||
|
||||
# Example directory
|
||||
# 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
|
||||
EXAMPLEDIR=$(examplesdir)/hl/c
|
||||
EXAMPLETOPDIR=$(examplesdir)/hl
|
||||
INSTALL_SCRIPT_FILES = run-hlc-ex.sh
|
||||
INSTALL_TOP_SCRIPT_FILES = run-hl-ex.sh
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# This script will compile and run the c examples from source files installed #
|
||||
# in .../share/hdf5_examples/hl/c using h5cc or h5pc. The order for running #
|
||||
# in @examplesdir@/hl/c using h5cc or h5pc. 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. #
|
||||
|
@ -51,8 +51,8 @@ endif
|
||||
|
||||
# Tell automake how to install examples
|
||||
# Note: no '/' after DESTDIR. Explanation in commence.am
|
||||
EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl/fortran
|
||||
EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
|
||||
EXAMPLEDIR=$(examplesdir)/hl/fortran
|
||||
EXAMPLETOPDIR=$(examplesdir)/hl
|
||||
|
||||
# List dependencies for each example. Normally, automake would take
|
||||
# care of this for us, but if we tell automake about the programs it
|
||||
|
@ -18,7 +18,7 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# This script will compile and run the fortran examples from source files #
|
||||
# installed in .../share/hdf5_examples/hl/fortran using h5fc or h5pfc. The #
|
||||
# installed in @examplesdir@/hl/fortran using h5fc or h5pfc. 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 #
|
||||
|
Loading…
Reference in New Issue
Block a user