Browse Source

- remove --enable-static option as it is not required. This was a
leftover from gcc-2.x something time. corosync binary should always be
built dynamic.

- fix quorum_* target as it was missing the list of objects to be linked
in.. doh!

- fix object dependencies between TARGET, TARGET_OBJS and TARGET_SRC.
This also fixes the build/relink issues at install times that have been
noted before.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1847 fd59a12c-fef9-0310-b244-a6a79926bd2f

Fabio M. Di Nitto 17 năm trước cách đây
mục cha
commit
3b6651b221
3 tập tin đã thay đổi với 8 bổ sung19 xóa
  1. 0 10
      configure.in
  2. 4 7
      exec/Makefile.am
  3. 4 2
      services/Makefile.am

+ 0 - 10
configure.in

@@ -174,10 +174,6 @@ AC_ARG_WITH(lcrso-dir,
     [  --with-lcrso-dir=DIR   Corosync lcrso files. ],
     [ LCRSODIR="$withval" ])
 
-AC_ARG_ENABLE(static, 
-    [  --enable-static   Dont produce dynamic libraries. ],
-    [ default="no" ])
-
 AC_ARG_ENABLE(coverage, 
     [  --enable-coverage   Coverage analysis of the codebase. ],
     [ default="no" ])
@@ -477,7 +473,6 @@ dnl Add any system specific options here.
 	   echo "Enabling Coverage"
 	   CFLAGS="$CFLAGS -O0 -g -ftest-coverage -fprofile-arcs"
 	   LDFLAGS="$LDFLAGS -g -ftest-coverage -fprofile-arcs"
-	   enable_static=yes
 	   PKG_FEATURES="$PKG_FEATURES coverage"
 	fi
 
@@ -517,11 +512,6 @@ CFLAGS_COPY="$CFLAGS"
 AC_SUBST(CFLAGS_COPY)
 
 AM_CONDITIONAL(BUILD_DARWIN, test $ON_DARWIN = 1)
-AM_CONDITIONAL(BUILD_DYNAMIC, test "x${enable_static}" != xyes)
-
-if test "x${enable_static}" != xyes; then
-   PKG_FEATURES="$PKG_FEATURES static"
-fi
 
 LINT_FLAGS="-weak -unrecog +posixlib +ignoresigns -fcnuse -badflag -D__gnuc_va_list=va_list -D__attribute\(x\)="
 AC_SUBST(LINT_FLAGS)

+ 4 - 7
exec/Makefile.am

@@ -35,11 +35,12 @@ AM_CFLAGS	= -fPIC
 INCLUDES       	= -I$(top_builddir)/include  -I$(top_srcdir)/include
 DARWIN_OPTS	= -dynamiclib -bind_at_load -current_version $(SONAME) -compatibility_version $(SONAME)
 
-LCRSO		= 
 LCR_SRC		= objdb.c vsf_ykd.c coroparse.c quorum.c vsf_quorum.c
 TOTEM_SRC	= coropoll.c totemip.c totemnet.c totemrrp.c totemsrp.c totemmrp.c totempg.c crypto.c wthread.c
 LOGSYS_SRC	= wthread.c logsys.c
 
+LCRSO		= $(LCR_SRC:%.c=%.lcrso)
+
 lib_LIBRARIES	= libtotem_pg.a liblogsys.a
 sbin_PROGRAMS	= corosync
 SHARED_LIBS	=
@@ -55,15 +56,11 @@ corosync_LDFLAGS = $(DYFLAGS) -L./
 
 TOTEM_OBJS	= $(TOTEM_SRC:%.c=%.o)
 LOGSYS_OBJS	= $(LOGSYS_SRC:%.c=%.o)
+LCRSO_OBJS	= $(LCR_SRC:%.c=%.o)
 
-if BUILD_DYNAMIC
 SHARED_LIBS	+= $(lib_LIBRARIES:%.a=%.so.$(SONAME))
 SHARED_LIBS_SO	= $(SHARED_LIBS:%.so.$(SONAME)=%.so)
 SHARED_LIBS_SO_TWO = $(SHARED_LIBS:%.so.$(SONAME)=%.so.$(SOMAJOR))
-LCRSO		+= $(LCR_SRC:%.c=%.lcrso)
-else
-corosync_SOURCES += $(LCR_SRC)
-endif
 
 if BUILD_DARWIN
 %.lcrso: %.o
@@ -94,7 +91,7 @@ endif
 lint:
 	-splint $(LINT_FLAGS) $(CFLAGS) *.c
 
-all-local: $(LCRSO) $(SHARED_LIBS)
+all-local: $(LCRSO_OBJS) $(LCRSO) $(SHARED_LIBS)
 	@echo Built corosync Executive
 
 install-exec-local:

+ 4 - 2
services/Makefile.am

@@ -35,6 +35,8 @@ AM_CFLAGS		= -fPIC
 INCLUDES       		= -I$(top_builddir)/include  -I$(top_srcdir)/include
 LCRSO			= service_evs.lcrso service_cfg.lcrso service_cpg.lcrso service_confdb.lcrso service_pload.lcrso quorum_votequorum.lcrso quorum_testquorum.lcrso
 
+LCRSO_OBJS = $(LCRSO:service_%.lcrso=%.o) $(LCRSO:quorum_%.lcrso=%.o)
+
 if BUILD_DARWIN
 quorum_%.lcrso: %.o
 	$(CC) $(CFLAGS) -bundle -bundle_loader ../exec/corosync $^ -o $@
@@ -42,7 +44,7 @@ quorum_%.lcrso: %.o
 service_%.lcrso: %.o
 	$(CC) $(CFLAGS) -bundle -bundle_loader ../exec/corosync $^ -o $@
 else
-quorum_%.lcrso:
+quorum_%.lcrso: %.o
 	$(CC) $(CFLAGS) -shared -Wl,-soname,$@ $^ -o $@
 
 service_%.lcrso: %.o
@@ -55,7 +57,7 @@ endif
 lint:
 	-splint $(LINT_FLAGS) $(CFLAGS) *.c
 
-all-local: $(LCRSO)
+all-local: $(LCRSO_OBJS) $(LCRSO)
 	@echo Built Service Engines
 
 install-exec-local: