-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Further simplify the plugin installation process. #2440
Changes from 1 commit
c99c38d
ba780fc
794ef61
c9ebf38
2e26ccf
fc9c027
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,31 +4,28 @@ | |
# Put Together AM_CPPFLAGS and AM_LDFLAGS | ||
include $(top_srcdir)/lib_flags.am | ||
|
||
AM_LDFLAGS += -module -avoid-version -shared -export-dynamic \ | ||
-rpath ${abs_builddir} ${NOUNDEFINED} | ||
|
||
# Create an alternate directory if not installing or for noinst installs. | ||
ALTPLUGINDIR = ${abs_top_builddir}/plugins/plugindir | ||
|
||
# This is where the plugins are to be installed | ||
if ENABLE_PLUGIN_DIR | ||
#if ENABLE_PLUGIN_DIR | ||
plugindir = @PLUGIN_INSTALL_DIR@ | ||
else | ||
plugindir = ${ALTPLUGINDIR} | ||
endif | ||
#else | ||
plugindir = ${prefix} | ||
#endif | ||
|
||
plugin_LTLIBRARIES = | ||
AM_LDFLAGS += -module -avoid-version -shared -export-dynamic ${NOUNDEFINED} | ||
|
||
# There seems no guaranteed way to turn of the version in the name | ||
#plugin_version_info = -no-version-info 0:0:0 | ||
|
||
# Apparently one cannot have plugin_LTLIBRARIES and also noinst_LTLIBRARIES. | ||
# So create a tmp location for "noinst" shared libraries. | ||
tmpdir = ${ALTPLUGINDIR} | ||
# Use this only with installable libraries | ||
# Not currently needed for the platforms we support. | ||
#INSTALLFLAGS = -rpath ${plugindir} ${plugin_version_info} | ||
|
||
tmp_LTLIBRARIES = | ||
# Use this only with test libraries | ||
# Note: it appears necessary to set rpath for the check libraries | ||
# so that they get generated | ||
TESTFLAGS = -rpath ${plugindir} | ||
|
||
# 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 | ||
plugin_LTLIBRARIES = | ||
check_LTLIBRARIES = | ||
|
||
if ISMINGW | ||
LDADD = ${top_builddir}/liblib/libnetcdf.la | ||
|
@@ -52,18 +49,19 @@ if ENABLE_FILTER_TESTING | |
if ENABLE_NCZARR_FILTERS | ||
plugin_LTLIBRARIES += lib__nch5fletcher32.la lib__nch5shuffle.la lib__nch5deflate.la | ||
lib__nch5shuffle_la_SOURCES = H5Zshuffle.c | ||
lib__nch5shuffle_la_LDFLAGS = ${INSTALLFLAGS} | ||
lib__nch5fletcher32_la_SOURCES = H5Zfletcher32.c H5checksum.c | ||
lib__nch5fletcher32_la_LDFLAGS = ${INSTALLFLAGS} | ||
lib__nch5deflate_la_SOURCES = H5Zdeflate.c | ||
lib__nch5deflate_la_LDFLAGS = ${INSTALLFLAGS} | ||
|
||
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 | ||
# Need our version of szip if libsz available and we are using nczarr | ||
if HAVE_SZ | ||
if ENABLE_NCZARR_FILTERS | ||
plugin_LTLIBRARIES += lib__nch5szip.la | ||
lib__nch5szip_la_SOURCES = H5Zszip.c H5Zszip.h | ||
lib__nch5szip_la_LDFLAGS = ${plugin_version_info} | ||
lib__nch5szip_la_LDFLAGS = ${INSTALLFLAGS} | ||
endif | ||
endif | ||
|
||
endif # ENABLE_NCZARR_FILTERS | ||
|
@@ -72,20 +70,21 @@ if ENABLE_PLUGINS | |
|
||
# The NCZarr codec libraries | ||
lib__nczstdfilters_la_SOURCES = NCZstdfilters.c | ||
lib__nczstdfilters_la_LDFLAGS = ${INSTALLFLAGS} | ||
lib__nczhdf5filters_la_SOURCES = NCZhdf5filters.c | ||
|
||
lib__nczhdf5filters_la_LDFLAGS = ${INSTALLFLAGS} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You seem to have commented out the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uncommented the Doesn't look like there's a "resolve" button like I've seen on some of these. |
||
plugin_LTLIBRARIES += lib__nczhdf5filters.la | ||
plugin_LTLIBRARIES += lib__nczstdfilters.la | ||
|
||
if HAVE_BLOSC | ||
lib__nch5blosc_la_SOURCES = H5Zblosc.c H5Zblosc.h | ||
lib__nch5blosc_la_LDFLAGS = ${plugin_version_info} | ||
lib__nch5blosc_la_LDFLAGS = ${INSTALLFLAGS} | ||
plugin_LTLIBRARIES += lib__nch5blosc.la | ||
endif | ||
|
||
if HAVE_ZSTD | ||
lib__nch5zstd_la_SOURCES = H5Zzstd.c H5Zzstd.h | ||
lib__nch5zstd_la_LDFLAGS = ${plugin_version_info} | ||
lib__nch5zstd_la_LDFLAGS = ${INSTALLFLAGS} | ||
plugin_LTLIBRARIES += lib__nch5zstd.la | ||
endif | ||
|
||
|
@@ -95,20 +94,20 @@ 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} | ||
lib__nch5noop_la_LDFLAGS = ${TESTFLAGS} | ||
lib__nch5noop1_la_LDFLAGS = ${TESTFLAGS} | ||
|
||
# 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__nch5misc_la_LDFLAGS = ${TESTFLAGS} | ||
lib__nczmisc_la_SOURCES = NCZmisc.c | ||
lib__nczmisc_la_LDFLAGS = ${plugin_version_info} | ||
lib__nczmisc_la_LDFLAGS = ${TESTFLAGS} | ||
|
||
# Provide a filter to test missing filter | ||
lib__nch5unknown_la_SOURCES = H5Zunknown.c | ||
lib__nch5unknown_la_LDFLAGS = ${plugin_version_info} | ||
lib__nch5unknown_la_LDFLAGS = ${TESTFLAGS} | ||
|
||
tmp_LTLIBRARIES += lib__nch5noop.la lib__nch5noop1.la lib__nch5misc.la lib__nczmisc.la lib__nch5unknown.la | ||
check_LTLIBRARIES += lib__nch5noop.la lib__nch5noop1.la lib__nch5misc.la lib__nczmisc.la lib__nch5unknown.la | ||
|
||
# Bzip2 is used to test more complex filters | ||
lib__nch5bzip2_la_SOURCES = H5Zbzip2.c h5bzip2.h | ||
|
@@ -117,7 +116,7 @@ EXTRA_DIST += ${BZIP2SRC} BZIP2_LICENSE | |
if HAVE_LOCAL_BZ2 | ||
lib__nch5bzip2_la_SOURCES += ${BZIP2SRC} | ||
endif | ||
lib__nch5bzip2_la_LDFLAGS = ${plugin_version_info} | ||
lib__nch5bzip2_la_LDFLAGS = ${INSTALLFLAGS} | ||
plugin_LTLIBRARIES += lib__nch5bzip2.la | ||
|
||
endif #ENABLE_FILTER_TESTING | ||
|
@@ -138,8 +137,3 @@ bzip2:: | |
tar -zxf ${BZIP2DIR}.tar.gz | ||
cd ${BZIP2DIR}; cp ${BZIP2SRC} ..; cp LICENSE ../BZIP2_LICENSE ; cd .. | ||
rm -fr ./${BZIP2DIR} | ||
|
||
# Custom clean | ||
clean-local: | ||
rm -fr ${ALTPLUGINDIR} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't seen anything tying
--enable-plugins
to--with-plugin-dir
; I think just specifying--enable-plugins
without--with-plugin-dir
will put the (non-test) plugins into${prefix}
(test run with the oldALTPLUGINDIR
value here). Would${libexecdir}/netcdf-c
or similar make more sense for the fallback location, would a better fallback be not installing those plugins at all (as implied by the old value), or is there some reasoning for this choice I'm not aware of?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New version is basically what I ended up with.