diff options
-rw-r--r-- | MANIFEST | 2 | ||||
-rw-r--r-- | c++/examples/Makefile.in | 11 | ||||
-rw-r--r-- | config/examples.am | 12 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | examples/Makefile.am | 1 | ||||
-rw-r--r-- | examples/Makefile.in | 14 | ||||
-rw-r--r-- | examples/README | 17 | ||||
-rw-r--r-- | fortran/examples/Makefile.in | 11 | ||||
-rw-r--r-- | hl/c++/examples/Makefile.in | 11 | ||||
-rw-r--r-- | hl/examples/Makefile.in | 11 | ||||
-rw-r--r-- | hl/fortran/examples/Makefile.in | 11 |
11 files changed, 93 insertions, 10 deletions
@@ -138,7 +138,7 @@ ./examples/h5_shared_mesg.c ./examples/ph5example.c ./examples/testh5cc.sh.in - +./examples/README #------------------------------------------------------------------------------ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 479747e..9397a27c 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -643,7 +643,7 @@ 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); \ @@ -655,6 +655,12 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) (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); \ @@ -668,6 +674,9 @@ uninstall-examples: @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 diff --git a/config/examples.am b/config/examples.am index 244e695..9acd719 100644 --- a/config/examples.am +++ b/config/examples.am @@ -32,6 +32,7 @@ ## The source files that the examples use which should be installed. ## INSTALL_SCRIPT_FILES ## INSTALL_TOP_SCRIPT_FILES +## INSTALL_TOP_FILES ## ## EXAMPLEDIR ## The directory into which examples should be installed. @@ -64,7 +65,7 @@ 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); \ @@ -76,6 +77,12 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) (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); \ @@ -89,6 +96,9 @@ uninstall-examples: @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 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in 22390 2012-05-22 20:34:34Z byrn . +# From configure.in Id: configure.in 22413 2012-05-27 14:34:59Z hdftest . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for HDF5 1.9.120. # diff --git a/examples/Makefile.am b/examples/Makefile.am index 9ec6a85..a35d8ca 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -44,6 +44,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ INSTALL_SCRIPT_FILES = run-c-ex.sh INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh +INSTALL_TOP_FILES = README # How to build examples, using installed version of h5cc if BUILD_PARALLEL_CONDITIONAL diff --git a/examples/Makefile.in b/examples/Makefile.in index c93ad12..c01afcc 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -54,7 +54,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/run-c-ex.sh.in $(srcdir)/testh5cc.sh.in \ $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/conclude.am \ @@ -382,6 +382,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ INSTALL_SCRIPT_FILES = run-c-ex.sh INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh +INSTALL_TOP_FILES = README # The external link examples demonstrate how to use paths; they need # directories to be created to do this. @@ -674,7 +675,7 @@ 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); \ @@ -686,6 +687,12 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) (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); \ @@ -699,6 +706,9 @@ uninstall-examples: @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 diff --git a/examples/README b/examples/README new file mode 100644 index 0000000..0550b15 --- /dev/null +++ b/examples/README @@ -0,0 +1,17 @@ + HDF5 Examples + +This directory contains example programs for the installed APIs and scripts to +compile and run them. Examples in the c and hl/c subdirectories are always +installed, and those in fortan, hl/fortran, c++ and hl/c++ will be installed +when fortran or c++ are enabled. + +Running the run-all-ex.sh script in this directory will run the scripts and in +turn the examples in all the subdirectories where examples are installed. The +scripts can also be run individually. The appropriate compile scripts in the +bin directory for this install will be used by default to compile and link the +example programs. Note that h5redeploy must be run if these binaries are +copied or extracted in a directory other than the one where they were initially +installed. Compile scripts from other locations can be used by setting an +environment variable prefix to the path of the directory containing the bin +directory with the compile scripts h5cc, h5fc, etc. For example, export +prefix=/usr/local/hdf5 to use h5cc, h5fc, etc. in /usr/local/hdf5/bin. diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index 12460f3..410f1e9 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -683,7 +683,7 @@ 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); \ @@ -695,6 +695,12 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) (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); \ @@ -708,6 +714,9 @@ uninstall-examples: @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 diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index acb7c11..dd07bfd 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -628,7 +628,7 @@ 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); \ @@ -640,6 +640,12 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) (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); \ @@ -653,6 +659,9 @@ uninstall-examples: @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 diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index e79583d..f8b3dd2 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -668,7 +668,7 @@ 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); \ @@ -680,6 +680,12 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) (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); \ @@ -693,6 +699,9 @@ uninstall-examples: @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 diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index 22744ae..e8028aa 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -631,7 +631,7 @@ 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); \ @@ -643,6 +643,12 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) (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); \ @@ -656,6 +662,9 @@ uninstall-examples: @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 |