good for merge

On Sun, 2010-05-02 at 22:16 +1000, Angus Salkeld wrote:
> Efectively "make dist" with --enable-testagents
> 
> Signed-off-by: Angus Salkeld <[email protected]>
> ---
>  corosync.spec.in       |    4 ++++
>  cts/agents/Makefile.am |   10 ++++++++--
>  lib/Makefile.am        |    8 +++++---
>  3 files changed, 17 insertions(+), 5 deletions(-)
> 
> diff --git a/corosync.spec.in b/corosync.spec.in
> index 97bcb2e..a05840a 100644
> --- a/corosync.spec.in
> +++ b/corosync.spec.in
> @@ -135,6 +135,10 @@ This package contains corosync test agents.
>  %{_datadir}/corosync/tests/mem_leak_test.sh
>  %{_datadir}/corosync/tests/net_breaker.sh
>  %{_bindir}/cpg_test_agent
> +%{_bindir}/confdb_test_agent
> +%{_bindir}/sam_test_agent
> +%{_bindir}/votequorum_test_agent
> +%{_libexecdir}/lcrso/service_syncv2.lcrso
>  
>  %endif
>  
> diff --git a/cts/agents/Makefile.am b/cts/agents/Makefile.am
> index 9a1b31b..4d4c862 100644
> --- a/cts/agents/Makefile.am
> +++ b/cts/agents/Makefile.am
> @@ -30,11 +30,14 @@
>  # THE POSSIBILITY OF SUCH DAMAGE.
>  
>  MAINTAINERCLEANFILES = Makefile.in
> -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
> +INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
> +             -I$(top_builddir)/include/corosync
>  
>  SOURCES =
>  TEST_AGENTS = cpg_test_agent confdb_test_agent sam_test_agent 
> votequorum_test_agent
>  
> +EXTRA_DIST           = syncv2.c
> +
>  if INSTALL_TESTAGENTS
>  agentdir = $(datadir)/$(PACKAGE)/tests
>  bin_PROGRAMS = $(TEST_AGENTS)
> @@ -43,13 +46,13 @@ dist_agent_SCRIPTS = mem_leak_test.sh net_breaker.sh
>  AM_CFLAGS            = -fPIC
>  SERVICE_LCRSO                = syncv2
>  SOURCES                      += $(SERVICE_LCRSO:%=%.c)
> -EXTRA_DIST           = $(SOURCES)
>  LCRSO                        = $(SERVICE_LCRSO:%=service_%.lcrso)
>  LCRSO_OBJS           = $(SOURCES:%.c=%.o)
>  else
>  noinst_PROGRAMS = $(TEST_AGENTS)
>  noinst_SCRIPTS = mem_leak_test.sh net_breaker.sh
>  LCRSO =
> +LCRSO_OBJS =
>  endif
>  
>  noinst_HEADERS          = common_test_agent.h
> @@ -91,6 +94,9 @@ endif
>  
> 
>  if INSTALL_TESTAGENTS
> +syncv2.o: syncv2.c
> +     $(CC) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -c -o $@ $<
> +
>  all-local: $(LCRSO_OBJS) $(LCRSO)
>       @echo Built Service Engines
>  
> diff --git a/lib/Makefile.am b/lib/Makefile.am
> index 2fde2af..75b0938 100644
> --- a/lib/Makefile.am
> +++ b/lib/Makefile.am
> @@ -112,12 +112,14 @@ libcoroipcc.so.$(SONAME): coroipcc.o
>       ln -sf libcoroipcc.so.$(SONAME) libcoroipcc.so.$(SOMAJOR)
>  
>  lib%.so: lib%.a libcoroipcc.so.$(SONAME)
> +     if [ ! "$@" = "libcoroipcc.so" ] ; then \
>       $(CC) -shared -o $...@.$(call get_soname,$*) \
>               -Wl,-soname=lib$*.so.$(call get_major,$*) \
>               -Wl,-version-script=$(srcdir)/lib$*.versions \
> -             -Wl,-whole-archive $^ -Wl,-no-whole-archive $(LDFLAGS) 
> $(AM_LDFLAGS) $(call get_linker_add,$*)
> -     ln -sf lib$*.so.$(call get_soname,$*) lib$*.so
> -     ln -sf lib$*.so.$(call get_soname,$*) lib$*.so.$(call get_major,$*)
> +             -Wl,-whole-archive $^ -Wl,-no-whole-archive $(LDFLAGS) 
> $(AM_LDFLAGS) $(call get_linker_add,$*) ;\
> +     ln -sf lib$*.so.$(call get_soname,$*) lib$*.so ;\
> +     ln -sf lib$*.so.$(call get_soname,$*) lib$*.so.$(call get_major,$*) ;\
> +     fi
>  
>  endif
>  

_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to