diff options
author | James Laird <jlaird@hdfgroup.org> | 2005-12-09 20:59:11 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2005-12-09 20:59:11 (GMT) |
commit | b1fd3f565750a18246239cdac50e433d6d668524 (patch) | |
tree | f09179e1fb2a04e01983c85f9a3873c159fefda7 /examples/Makefile.am | |
parent | 9124030f911f002bd49ec8bccd4c051df410cc72 (diff) | |
download | hdf5-b1fd3f565750a18246239cdac50e433d6d668524.zip hdf5-b1fd3f565750a18246239cdac50e433d6d668524.tar.gz hdf5-b1fd3f565750a18246239cdac50e433d6d668524.tar.bz2 |
[svn-r11780] Purpose:
Added high-level example directories
Description:
Refactored common code out of examples Makefiles.am, added high-level
example directories, added packet table examples.
Solution:
Examples now draw from a common config/examples.am file, which
contains rules for installing, uninstalling, and cleaning examples.
High-level example directories are mostly empty, except for the
C and C++ packet table tests.
Platforms tested:
mir, sleipnir, copper, shanti
Diffstat (limited to 'examples/Makefile.am')
-rw-r--r-- | examples/Makefile.am | 47 |
1 files changed, 3 insertions, 44 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am index 6143c6e..e6991d9 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -27,28 +27,16 @@ endif # Example programs. # Don't tell automake about them, because if it knew they were programs, # it would try to compile them instead of using the h5cc script. -# This creates some extra work for us. -# -# It might be possible to use automake's COMPILE variable to have it -# use h5cc properly (and h5fc and h5c++). +# Use the boilerplate in config/examples.am instead. TEST_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers -# Tell conclude.in boilerplate when to build the examples -EXAMPLE_PROG = $(TEST_PROG_PARA) $(TEST_PROG) -EXTRA_PROG = $(EXAMPLE_PROG) - # Install files # List all file that should be installed in examples directory INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \ h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \ h5_reference.c h5_drivers.c ph5example.c -# We need to tell automake what to clean -MOSTLYCLEANFILES=*.raw *.meta *.o -CHECK_CLEANFILES+=*.h5 -CLEANFILES=$(TEST_PROG) $(TEST_PROG_PARA) - # Additional dependencies for each program are listed below. $(EXTRA_PROG): $(LIBHDF5) if BUILD_PARALLEL_CONDITIONAL @@ -61,39 +49,9 @@ endif h5_read.chkexe_: h5_write.chkexe_ h5_chunk_read.chkexe_: h5_extend_write.chkexe_ -# How to install examples -# There are a lot of rules because automake does not know about -# the examples programs, and does not recognize the install-examples -# target. +# Example directory EXAMPLEDIR=$(docdir)/hdf5/examples/c -$(EXAMPLEDIR): - -$(top_srcdir)/bin/mkdirs $@ - -install-data-local: - @$(MAKE) $(AM_MAKEFLAGS) install-examples -uninstall-local: - @$(MAKE) $(AM_MAKEFLAGS) uninstall-examples - -# We want to install the source files, not the examples themselves. Add '.c' to -# each example to get its source. This is a bit kludgy. -install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) - @for f in X $(INSTALL_FILES); do \ - if test $$f != X; then \ - (set -x; $(INSTALL) $(top_srcdir)/examples/$$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 - -check-install: - @$(MAKE) $(AM_MAKEFLAGS) installcheck -installcheck-local: - @$(MAKE) $(AM_MAKEFLAGS) check - # List dependencies for each program. Normally, automake would take # care of this for us, but if we tell automake about the programs it # will try to build them with the normal C compiler, not h5cc. This is @@ -114,4 +72,5 @@ h5_drivers: $(srcdir)/h5_drivers.c ph5example: $(srcdir)/ph5example.c h5_dtransform: $(srcdir)/h5_dtransform.c +include $(top_srcdir)/config/examples.am include $(top_srcdir)/config/conclude.am |