Skip to content

Commit

Permalink
Cleanup a number of things with plugins:
Browse files Browse the repository at this point in the history
- Drop unneeded rpath
- Drop unneeded so version-info
- Handle test plugins by removing them after install
  • Loading branch information
opoplawski committed Jun 26, 2022
1 parent 884610d commit 242888e
Showing 1 changed file with 6 additions and 26 deletions.
32 changes: 6 additions & 26 deletions plugins/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
include $(top_srcdir)/lib_flags.am

AM_LDFLAGS += -module -avoid-version -shared -export-dynamic \
-rpath ${abs_builddir} ${NOUNDEFINED}
${NOUNDEFINED}

# Create an alternate directory if not installing or for noinst installs.
ALTPLUGINDIR = ${abs_top_builddir}/plugins/plugindir
Expand All @@ -19,17 +19,6 @@ endif

plugin_LTLIBRARIES =

# Apparently one cannot have plugin_LTLIBRARIES and also noinst_LTLIBRARIES.
# So create a tmp location for "noinst" shared libraries.
tmpdir = ${ALTPLUGINDIR}

tmp_LTLIBRARIES =

# This linker flag specifies libtool version info.
# See http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
# for information regarding incrementing `-version-info`.
plugin_version_info = -version-info 0:0:0

if ISMINGW
LDADD = ${top_builddir}/liblib/libnetcdf.la
endif
Expand All @@ -55,15 +44,10 @@ lib__nch5shuffle_la_SOURCES = H5Zshuffle.c
lib__nch5fletcher32_la_SOURCES = H5Zfletcher32.c H5checksum.c
lib__nch5deflate_la_SOURCES = H5Zdeflate.c

lib__nch5shuffle_la_LDFLAGS = ${plugin_version_info}
lib__nch5deflate_la_LDFLAGS = ${plugin_version_info}
lib__nch5fletcher32_la_LDFLAGS = ${plugin_version_info}

# Need our version of szip if libsz available and we are not using HDF5
if HAVE_SZ
plugin_LTLIBRARIES += lib__nch5szip.la
lib__nch5szip_la_SOURCES = H5Zszip.c H5Zszip.h
lib__nch5szip_la_LDFLAGS = ${plugin_version_info}
endif

endif # ENABLE_NCZARR_FILTERS
Expand All @@ -79,13 +63,11 @@ plugin_LTLIBRARIES += lib__nczstdfilters.la

if HAVE_BLOSC
lib__nch5blosc_la_SOURCES = H5Zblosc.c H5Zblosc.h
lib__nch5blosc_la_LDFLAGS = ${plugin_version_info}
plugin_LTLIBRARIES += lib__nch5blosc.la
endif

if HAVE_ZSTD
lib__nch5zstd_la_SOURCES = H5Zzstd.c H5Zzstd.h
lib__nch5zstd_la_LDFLAGS = ${plugin_version_info}
plugin_LTLIBRARIES += lib__nch5zstd.la
endif

Expand All @@ -95,20 +77,19 @@ endif #ENABLE_PLUGINS
# Need two distinct instances
lib__nch5noop_la_SOURCES = H5Znoop.c H5Zutil.c h5noop.h
lib__nch5noop1_la_SOURCES = H5Znoop1.c H5Zutil.c h5noop.h
lib__nch5noop_la_LDFLAGS = ${plugin_version_info}
lib__nch5noop1_la_LDFLAGS = ${plugin_version_info}

# The misc filter is to allow testing of filter arguments
lib__nch5misc_la_SOURCES = H5Zmisc.c H5Zutil.c h5misc.h
lib__nch5misc_la_LDFLAGS = ${plugin_version_info}
lib__nczmisc_la_SOURCES = NCZmisc.c
lib__nczmisc_la_LDFLAGS = ${plugin_version_info}

# Provide a filter to test missing filter
lib__nch5unknown_la_SOURCES = H5Zunknown.c
lib__nch5unknown_la_LDFLAGS = ${plugin_version_info}

tmp_LTLIBRARIES += lib__nch5noop.la lib__nch5noop1.la lib__nch5misc.la lib__nczmisc.la lib__nch5unknown.la
CHECKLIBS = lib__nch5noop.la lib__nch5noop1.la lib__nch5misc.la lib__nczmisc.la lib__nch5unknown.la
plugin_LTLIBRARIES += ${CHECKLIBS}

install-data-hook:
cd $(DESTDIR)$(plugindir) && rm -f $(CHECKLIBS) $(CHECKLIBS:.la=.so)

# Bzip2 is used to test more complex filters
lib__nch5bzip2_la_SOURCES = H5Zbzip2.c h5bzip2.h
Expand All @@ -117,7 +98,6 @@ EXTRA_DIST += ${BZIP2SRC} BZIP2_LICENSE
if HAVE_LOCAL_BZ2
lib__nch5bzip2_la_SOURCES += ${BZIP2SRC}
endif
lib__nch5bzip2_la_LDFLAGS = ${plugin_version_info}
plugin_LTLIBRARIES += lib__nch5bzip2.la

endif #ENABLE_FILTER_TESTING
Expand Down

0 comments on commit 242888e

Please sign in to comment.