From 6d912b639416158f700397909996f2687473cfd3 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Fri, 30 Apr 2010 15:28:45 -0500 Subject: [svn-r18680] Added running make install-examples to make install. Make install-examples will still install example files and make install will also install them. --- Makefile.am | 7 +++++-- Makefile.in | 9 +++++---- c++/examples/Makefile.am | 2 +- c++/examples/Makefile.in | 5 +++-- config/examples.am | 5 ++++- examples/Makefile.am | 2 +- examples/Makefile.in | 5 +++-- fortran/examples/Makefile.am | 2 +- fortran/examples/Makefile.in | 5 +++-- hl/c++/examples/Makefile.am | 2 +- hl/c++/examples/Makefile.in | 3 ++- hl/examples/Makefile.am | 2 +- hl/examples/Makefile.in | 5 +++-- hl/fortran/examples/Makefile.am | 2 +- hl/fortran/examples/Makefile.in | 3 ++- 15 files changed, 36 insertions(+), 23 deletions(-) diff --git a/Makefile.am b/Makefile.am index 7acc2db..8e1ce4a 100755 --- a/Makefile.am +++ b/Makefile.am @@ -125,13 +125,16 @@ mostlyclean-local: $(RM) -rf ii_files; \ fi +# 'make install' will now install examples, the same as 'make install-all'. +# 'make-install-all' will be redundant but will still work. +install: install-recursive install-examples +uninstall: uninstall-recursive uninstall-examples + # 'make install-all' also installs examples install-all: @$(MAKE) $(AM_MAKEFLAGS) install - @$(MAKE) $(AM_MAKEFLAGS) install-examples uninstall-all: @$(MAKE) $(AM_MAKEFLAGS) uninstall - @$(MAKE) $(AM_MAKEFLAGS) uninstall-examples # Install examples in this directory and recursively install-examples uninstall-examples: diff --git a/Makefile.in b/Makefile.in index 9e7ded7..f14408f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -778,10 +778,8 @@ check: check-recursive all-am: Makefile all-local installdirs: installdirs-recursive installdirs-am: -install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive -uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am @@ -950,13 +948,16 @@ mostlyclean-local: $(RM) -rf ii_files; \ fi +# 'make install' will now install examples, the same as 'make install-all'. +# 'make-install-all' will be redundant but will still work. +install: install-recursive install-examples +uninstall: uninstall-recursive uninstall-examples + # 'make install-all' also installs examples install-all: @$(MAKE) $(AM_MAKEFLAGS) install - @$(MAKE) $(AM_MAKEFLAGS) install-examples uninstall-all: @$(MAKE) $(AM_MAKEFLAGS) uninstall - @$(MAKE) $(AM_MAKEFLAGS) uninstall-examples # Install examples in this directory and recursively install-examples uninstall-examples: diff --git a/c++/examples/Makefile.am b/c++/examples/Makefile.am index f97a3f3..481d75f 100644 --- a/c++/examples/Makefile.am +++ b/c++/examples/Makefile.am @@ -38,7 +38,7 @@ chunks.chkexe_: extend_ds.chkexe_ CXX_API=yes # Where to install examples -EXAMPLEDIR=$(docdir)/hdf5/examples/c++ +EXAMPLEDIR=$(exec_prefix)/examples/c++ # How to build programs using h5c++ $(EXTRA_PROG): $(H5CPP) diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 46a50c5..385af248 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -345,7 +345,7 @@ INSTALL_FILES = create.cpp readdata.cpp writedata.cpp compound.cpp \ CXX_API = yes # Where to install examples -EXAMPLEDIR = $(docdir)/hdf5/examples/c++ +EXAMPLEDIR = $(exec_prefix)/examples/c++ # Assume that all tests in this directory are examples, and tell # conclude.am when to build them. @@ -606,12 +606,13 @@ install-data-local: uninstall-local: @$(MAKE) $(AM_MAKEFLAGS) uninstall-examples -install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) +install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) $(TEST_SCRIPT) @for f in X $(INSTALL_FILES); do \ if test $$f != X; then \ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\ fi; \ done + @(set -x; $(INSTALL) $(builddir)/$(TEST_SCRIPT) $(EXAMPLEDIR)/.. || exit 1); uninstall-examples: @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ diff --git a/config/examples.am b/config/examples.am index 28bd447..f4d6f00 100644 --- a/config/examples.am +++ b/config/examples.am @@ -60,12 +60,15 @@ install-data-local: uninstall-local: @$(MAKE) $(AM_MAKEFLAGS) uninstall-examples -install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) +install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) $(TEST_SCRIPT) @for f in X $(INSTALL_FILES); do \ if test $$f != X; then \ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\ fi; \ done + @if test $(TEST_SCRIPT) != X; then \ + (set -x; $(INSTALL) $(builddir)/$(TEST_SCRIPT) $(EXAMPLEDIR)/.. \ + || exit 1); uninstall-examples: @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ diff --git a/examples/Makefile.am b/examples/Makefile.am index d3fe9c9..94cceae 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -65,7 +65,7 @@ $(EXTLINK_DIRS): CHECK_CLEANFILES+=$(EXTLINK_DIRS) # Example directory -EXAMPLEDIR=$(docdir)/hdf5/examples/c +EXAMPLEDIR=$(exec_prefix)/examples/c # List dependencies for each program. Normally, automake would take # care of this for us, but if we tell automake about the programs it diff --git a/examples/Makefile.in b/examples/Makefile.in index 04c5f2d..4d6edfb 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -355,7 +355,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ EXTLINK_DIRS = red blue u2w # Example directory -EXAMPLEDIR = $(docdir)/hdf5/examples/c +EXAMPLEDIR = $(exec_prefix)/examples/c # Assume that all tests in this directory are examples, and tell # conclude.am when to build them. @@ -636,12 +636,13 @@ install-data-local: uninstall-local: @$(MAKE) $(AM_MAKEFLAGS) uninstall-examples -install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) +install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) $(TEST_SCRIPT) @for f in X $(INSTALL_FILES); do \ if test $$f != X; then \ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\ fi; \ done + @(set -x; $(INSTALL) $(builddir)/$(TEST_SCRIPT) $(EXAMPLEDIR)/.. || exit 1); uninstall-examples: @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am index 772cb13..bb3be1a 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=$(docdir)/hdf5/examples/fortran +EXAMPLEDIR=$(exec_prefix)/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 7a92157..7dc2521 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -356,7 +356,7 @@ INSTALL_FILES = dsetexample.f90 fileexample.f90 rwdsetexample.f90 \ FORTRAN_API = yes # Tell automake how to install examples -EXAMPLEDIR = $(docdir)/hdf5/examples/fortran +EXAMPLEDIR = $(exec_prefix)/examples/fortran # Assume that all tests in this directory are examples, and tell # conclude.am when to build them. @@ -634,12 +634,13 @@ install-data-local: uninstall-local: @$(MAKE) $(AM_MAKEFLAGS) uninstall-examples -install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) +install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) $(TEST_SCRIPT) @for f in X $(INSTALL_FILES); do \ if test $$f != X; then \ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\ fi; \ done + @(set -x; $(INSTALL) $(builddir)/$(TEST_SCRIPT) $(EXAMPLEDIR)/.. || exit 1); uninstall-examples: @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ diff --git a/hl/c++/examples/Makefile.am b/hl/c++/examples/Makefile.am index 7ccc92b..5bc17d0 100644 --- a/hl/c++/examples/Makefile.am +++ b/hl/c++/examples/Makefile.am @@ -32,7 +32,7 @@ INSTALL_FILES=ptExampleFL.cpp ptExampleVL.cpp CXX_API=yes # Where to install examples -EXAMPLEDIR=$(docdir)/hdf5/examples/hl/c++ +EXAMPLEDIR=$(exec_prefix)/examples/hl/c++ # How to build programs using h5c++ $(EXTRA_PROG): $(H5CPP) diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 51c04ad..032d8d8 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -592,12 +592,13 @@ install-data-local: uninstall-local: @$(MAKE) $(AM_MAKEFLAGS) uninstall-examples -install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) +install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) $(TEST_SCRIPT) @for f in X $(INSTALL_FILES); do \ if test $$f != X; then \ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\ fi; \ done + @(set -x; $(INSTALL) $(builddir)/$(TEST_SCRIPT) $(EXAMPLEDIR)/.. || exit 1); uninstall-examples: @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ diff --git a/hl/examples/Makefile.am b/hl/examples/Makefile.am index 9d601ee..6e5afe4 100644 --- a/hl/examples/Makefile.am +++ b/hl/examples/Makefile.am @@ -26,7 +26,7 @@ if BUILD_PARALLEL_CONDITIONAL endif # Example directory -EXAMPLEDIR=$(docdir)/hdf5/examples/hl/c +EXAMPLEDIR=$(exec_prefix)/examples/hl/c # 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 31c21f0..d4e2e94 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -333,7 +333,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 @BUILD_PARALLEL_CONDITIONAL_TRUE@TEST_PROG_PARA = # Example directory -EXAMPLEDIR = $(docdir)/hdf5/examples/hl/c +EXAMPLEDIR = $(exec_prefix)/examples/hl/c # Example programs. # Don't tell automake about them, because if it knew they were programs, @@ -625,12 +625,13 @@ install-data-local: uninstall-local: @$(MAKE) $(AM_MAKEFLAGS) uninstall-examples -install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) +install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) $(TEST_SCRIPT) @for f in X $(INSTALL_FILES); do \ if test $$f != X; then \ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\ fi; \ done + @(set -x; $(INSTALL) $(builddir)/$(TEST_SCRIPT) $(EXAMPLEDIR)/.. || exit 1); uninstall-examples: @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ diff --git a/hl/fortran/examples/Makefile.am b/hl/fortran/examples/Makefile.am index 0d910ad..1385b18 100644 --- a/hl/fortran/examples/Makefile.am +++ b/hl/fortran/examples/Makefile.am @@ -49,7 +49,7 @@ $(EXTRA_PROG): $(H5FC) endif # Tell automake how to install examples -EXAMPLEDIR=$(docdir)/hdf5/examples/hl/fortran +EXAMPLEDIR=$(exec_prefix)/examples/hl/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/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index b2336ca..e0acfea 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -593,12 +593,13 @@ install-data-local: uninstall-local: @$(MAKE) $(AM_MAKEFLAGS) uninstall-examples -install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) +install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) $(TEST_SCRIPT) @for f in X $(INSTALL_FILES); do \ if test $$f != X; then \ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\ fi; \ done + @(set -x; $(INSTALL) $(builddir)/$(TEST_SCRIPT) $(EXAMPLEDIR)/.. || exit 1); uninstall-examples: @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ -- cgit v0.12