]> git.sur5r.net Git - openldap/commitdiff
ITS#2065 omit libbackends.a when no static backends configured.
authorHoward Chu <hyc@openldap.org>
Wed, 4 Sep 2002 10:58:25 +0000 (10:58 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 4 Sep 2002 10:58:25 +0000 (10:58 +0000)
Also fixed dependencies for dynamic backends and tools.

configure.in
servers/slapd/Makefile.in
servers/slapd/tools/Makefile.in

index a7a96be190d366e7c4fb68839ed3861ea059ad5d..8ac2dda8d17f4eda250833614a09bf0a28f66575 100644 (file)
@@ -2764,6 +2764,12 @@ else
        PLAT=UNIX
 fi
 
+if test -z "$SLAPD_STATIC_BACKENDS"; then
+       SLAPD_NO_STATIC='#'
+else
+       SLAPD_NO_STATIC=
+fi
+
 AC_SUBST(LIBSRCS)
 AC_SUBST(PLAT)
 AC_SUBST(BUILD_LIBS_DYNAMIC)
@@ -2808,6 +2814,7 @@ AC_SUBST(MOD_TCL_LIB)
 AC_SUBST(SLAPD_MODULES_CPPFLAGS)
 AC_SUBST(SLAPD_MODULES_LDFLAGS)
 
+AC_SUBST(SLAPD_NO_STATIC)
 AC_SUBST(SLAPD_STATIC_BACKENDS)
 AC_SUBST(SLAPD_DYNAMIC_BACKENDS)
 
index 0cea35b4dc5d119ba7a5f8cd12776eb820186820..2176cdcc35807368a119ead166775ff9091fac83 100644 (file)
@@ -39,13 +39,14 @@ LDAP_INCDIR= ../../include
 LDAP_LIBDIR= ../../libraries
 
 SLAP_DIR=
+SLAPD_STATIC_DEPENDS=@SLAPD_NO_STATIC@ libbackends.a
 SLAPD_STATIC_BACKENDS=@SLAPD_STATIC_BACKENDS@
 SLAPD_DYNAMIC_BACKENDS=@SLAPD_DYNAMIC_BACKENDS@
 
 XDEFS = $(MODULES_CPPFLAGS)
 XLDFLAGS = $(MODULES_LDFLAGS)
 
-XLIBS = libbackends.a $(SLAPD_L)
+XLIBS = $(SLAPD_STATIC_DEPENDS) $(SLAPD_L)
 XXLIBS = $(LDBM_LIBS) $(SLAPD_LIBS) $(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)
 XXXLIBS = $(LTHREAD_LIBS) $(MODULES_LIBS)
 
@@ -57,7 +58,7 @@ all-local-srv: all-cffiles
 NT_SLAPD_DEPENDS = slapd.exp
 NT_SLAPD_OBJECTS = slapd.exp symdummy.o $(OBJS) version.o
 
-UNIX_SLAPD_DEPENDS = libbackends.a version.o $(SLAPD_L)
+UNIX_SLAPD_DEPENDS = $(SLAPD_STATIC_DEPENDS) version.o $(SLAPD_L)
 UNIX_SLAPD_OBJECTS = $(OBJS) version.o
 
 SLAPD_DEPENDS = $(@PLAT@_SLAPD_DEPENDS)
@@ -225,22 +226,14 @@ slapd.exp: libslapd.a
 
 slapd: $(SLAPD_DEPENDS)
        $(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) $(WRAP_LIBS)
-       @if test -n "$(SLAPD_DYNAMIC_BACKENDS)"; then \
-           echo "building dynamic backends..."; \
-           for i in XX $(SLAPD_DYNAMIC_BACKENDS); do \
-               if test $$i != XX; then \
-                   echo " "; echo "  cd $$i; $(MAKE) $(MFLAGS) all"; \
-                   ( cd $$i; $(MAKE) $(MFLAGS) all ); \
-                   if test $$? != 0; then exit 1; fi; \
-               fi; \
-           done; \
-           echo " "; \
-       fi
-       cd tools; $(MAKE) $(MFLAGS) all
 
 sslapd: version.o
        $(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
 
+tools $(SLAPD_DYNAMIC_BACKENDS): slapd
+       cd $@; $(MAKE) $(MFLAGS) all
+       @touch $@
+
 #
 # In Windows, dynamic backends have to be built after slapd. For this
 # reason, we only build static backends now and dynamic backends later.
@@ -332,7 +325,7 @@ install-slapd: FORCE
            fi; \
        done
 
-all-cffiles: slapd
+all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS) tools
        @if test $(PLAT) = NT; then \
            sysconfdir=`cygpath -w $(sysconfdir) | \
                $(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
index 98d17978e97cb4706655aa3c25cb349963bcc870..269b8d4908205309d03d0e2332ec9713a58ec034 100644 (file)
@@ -29,6 +29,8 @@ XXLIBS = $(SLAPD_LIBS) \
        $(LDIF_LIBS) $(LUTIL_LIBS)
 XXXLIBS = $(MODULES_LIBS) $(LTHREAD_LIBS)
 
+STATIC_DEPENDS=@SLAPD_NO_STATIC@ ../libbackends.a
+
 PROGRAMS=slapadd slapcat slapindex slappasswd
 
 SRCS = mimic.c slapcommon.c \
@@ -53,14 +55,14 @@ build-progs: $(PROGRAMS)
 #
 # SLAP Tools
 #
-slapadd:       slapadd.o ../libbackends.a $(SLAPOBJS) $(SLAPD_L) 
-       $(LTLINK) -o $@ slapadd.o $(SLAPOBJS) ../libbackends.a $(LIBS)
+slapadd:       slapadd.o $(STATIC_DEPENDS) $(SLAPOBJS) $(SLAPD_L) 
+       $(LTLINK) -o $@ slapadd.o $(SLAPOBJS) $(STATIC_DEPENDS) $(LIBS)
 
-slapcat:       slapcat.o ../libbackends.a $(SLAPOBJS) $(SLAPD_L) 
-       $(LTLINK) -o $@ slapcat.o $(SLAPOBJS) ../libbackends.a $(LIBS)
+slapcat:       slapcat.o $(STATIC_DEPENDS) $(SLAPOBJS) $(SLAPD_L) 
+       $(LTLINK) -o $@ slapcat.o $(SLAPOBJS) $(STATIC_DEPENDS) $(LIBS)
 
-slapindex:     slapindex.o ../libbackends.a $(SLAPOBJS) $(SLAPD_L) 
-       $(LTLINK) -o $@ slapindex.o $(SLAPOBJS) ../libbackends.a $(LIBS)
+slapindex:     slapindex.o $(STATIC_DEPENDS) $(SLAPOBJS) $(SLAPD_L) 
+       $(LTLINK) -o $@ slapindex.o $(SLAPOBJS) $(STATIC_DEPENDS) $(LIBS)
 
 slappasswd:            slappasswd.o $(SLAPD_L) 
        $(LTLINK) -o $@ slappasswd.o $(LIBS)