Merge pull request #449 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:develop to develop

* commit '7bd516f2ead21e8470cc25c0b664ad6b56c723a0':
  Our best effort to build dynamic plugin tests and not install them with "make install".  It seems the install-exec-hook doesn't remove the last to be installed.
  Add targets for plugin test libraries to avoid linking to external libs.
This commit is contained in:
Larry Knox 2017-04-21 15:32:13 -05:00
commit 3750e8ac7c
6 changed files with 45 additions and 13 deletions

View File

@ -18,17 +18,19 @@
## Textually included at the end of most HDF5 Makefiles.am. ## Textually included at the end of most HDF5 Makefiles.am.
## Contains build rules. ## Contains build rules.
# Automake needs to be taught how to build lib, progs, and tests targets. # Automake needs to be taught how to build lib, dyn, progs and tests targets.
# These will be filled in automatically for the most part (e.g., # These will be filled in automatically for the most part (e.g.,
# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and # lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
# EXTRA_TEST variables are supplied to allow the user to force targets to # EXTRA_TEST variables are supplied to allow the user to force targets to
# be built at certain times. # be built at certain times.
LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
DYN = $(dyn_LTLIBRARIES)
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG) $(EXTRA_PROG)
chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TESTS = $(TEST_PROG) $(TEST_SCRIPT) $(EXTRA_TEST) TESTS = $(TEST_PROG) $(TEST_SCRIPT) $(EXTRA_TEST)
dyndir=$(libdir)
TEST_EXTENSIONS = .sh TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL) SH_LOG_COMPILER = $(SHELL)
@ -36,6 +38,7 @@ AM_SH_LOG_FLAGS =
# lib/progs/tests targets recurse into subdirectories. build-* targets # lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory. # build files in this directory.
build-dyn: $(DYN)
build-lib: $(LIB) build-lib: $(LIB)
build-progs: $(LIB) $(PROGS) build-progs: $(LIB) $(PROGS)
build-tests: $(LIB) $(PROGS) $(chk_TESTS) build-tests: $(LIB) $(PROGS) $(chk_TESTS)
@ -43,7 +46,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS)
# General rule for recursive building targets. # General rule for recursive building targets.
# BUILT_SOURCES contain targets that need to be built before anything else # BUILT_SOURCES contain targets that need to be built before anything else
# in the directory (e.g., for Fortran type detection) # in the directory (e.g., for Fortran type detection)
lib progs tests check-s check-p :: $(BUILT_SOURCES) lib dyn progs tests check-s check-p :: $(BUILT_SOURCES)
@$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
@for d in X $(SUBDIRS); do \ @for d in X $(SUBDIRS); do \
if test $$d != X && test $$d != .; then \ if test $$d != X && test $$d != .; then \

View File

@ -106,7 +106,7 @@ noinst_LTLIBRARIES=libh5test.la
if HAVE_SHARED_CONDITIONAL if HAVE_SHARED_CONDITIONAL
# The libdynlib1, libdynlib2, libdynlib3, and libdynlib4 library for testing plugin module plugin.c. # The libdynlib1, libdynlib2, libdynlib3, and libdynlib4 library for testing plugin module plugin.c.
# Build it as shared library if configure is enabled for shared library. # Build it as shared library if configure is enabled for shared library.
lib_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la dyn_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la
libdynlib1_la_SOURCES=dynlib1.c libdynlib1_la_SOURCES=dynlib1.c
libdynlib2_la_SOURCES=dynlib2.c libdynlib2_la_SOURCES=dynlib2.c
libdynlib3_la_SOURCES=dynlib3.c libdynlib3_la_SOURCES=dynlib3.c
@ -116,8 +116,20 @@ if HAVE_SHARED_CONDITIONAL
libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlib1.la: $(libdynlib1_la_OBJECTS) $(libdynlib1_la_DEPENDENCIES) $(EXTRA_libdynlib1_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlib1_la_LINK) $(am_libdynlib1_la_rpath) $(libdynlib1_la_OBJECTS) $(libdynlib1_la_LIBADD)
libdynlib2.la: $(libdynlib2_la_OBJECTS) $(libdynlib2_la_DEPENDENCIES) $(EXTRA_libdynlib2_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlib2_la_LINK) $(am_libdynlib2_la_rpath) $(libdynlib2_la_OBJECTS) $(libdynlib2_la_LIBADD)
libdynlib3.la: $(libdynlib3_la_OBJECTS) $(libdynlib3_la_DEPENDENCIES) $(EXTRA_libdynlib3_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlib3_la_LINK) $(am_libdynlib3_la_rpath) $(libdynlib3_la_OBJECTS) $(libdynlib3_la_LIBADD)
libdynlib4.la: $(libdynlib4_la_OBJECTS) $(libdynlib4_la_DEPENDENCIES) $(EXTRA_libdynlib4_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlib4_la_LINK) $(am_libdynlib4_la_rpath) $(libdynlib4_la_OBJECTS) $(libdynlib4_la_LIBADD)
install-exec-hook: install-exec-hook:
$(RM) $(DESTDIR)$(libdir)/*dynlib* $(RM) $(DESTDIR)$(dyndir)/*dynlib*
endif endif
libh5test_la_SOURCES=h5test.c testframe.c cache_common.c swmr_common.c libh5test_la_SOURCES=h5test.c testframe.c cache_common.c swmr_common.c

View File

@ -52,12 +52,15 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5)
if HAVE_SHARED_CONDITIONAL if HAVE_SHARED_CONDITIONAL
# Build it as shared library if configure is enabled for shared library. # Build it as shared library if configure is enabled for shared library.
lib_LTLIBRARIES=libdynlibdiff.la dyn_LTLIBRARIES=libdynlibdiff.la
libdynlibdiff_la_SOURCES=dynlib_diff.c libdynlibdiff_la_SOURCES=dynlib_diff.c
libdynlibdiff_la_LDFLAGS = -avoid-version -module -shared -export-dynamic libdynlibdiff_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlibdiff.la: $(libdynlibdiff_la_OBJECTS) $(libdynlibdiff_la_DEPENDENCIES) $(EXTRA_libdynlibdiff_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlibdiff_la_LINK) $(am_libdynlibdiff_la_rpath) $(libdynlibdiff_la_OBJECTS) $(libdynlibdiff_la_LIBADD)
install-exec-hook: install-exec-hook:
$(RM) $(DESTDIR)$(libdir)/*dynlib* $(RM) $(DESTDIR)$(dyndir)/*dynlib*
endif endif
# Temporary files. *.h5 are generated by h5diff. They should # Temporary files. *.h5 are generated by h5diff. They should

View File

@ -41,12 +41,15 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5)
if HAVE_SHARED_CONDITIONAL if HAVE_SHARED_CONDITIONAL
# Build it as shared library if configure is enabled for shared library. # Build it as shared library if configure is enabled for shared library.
lib_LTLIBRARIES=libdynlibdump.la dyn_LTLIBRARIES=libdynlibdump.la
libdynlibdump_la_SOURCES=dynlib_dump.c libdynlibdump_la_SOURCES=dynlib_dump.c
libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlibdump.la: $(libdynlibdump_la_OBJECTS) $(libdynlibdump_la_DEPENDENCIES) $(EXTRA_libdynlibdump_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlibdump_la_LINK) $(am_libdynlibdump_la_rpath) $(libdynlibdump_la_OBJECTS) $(libdynlibdump_la_LIBADD)
install-exec-hook: install-exec-hook:
$(RM) $(DESTDIR)$(libdir)/*dynlib* $(RM) $(DESTDIR)$(dyndir)/*dynlib*
endif endif
# Temporary files. *.h5 are generated by h5dumpgentest. They should # Temporary files. *.h5 are generated by h5dumpgentest. They should

View File

@ -38,13 +38,18 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5)
if HAVE_SHARED_CONDITIONAL if HAVE_SHARED_CONDITIONAL
# Build it as shared library if configure is enabled for shared library. # Build it as shared library if configure is enabled for shared library.
lib_LTLIBRARIES=libdynlibls.la dyn_LTLIBRARIES=libdynlibls.la
libdynlibls_la_SOURCES=dynlib_ls.c libdynlibls_la_SOURCES=dynlib_ls.c
libdynlibls_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlibls.la: $(libdynlibls_la_OBJECTS) $(libdynlibls_la_DEPENDENCIES) $(EXTRA_libdynlibls_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlibls_la_LINK) $(am_libdynlibls_la_rpath) $(libdynlibls_la_OBJECTS) $(libdynlibls_la_LIBADD)
install-exec-hook: install-exec-hook:
$(RM) $(DESTDIR)$(libdir)/*dynlib* $(RM) $(DESTDIR)$(dyndir)/*dynlib*
endif endif
DISTCLEANFILES=h5ls_plugin.sh DISTCLEANFILES=h5ls_plugin.sh
include $(top_srcdir)/config/conclude.am include $(top_srcdir)/config/conclude.am

View File

@ -47,16 +47,22 @@ h5repacktst_SOURCES=h5repacktst.c
if HAVE_SHARED_CONDITIONAL if HAVE_SHARED_CONDITIONAL
# Build it as shared library if configure is enabled for shared library. # Build it as shared library if configure is enabled for shared library.
lib_LTLIBRARIES=libdynlibadd.la libdynlibvers.la dyn_LTLIBRARIES=libdynlibadd.la libdynlibvers.la
libdynlibadd_la_SOURCES=dynlib_rpk.c libdynlibadd_la_SOURCES=dynlib_rpk.c
libdynlibvers_la_SOURCES=dynlib_vrpk.c libdynlibvers_la_SOURCES=dynlib_vrpk.c
libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlibadd.la: $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_DEPENDENCIES) $(EXTRA_libdynlibadd_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlibadd_la_LINK) $(am_libdynlibadd_la_rpath) $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_LIBADD)
libdynlibvers.la: $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_DEPENDENCIES) $(EXTRA_libdynlibvers_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlibvers_la_LINK) $(am_libdynlibvers_la_rpath) $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_LIBADD)
install-exec-hook: install-exec-hook:
$(RM) $(DESTDIR)$(libdir)/*dynlib* $(RM) $(DESTDIR)$(dyndir)/*dynlib*
endif endif
# Temporary files. *.h5 are generated by h5repack. They should # Temporary files. *.h5 are generated by h5repack. They should
# copied to the testfiles/ directory if update is required. # copied to the testfiles/ directory if update is required.
CHECK_CLEANFILES+=*.h5 *.bin testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5 CHECK_CLEANFILES+=*.h5 *.bin testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5