## Makefile.in for slapd
##
PROGRAMS=slapd
-XPROGRAMS=sslapd libbackends.a
+XPROGRAMS=sslapd libbackends.a .backend
XSRCS=version.c
SRCS = main.c daemon.c connection.c search.c filter.c add.c charray.c \
attr.c entry.c config.c backend.c result.c operation.c \
BUILD_OPT = "--enable-slapd"
BUILD_SRV = @BUILD_SLAPD@
-all-local-srv: all-cffiles
+all-local-srv: backendslib all-cffiles
slapd: libbackends.a version.o
$(LTLINK) -o $@ $(OBJS) version.o $(LIBS)
sslapd: version.o
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS)
-# dummy equivalent of FORCE when wildcard fails
-back-*/libback*.a:
-
-libbackends.a: back-*/libback*.a
+backendslib: FORCE
@for i in back-*; do \
if [ -d $$i ]; then \
echo " "; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \
fi; \
done; \
echo " "
+
+.backend:
+
+libbackends.a: .backend
@$(RM) -r tmp
@$(MKDIR) tmp
@-for i in back-*/*.a; do \
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
+all-local-lib: ../.backend
+
+../.backend: lib$(LIBBASE).a
+ @touch $@
+
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
+all-local-lib: ../.backend
+
+../.backend: lib$(LIBBASE).a
+ @touch $@
+
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
+all-local-lib: ../.backend
+
+../.backend: lib$(LIBBASE).a
+ @touch $@
+
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
+all-local-lib: ../.backend
+
+../.backend: lib$(LIBBASE).a
+ @touch $@
+
XDEFS = $(PERL_CPPFLAGS) $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
+all-local-lib: ../.backend
+
+../.backend: lib$(LIBBASE).a
+ @touch $@
+
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
+all-local-lib: ../.backend
+
+../.backend: lib$(LIBBASE).a
+ @touch $@
+
XLDFLAGS = $(MODULES_LDFLAGS)
XINCPATH = -I.. -I$(srcdir)/..
+all-local-lib: ../.backend
+
+../.backend: lib$(LIBBASE).a
+ @touch $@
+