ITS#2065 omit libbackends.a when no static backends configured.

Also fixed dependencies for dynamic backends and tools.
This commit is contained in:
Howard Chu 2002-09-04 10:58:25 +00:00
parent af05dd5511
commit 62ceae250c
3 changed files with 23 additions and 21 deletions

View 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)

View 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'`; \

View 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)