Start of slapd.

This commit is contained in:
Kurt Zeilenga 1998-09-17 19:38:07 +00:00
parent 1f7e1d057f
commit 954b17fbfc
4 changed files with 112 additions and 3 deletions

View File

@ -17,7 +17,7 @@ bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sysconfdir = @sysconfdir@/ldap
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@

View File

@ -348,7 +348,6 @@ dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
dnl contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
dnl contrib/whois++/Makefile:build/top.mk:contrib/whois++/Makefile.in:build/rules.mk \
dnl servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
dnl servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
dnl servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
dnl servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
dnl servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
@ -376,6 +375,7 @@ libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.
libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
tests/Makefile:build/top.mk:tests/Makefile.in \
Makefile:build/top.mk:Makefile.in:build/dir.mk \

109
servers/slapd/Makefile.in Normal file
View File

@ -0,0 +1,109 @@
##
## Makefile.in for slapd
##
PROGRAMS=slapd
XPROGRAMS=libbackends.a .backend
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 \
dn.c compare.c modify.c delete.c modrdn.c ch_malloc.c \
value.c ava.c bind.c unbind.c abandon.c filterentry.c \
phonetic.c acl.c str2filter.c aclparse.c init.c \
detach.c strdup.c tempnam.c repl.c lock.c \
schema.c schemaparse.c monitor.c configinfo.c
OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \
attr.o entry.o config.o backend.o result.o operation.o \
dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o \
value.o ava.o bind.o unbind.o abandon.o filterentry.o \
phonetic.o acl.o str2filter.o aclparse.o init.o \
detach.o strdup.o tempnam.o repl.o lock.o \
schema.o schemaparse.o monitor.o configinfo.o
BUILD_OPT = "--enable-slapd"
BUILD_SRV = @BUILD_SLAPD@
all-srv: FORCE
$(MAKE) $(MFLAGS) backendslib
$(MAKE) $(MFLAGS) slapd
(cd tools; $(MAKE) $(MFLAGS) all)
XDEFS = @SLURPD_DEFS@ @LTHREAD_DEFS@
XLIBS = @SLURPD_LIBS@ -lavl -llutil -llthread @LTHREAD_LIBS@
slapd: version.o
$(CC) $(LDFLGS) -o $@ $(OBJS) version.o $(LIBS)
backendslib: FORCE
@for i in back-*; do \
if [ -d $$i ]; then \
echo " "; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \
( cd $$i; $(MAKE) $(MFLAGS) all ); \
fi; \
done; \
echo " "; \
$(MAKE) $(MFLAGS) libbackends.a
libbackends.a: .backend
@$(RM) -r tmp
@$(MKDIR) tmp
@-for i in back-*/*.a; do \
( \
cd tmp; \
$(AR) x ../$$i; \
pre=`echo $$i | sed -e 's/\/.*$$//' -e 's/back-//'`; \
for j in *.o; do \
mv $$j $${pre}$$j; \
done; \
$(AR) ruv libbackends.a *.o 2>&1 | grep -v truncated; \
$(RM) *.o __.SYMDEF; \
echo "added backend library $$i"; \
); \
done
@mv -f tmp/libbackends.a ./libbackends.a
@$(RM) -r tmp
@if [ ! -z "$(RANLIB)" ]; then \
$(RANLIB) libbackends.a; \
fi
@ls -l libbackends.a
version.c: libbackends.a $(OBJS) \
$(LDAP_LIBDIR)/liblber.a \
$(LDAP_LIBDIR)/liblldbm.a \
$(LDAP_LIBDIR)/liblavl.a \
$(LDAP_LIBDIR)/liblldif.a \
$(LDAP_LIBDIR)/liblthread.a
$(RM) $@
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
< Version.c > $@)
clean: FORCE
@for i in back-* tools; do \
if [ -d $$i ] ; then \
echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \
( cd $$i; $(MAKE) $(MFLAGS) clean ); \
fi; \
done
install: install-slapd install-conf install-tools
install-slapd: FORCE
@-$(MKDIR) $(libexecdir)
$(INSTALL) $(INSTALLFLAGS) -m 755 slapd $(libexecdir)
install-conf: FORCE
@-$(MKDIR) -p $(sysconfdir)
$(SED) -e 's;%ETCDIR%;$(sysconfdir);' slapd.conf > /tmp/slapd.$$
-$(MV) $(sysconfdir)/slapd.conf $(sysconfdir)/slapd.conf-
$(INSTALL) $(INSTALLFLAGS) -m 644 /tmp/slapd.$$ $(sysconfdir)/slapd.conf
$(RM) -f /tmp/slapd.$$
-$(MV) $(sysconfdir)/slapd.at.conf $(sysconfdir)/slapd.at.conf-
$(INSTALL) $(INSTALLFLAGS) -m 644 slapd.at.conf $(sysconfdir)
-$(MV) $(sysconfdir)/slapd.oc.conf $(sysconfdir)/slapd.oc.conf-
$(INSTALL) $(INSTALLFLAGS) -m 644 slapd.oc.conf $(sysconfdir)
install-tools: FORCE
@-$(MKDIR) $(sbindir)
(cd tools; $(MAKE) $(MFLAGS) install)

View File

@ -5,7 +5,7 @@
#include <sys/types.h>
#include <sys/file.h>
#include <sys/socket.h>
#include <slap.h>
#include "slap.h"
extern pthread_mutex_t replog_mutex;
extern pthread_mutex_t entry2str_mutex;