summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2005-12-13 21:37:15 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2005-12-13 21:37:15 (GMT)
commitfde99876a3b57f06f37d14727508975712667b5d (patch)
tree8382f0d1b019538de276559b10621add790800e1
parent92a508bdb80fa3d1a9ce296c65c3d819f117fd22 (diff)
downloadhdf5-fde99876a3b57f06f37d14727508975712667b5d.zip
hdf5-fde99876a3b57f06f37d14727508975712667b5d.tar.gz
hdf5-fde99876a3b57f06f37d14727508975712667b5d.tar.bz2
[svn-r11791] Purpose:
Bug fix Description: Fogot to commit file config/examples.am in previous checkin. Solution: The examples.am file contains common Makefile rules for the example directories.
-rw-r--r--MANIFEST1
-rw-r--r--config/examples.am74
2 files changed, 75 insertions, 0 deletions
diff --git a/MANIFEST b/MANIFEST
index 492faca..19ce544 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -73,6 +73,7 @@
./config/dec-flags
./config/dec-osf4.x
./config/dec-osf5.x
+./config/examples.am
./config/freebsd
./config/gnu-fflags
./config/gnu-flags
diff --git a/config/examples.am b/config/examples.am
new file mode 100644
index 0000000..b3651ef
--- /dev/null
+++ b/config/examples.am
@@ -0,0 +1,74 @@
+## config/examples.am
+## Copyright by the Board of Trustees of the University of Illinois.
+## All rights reserved.
+##
+## This file is part of HDF5. The full HDF5 copyright notice, including
+## terms governing use, modification, and redistribution, is contained in
+## the files COPYING and Copyright.html. COPYING can be found at the root
+## of the source code distribution tree; Copyright.html can be found at the
+## root level of an installed copy of the electronic HDF5 document set and
+## is linked from the top-level documents page. It can also be found at
+## http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have
+## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
+
+## Textually included near the end of HDF5 Makefiles in example directories.
+## Contains boilerplate for building, installing, and cleaning example
+## programs.
+
+# We can't tell automake about example programs, because they need to be
+# built using h5cc (or h5fc, etc.) instead of the standard compilers.
+# This creates some extra work for us.
+
+## The Makefile.am that includes this boilerplate needs to define the
+## following:
+##
+## TEST_PROG and TEST_PROG_PARA
+## We assume that all test programs in this directory are examples.
+##
+## INSTALL_FILES
+## The source files that the examples use which should be installed.
+##
+## EXAMPLEDIR
+## The directory into which examples should be installed.
+##
+## Build rules for $(EXTRA_PROG).
+## Dependencies for example programs.
+## Automake will supply neither of these.
+##
+
+# Assume that all tests in this directory are examples, and tell
+# conclude.am when to build them.
+EXAMPLE_PROG = $(TEST_PROG_PARA) $(TEST_PROG)
+EXTRA_PROG = $(EXAMPLE_PROG)
+
+# We need to tell automake what to clean
+MOSTLYCLEANFILES=*.raw *.meta *.o
+CHECK_CLEANFILES+=*.h5
+CLEANFILES=$(TEST_PROG) $(TEST_PROG_PARA)
+
+# How to create EXAMPLEDIR if it doesn't already exist
+$(EXAMPLEDIR):
+ -$(top_srcdir)/bin/mkdirs $@
+
+# Install and uninstall rules. We install the source files, not the
+# example programs themselves.
+install-data-local:
+ @$(MAKE) $(AM_MAKEFLAGS) install-examples
+uninstall-local:
+ @$(MAKE) $(AM_MAKEFLAGS) uninstall-examples
+
+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);\
+ fi; \
+ done
+
+uninstall-examples:
+ @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
+ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
+ fi
+
+installcheck-local:
+ @$(MAKE) $(AM_MAKEFLAGS) check
+