From 8ca00d2154e54bd2ed35cef6eb979da7fdc7ab4f Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sun, 19 Jul 2015 14:44:16 -0700 Subject: [PATCH] build: moving ldflag libs to libadd to trigger rebuilds on library updates --- src/modules/api/Makefile.am | 7 ++++--- src/modules/barrier/Makefile.am | 8 +++++--- src/modules/kvs/Makefile.am | 4 ++-- src/modules/libjsc/Makefile.am | 8 ++++---- src/modules/libmrpc/Makefile.am | 8 ++++---- src/modules/live/Makefile.am | 10 ++++++---- src/modules/mecho/Makefile.am | 8 +++++--- 7 files changed, 30 insertions(+), 23 deletions(-) diff --git a/src/modules/api/Makefile.am b/src/modules/api/Makefile.am index 9b4f3b7b39f8..aa48cfbc4587 100644 --- a/src/modules/api/Makefile.am +++ b/src/modules/api/Makefile.am @@ -13,9 +13,10 @@ fluxmod_libadd = \ $(JSON_LIBS) $(ZMQ_LIBS) fluxmod_ldflags = --disable-static -avoid-version -module -shared -export-dynamic \ - -export-symbols-regex '^mod_(main|name)$$' \ - $(top_builddir)/src/common/libflux-core.la + -export-symbols-regex '^mod_(main|name)$$' api_la_SOURCES = api.c api_la_LDFLAGS = $(fluxmod_ldflags) -api_la_LIBADD = $(fluxmod_libadd) +api_la_LIBADD = $(fluxmod_libadd) \ + $(top_builddir)/src/common/libflux-internal.la \ + $(top_builddir)/src/common/libflux-core.la diff --git a/src/modules/barrier/Makefile.am b/src/modules/barrier/Makefile.am index cb7a42700647..91427bae7085 100644 --- a/src/modules/barrier/Makefile.am +++ b/src/modules/barrier/Makefile.am @@ -12,8 +12,9 @@ fluxmod_LTLIBRARIES = barrier.la fluxmod_libadd = \ $(JSON_LIBS) $(ZMQ_LIBS) -general_ldflags = --disable-static -avoid-version -shared -export-dynamic \ - $(top_builddir)/src/common/libflux-internal.la \ +general_ldflags = --disable-static -avoid-version -shared -export-dynamic + +general_libadd = $(top_builddir)/src/common/libflux-internal.la \ $(top_builddir)/src/common/libflux-core.la fluxmod_ldflags = -module -Wl,--no-undefined \ @@ -22,7 +23,7 @@ fluxmod_ldflags = -module -Wl,--no-undefined \ barrier_la_SOURCES = barrier.c barrier_la_LDFLAGS = $(fluxmod_ldflags) -barrier_la_LIBADD = $(fluxmod_libadd) +barrier_la_LIBADD = $(fluxmod_libadd) $(general_libadd) # # API for module @@ -31,3 +32,4 @@ fluxcoreinclude_HEADERS = barrier.h fluxlib_LTLIBRARIES = libbarrier.la libbarrier_la_SOURCES = libbarrier.c libbarrier_la_LDFLAGS = $(general_ldflags) +libbarrier_la_LIBADD = $(general_libadd) diff --git a/src/modules/kvs/Makefile.am b/src/modules/kvs/Makefile.am index e6970aec6473..6fb0caa6f32a 100644 --- a/src/modules/kvs/Makefile.am +++ b/src/modules/kvs/Makefile.am @@ -34,8 +34,8 @@ libkvs_la_SOURCES = \ libkvs.c \ conf.c \ proto.c -libkvs_la_LDFLAGS = -shared -export-dynamic --disable-static \ - $(top_builddir)/src/common/libflux-internal.la \ +libkvs_la_LDFLAGS = -shared -export-dynamic --disable-static +libkvs_la_LIBADD = $(top_builddir)/src/common/libflux-internal.la \ $(top_builddir)/src/common/libflux-core.la #-lrt is for clock_gettime, this should be abstracted diff --git a/src/modules/libjsc/Makefile.am b/src/modules/libjsc/Makefile.am index 89267663bb2f..7be03f2bd996 100644 --- a/src/modules/libjsc/Makefile.am +++ b/src/modules/libjsc/Makefile.am @@ -10,7 +10,7 @@ fluxcoreinclude_HEADERS = jstatctl.h libjsc_la_SOURCES = \ jstatctl.c \ jstatctl.h -libjsc_la_LDFLAGS = -shared -export-dynamic --disable-static \ - $(top_builddir)/src/modules/kvs/libkvs.la \ - $(top_builddir)/src/common/libflux-internal.la \ - $(top_builddir)/src/common/libflux-core.la +libjsc_la_LDFLAGS = -shared -export-dynamic --disable-static +libjsc_la_LIBADD = $(top_builddir)/src/modules/kvs/libkvs.la \ + $(top_builddir)/src/common/libflux-internal.la \ + $(top_builddir)/src/common/libflux-core.la diff --git a/src/modules/libmrpc/Makefile.am b/src/modules/libmrpc/Makefile.am index b588687d0b09..cf5e6d7cd9a0 100644 --- a/src/modules/libmrpc/Makefile.am +++ b/src/modules/libmrpc/Makefile.am @@ -11,9 +11,9 @@ fluxinclude_HEADERS = \ libmrpc_la_SOURCES = \ mrpc.c \ mrpc.h -libmrpc_la_LDFLAGS = -shared -export-dynamic \ - $(top_builddir)/src/common/libflux-internal.la \ +libmrpc_la_LIBADD = $(top_builddir)/src/common/libflux-internal.la \ $(top_builddir)/src/common/libflux-core.la \ - $(top_builddir)/src/modules/kvs/libkvs.la \ - $(LIBMUNGE) $(JSON_LIBS) $(ZMQ_CFLAGS) $(LIBPTHREAD) $(LIBUTIL) \ + $(top_builddir)/src/modules/kvs/libkvs.la +libmrpc_la_LDFLAGS = -shared -export-dynamic \ + $(LIBMUNGE) $(JSON_LIBS) $(LIBZMQ) $(LIBCZMQ) $(LIBPTHREAD) $(LIBUTIL) \ $(LIBDL) -lrt diff --git a/src/modules/live/Makefile.am b/src/modules/live/Makefile.am index 2fcdfae9e79d..80431c61db4b 100644 --- a/src/modules/live/Makefile.am +++ b/src/modules/live/Makefile.am @@ -12,10 +12,12 @@ fluxmod_LTLIBRARIES = live.la fluxmod_libadd = \ $(JSON_LIBS) $(ZMQ_LIBS) -general_ldflags = --disable-static -avoid-version -shared -export-dynamic \ +general_libadd = \ $(top_builddir)/src/common/libflux-internal.la \ $(top_builddir)/src/common/libflux-core.la \ - $(top_builddir)/src/modules/kvs/libkvs.la \ + $(top_builddir)/src/modules/kvs/libkvs.la + +general_ldflags = --disable-static -avoid-version -shared -export-dynamic \ $(LIBMUNGE) $(JSON_LIBS) $(ZMQ_LIBS) $(LIBPTHREAD) $(LIBUTIL) \ $(LIBDL) -lrt fluxmod_ldflags = -module \ @@ -24,7 +26,7 @@ fluxmod_ldflags = -module \ live_la_SOURCES = live.c live_la_LDFLAGS = $(fluxmod_ldflags) -live_la_LIBADD = $(fluxmod_libadd) +live_la_LIBADD = $(general_libadd) $(fluxmod_libadd) # # API for module @@ -32,4 +34,4 @@ live_la_LIBADD = $(fluxmod_libadd) fluxcoreinclude_HEADERS = live.h fluxlib_LTLIBRARIES = liblive.la liblive_la_SOURCES = liblive.c -liblive_la_LDFLAGS = $(general_ldflags) +liblive_la_LDFLAGS = $(general_libadd) $(general_ldflags) diff --git a/src/modules/mecho/Makefile.am b/src/modules/mecho/Makefile.am index bf594016e88c..14c5207b54ea 100644 --- a/src/modules/mecho/Makefile.am +++ b/src/modules/mecho/Makefile.am @@ -10,12 +10,14 @@ AM_CPPFLAGS = \ fluxmod_LTLIBRARIES = mecho.la fluxmod_libadd = \ - $(JSON_LIBS) $(ZMQ_LIBS) -general_ldflags = --disable-static -avoid-version -shared -export-dynamic \ + $(JSON_LIBS) $(ZMQ_LIBS) \ $(top_builddir)/src/modules/libmrpc/libmrpc.la \ $(top_builddir)/src/common/libflux-core.la \ - $(top_builddir)/src/modules/kvs/libkvs.la \ + $(top_builddir)/src/modules/kvs/libkvs.la + +general_ldflags = --disable-static -avoid-version -shared -export-dynamic \ $(LIBMUNGE) $(JSON_LIBS) $(ZMQ_LIBS) $(LIBPTHREAD) $(LIBUTIL) + fluxmod_ldflags = -module \ -export-symbols-regex '^mod_(main|name)$$' \ $(general_ldflags)