From 1cdad3104c24b38e75c67ad1fc4b64c157e9549c Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Tue, 4 May 2010 00:50:24 +0000 Subject: [PATCH] Fix "mock --with testagents" git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2798 fd59a12c-fef9-0310-b244-a6a79926bd2f --- 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 97bcb2ec..a05840a8 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 9a1b31b6..4d4c862a 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 2fde2af9..75b09387 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