]> git.sur5r.net Git - openldap/commitdiff
Start of slapd.
authorKurt Zeilenga <kurt@openldap.org>
Thu, 17 Sep 1998 19:38:07 +0000 (19:38 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 17 Sep 1998 19:38:07 +0000 (19:38 +0000)
build/top.mk
configure.in
servers/slapd/Makefile.in [new file with mode: 0644]
servers/slapd/repl.c

index 30b1c515adcc30c41aa655ab6ef77cba35c449ae..2a3845af5a182f7cbd6ebebab953a4847b0571af 100644 (file)
@@ -17,7 +17,7 @@ bindir = @bindir@
 sbindir = @sbindir@
 libexecdir = @libexecdir@
 datadir = @datadir@
-sysconfdir = @sysconfdir@
+sysconfdir = @sysconfdir@/ldap
 sharedstatedir = @sharedstatedir@
 localstatedir = @localstatedir@
 libdir = @libdir@
index c1095c19390fa6fbb92eebb11786ecd8cba6ed33..e17188132e08dfe87a0b1abf7ef74c55d7db0683 100644 (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 \
diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in
new file mode 100644 (file)
index 0000000..b288173
--- /dev/null
@@ -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)
+
index 028b1919620527b5bbaa26a9d4188e855028c9a5..0a3d7c46318d628e2cd77c1f2fde515b82306643 100644 (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;