X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2FMakefile.in;h=e700c51bdaa9d5bed85f3743347a27a188eeec97;hb=d63e46d29da2d3c7c526b358a9f760aa87a73c5b;hp=79751ec1e468ab307779821a6b508ff7a52031e4;hpb=562916939e401616127e80243dba5f27c0ba0bb3;p=openldap
diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in
index 79751ec1e4..e700c51bda 100644
--- a/servers/slapd/Makefile.in
+++ b/servers/slapd/Makefile.in
@@ -2,7 +2,7 @@
# $OpenLDAP$
## This work is part of OpenLDAP Software .
##
-## Copyright 1998-2005 The OpenLDAP Foundation.
+## Copyright 1998-2013 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
@@ -13,11 +13,10 @@
## top-level directory of the distribution or, alternatively, at
## .
-SLAPTOOLS=slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl
+SLAPTOOLS=slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl slapschema
PROGRAMS=slapd $(SLAPTOOLS)
XPROGRAMS=sslapd libbackends.a .backend liboverlays.a
XSRCS=version.c
-STRIP=-s
SUBDIRS=back-* shell-backends slapi overlays
@@ -30,39 +29,41 @@ SRCS = main.c globals.c bconfig.c config.c daemon.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 user.c \
- repl.c lock.c controls.c extended.c kerberos.c passwd.c \
+ lock.c controls.c extended.c passwd.c \
schema.c schema_check.c schema_init.c schema_prep.c \
schemaparse.c ad.c at.c mr.c syntax.c oc.c saslauthz.c \
oidm.c starttls.c index.c sets.c referral.c root_dse.c \
sasl.c module.c mra.c mods.c sl_malloc.c zn_malloc.c limits.c \
operational.c matchedValues.c cancel.c syncrepl.c \
- backover.c ctxcsn.c ldapsync.c frontend.c \
+ backglue.c backover.c ctxcsn.c ldapsync.c frontend.c \
slapadd.c slapcat.c slapcommon.c slapdn.c slapindex.c \
slappasswd.c slaptest.c slapauth.c slapacl.c component.c \
+ aci.c alock.c txn.c slapschema.c \
$(@PLAT@_SRCS)
OBJS = main.o globals.o bconfig.o config.o daemon.o \
connection.o search.o filter.o add.o cr.o \
- attr.o entry.o backend.o result.o operation.o \
+ attr.o entry.o backend.o backends.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 user.o \
- repl.o lock.o controls.o extended.o kerberos.o passwd.o \
+ lock.o controls.o extended.o passwd.o \
schema.o schema_check.o schema_init.o schema_prep.o \
schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o \
oidm.o starttls.o index.o sets.o referral.o root_dse.o \
sasl.o module.o mra.o mods.o sl_malloc.o zn_malloc.o limits.o \
operational.o matchedValues.o cancel.o syncrepl.o \
- backover.o ctxcsn.o ldapsync.o frontend.o \
+ backglue.o backover.o ctxcsn.o ldapsync.o frontend.o \
slapadd.o slapcat.o slapcommon.o slapdn.o slapindex.o \
slappasswd.o slaptest.o slapauth.o slapacl.o component.o \
+ aci.o alock.o txn.o slapschema.o \
$(@PLAT@_OBJS)
LDAP_INCDIR= ../../include -I$(srcdir) -I$(srcdir)/slapi -I.
LDAP_LIBDIR= ../../libraries
SLAP_DIR=
-SLAPD_STATIC_DEPENDS=@SLAPD_NO_STATIC@ libbackends.a
+SLAPD_STATIC_DEPENDS=@SLAPD_NO_STATIC@ libbackends.a liboverlays.a
SLAPD_STATIC_BACKENDS=@SLAPD_STATIC_BACKENDS@
SLAPD_DYNAMIC_BACKENDS=@SLAPD_DYNAMIC_BACKENDS@
@@ -71,9 +72,9 @@ SLAPI_LIBS=@LIBSLAPI@ @SLAPI_LIBS@
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
-XLIBS = $(SLAPD_STATIC_DEPENDS) liboverlays.a $(SLAPD_L)
+XLIBS = $(SLAPD_STATIC_DEPENDS) $(SLAPD_L) $(MODULES_LIBS)
XXLIBS = $(SLAPD_LIBS) $(SECURITY_LIBS) $(LUTIL_LIBS)
-XXXLIBS = $(LTHREAD_LIBS) $(SLAPI_LIBS) $(MODULES_LIBS)
+XXXLIBS = $(LTHREAD_LIBS) $(SLAPI_LIBS)
BUILD_OPT = "--enable-slapd"
BUILD_SRV = @BUILD_SLAPD@
@@ -81,12 +82,12 @@ BUILD_SRV = @BUILD_SLAPD@
all-local-srv: all-cffiles
NT_SLAPD_DEPENDS = slapd.exp
-NT_SLAPD_OBJECTS = slapd.exp symdummy.o $(OBJS) backends.o version.o
+NT_SLAPD_OBJECTS = slapd.exp symdummy.o $(OBJS) version.o
-UNIX_SLAPD_DEPENDS = $(SLAPD_STATIC_DEPENDS) backends.o version.o $(SLAPD_L)
-UNIX_SLAPD_OBJECTS = $(OBJS) backends.o version.o
+UNIX_SLAPD_DEPENDS = $(SLAPD_STATIC_DEPENDS) version.o $(SLAPD_L)
+UNIX_SLAPD_OBJECTS = $(OBJS) version.o
-SLAPD_DEPENDS = liboverlays.a $(@PLAT@_SLAPD_DEPENDS)
+SLAPD_DEPENDS = $(@PLAT@_SLAPD_DEPENDS)
SLAPD_OBJECTS = $(@PLAT@_SLAPD_OBJECTS)
# Notes about slapd for Windows
@@ -102,7 +103,7 @@ SLAPD_OBJECTS = $(@PLAT@_SLAPD_OBJECTS)
# we want to export EVERY global symbol that it knows about (NOT including
# symbols that are imported from other DLLs). The set of symbols to
# export INCLUDES symbols from all static libraries that slapd gets
-# linked with, e.g. avl, ldbm, lunicode, lutil, etc. This list
+# linked with, e.g. avl, lunicode, lutil, etc. This list
# will also include liblber and libldap_r if they were built as static
# libraries. ALSO included will be symbols from other STATIC libraries
# outside the domain of the OpenLDAP source tree, e.g. regex, ltdl,
@@ -137,7 +138,7 @@ SLAPD_OBJECTS = $(@PLAT@_SLAPD_OBJECTS)
# for functions, but it is required for variables.
#
# The symdummy.c file basically references EVERY symbol available to slapd.exe,
-# including symbols that slapd.exe never actually refereneced. The file
+# including symbols that slapd.exe never actually referenced. The file
# is compiled and included at link time. Without this object file, slapd.exe
# would NOT export symbols that it never referenced. The reason that these
# symbols must still be exported is because a dynamic module may want to
@@ -154,7 +155,7 @@ SLAPD_OBJECTS = $(@PLAT@_SLAPD_OBJECTS)
# on its own very long list of dependencies.
#
slapd.def: libbackends.a liboverlays.a version.o
- @for i in $(LDFLAGS) ; do \
+ @for i in XX $(LDFLAGS) ; do \
path=`expr "$$i" : "-L\(.*\)"`; \
if test $$? != 0; then continue; fi; \
paths="$$paths $$path"; \
@@ -166,8 +167,8 @@ slapd.def: libbackends.a liboverlays.a version.o
-l*) \
done="" ;\
base=`expr "$$i" : "-l\(.*\)"`; \
- for p in $$paths ; do \
- for ext in la dll a ; do \
+ for p in . $$paths ; do \
+ for ext in la dll dll.a a ; do \
path=$$p/lib$$base.$$ext; \
test ! -f $$path && continue; \
if test $$ext = la ; then \
@@ -190,6 +191,15 @@ slapd.def: libbackends.a liboverlays.a version.o
done; \
test -z "$$obj" && continue; \
;; \
+ *.la) \
+ if test -n "$(LTSTATIC)"; then \
+ base=`expr "$$i" : ".*/\(.*\).la"`; \
+ path=`expr "$$i" : "\(.*/\).*"`; \
+ obj=$$path.libs/$$base.a; \
+ fi; \
+ ;; \
+ *.dll.a) \
+ ;; \
*.o | *.a) \
obj=$$i; \
esac; \
@@ -249,12 +259,9 @@ slapd.exp: libslapd.a
dlltool --dllname slapd.exe --input-def slapd.def \
--base-file slapd.base --output-exp $@
-slapi/.libs/libslapi.a: FORCE
+slapi/libslapi.la: FORCE
(cd slapi; $(MAKE) $(MFLAGS) all)
-libslapi.a: slapi/.libs/libslapi.a
- cp slapi/.libs/libslapi.a .
-
slapd: $(SLAPD_DEPENDS) @LIBSLAPI@
$(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) \
$(WRAP_LIBS)
@@ -263,13 +270,16 @@ slapd: $(SLAPD_DEPENDS) @LIBSLAPI@
$(LN_S) slapd$(EXEEXT) $$i$(EXEEXT); done
-sslapd: version.o backends.o
- $(LTLINK) -static -o $@ $(OBJS) version.o backends.o $(LIBS) $(WRAP_LIBS)
+sslapd: version.o
+ $(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
dummy $(SLAPD_DYNAMIC_BACKENDS): slapd
cd $@; $(MAKE) $(MFLAGS) all
@touch $@
+dynamic_overlays: slapd
+ cd overlays; $(MAKE) $(MFLAGS) dynamic
+
#
# In Windows, dynamic backends have to be built after slapd. For this
# reason, we only build static backends now and dynamic backends later.
@@ -312,7 +322,7 @@ libbackends.a: .backend
@ls -l libbackends.a; echo ""
liboverlays.a: FORCE
- @cd overlays; $(MAKE) $(MFLAGS) all
+ cd overlays; $(MAKE) $(MFLAGS) static
version.c: Makefile
@-$(RM) $@
@@ -324,7 +334,7 @@ backends.o: backends.c $(srcdir)/slap.h
depend-local-srv: FORCE
@for i in $(SUBDIRS); do \
- if test -d $$i -a -f $$i/Makefile ; then \
+ if test -d $$i && test -f $$i/Makefile ; then \
echo; echo " cd $$i; $(MAKE) $(MFLAGS) depend"; \
( cd $$i; $(MAKE) $(MFLAGS) depend ); \
if test $$? != 0 ; then exit 1; fi ; \
@@ -340,7 +350,7 @@ veryclean-local:
clean-local-srv: FORCE
@for i in $(SUBDIRS); do \
- if test -d $$i -a -f $$i/Makefile ; then \
+ if test -d $$i && test -f $$i/Makefile ; then \
echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \
( cd $$i; $(MAKE) $(MFLAGS) clean ); \
if test $$? != 0 ; then exit 1; fi ; \
@@ -350,14 +360,20 @@ clean-local-srv: FORCE
veryclean-local-srv: FORCE
@for i in $(SUBDIRS); do \
- if test -d $$i -a -f $$i/Makefile ; then \
+ if test -d $$i && test -f $$i/Makefile ; then \
echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \
( cd $$i; $(MAKE) $(MFLAGS) veryclean ); \
fi; \
done
+install-dbc-maybe: install-dbc-@BUILD_BDB@ install-dbc-@BUILD_HDB@
+
+install-dbc-yes: install-db-config
+install-dbc-mod: install-db-config
+install-dbc-no:
+
install-local-srv: install-slapd install-tools \
- install-conf install-db-config install-schema install-tools
+ install-conf install-dbc-maybe install-schema install-tools
install-slapd: FORCE
-$(MKDIR) $(DESTDIR)$(libexecdir)
@@ -365,14 +381,14 @@ install-slapd: FORCE
$(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 \
slapd$(EXEEXT) $(DESTDIR)$(libexecdir)
@for i in $(SUBDIRS); do \
- if test -d $$i -a -f $$i/Makefile ; then \
+ if test -d $$i && test -f $$i/Makefile ; then \
echo; echo " cd $$i; $(MAKE) $(MFLAGS) install"; \
( cd $$i; $(MAKE) $(MFLAGS) install ); \
if test $$? != 0 ; then exit 1; fi ; \
fi; \
done
-all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS)
+all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS) dynamic_overlays
@if test $(PLAT) = NT; then \
sysconfdir=`cygpath -w $(sysconfdir) | \
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
@@ -389,26 +405,23 @@ all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS)
-e "s;%LOCALSTATEDIR%;$$localstatedir;" \
-e "s;%MODULEDIR%;$$moduledir;" \
$(srcdir)/slapd.conf > slapd.conf.tmp ; \
+ $(SED) -e "s;%SYSCONFDIR%;$$sysconfdir;" \
+ -e "s;%LOCALSTATEDIR%;$$localstatedir;" \
+ -e "s;%MODULEDIR%;$$moduledir;" \
+ $(srcdir)/slapd.ldif > slapd.ldif.tmp ; \
touch all-cffiles
install-schema: FORCE
- @-$(MKDIR) $(DESTDIR)$(schemadir)
- i="$(srcdir)/schema/README" ; \
- SF=`basename $$i` ; \
- SD="$(DESTDIR)$(schemadir)/$$SF" ; \
- echo $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD ; \
- $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD
- for i in $(srcdir)/schema/*.schema ; do \
- SF=`basename $$i` ; \
- SD="$(DESTDIR)$(schemadir)/$$SF" ; \
- if test ! -f $$SD ; then \
- echo "installing $$SF in $(schemadir)" ; \
- echo $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD ; \
- $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD ; \
- else \
- echo "PRESERVING EXISTING SCHEMA FILE $$SD" ; \
- fi ; \
- $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD.default ; \
+ @if test -d $(DESTDIR)$(schemadir) ; then \
+ echo "MOVING EXISTING SCHEMA DIR to $(DESTDIR)$(schemadir).$$$$" ; \
+ mv $(DESTDIR)$(schemadir) $(DESTDIR)$(schemadir).$$$$ ; \
+ fi
+ $(MKDIR) $(DESTDIR)$(schemadir)
+ @SD=$(DESTDIR)$(schemadir) ; \
+ files=`cd $(srcdir)/schema ; echo README *.ldif *.schema` ; \
+ for i in $$files ; do \
+ echo $(INSTALL) $(INSTALLFLAGS) -m 444 schema/$$i $$SD/$$i ; \
+ $(INSTALL) $(INSTALLFLAGS) -m 444 $(srcdir)/schema/$$i $$SD/$$i ; \
done
install-conf: FORCE
@@ -421,6 +434,14 @@ install-conf: FORCE
else \
echo "PRESERVING EXISTING CONFIGURATION FILE $(DESTDIR)$(sysconfdir)/slapd.conf" ; \
fi
+ $(INSTALL) $(INSTALLFLAGS) -m 600 slapd.ldif.tmp $(DESTDIR)$(sysconfdir)/slapd.ldif.default
+ if test ! -f $(DESTDIR)$(sysconfdir)/slapd.ldif; then \
+ echo "installing slapd.ldif in $(sysconfdir)"; \
+ echo "$(INSTALL) $(INSTALLFLAGS) -m 600 slapd.ldif.tmp $(DESTDIR)$(sysconfdir)/slapd.ldif"; \
+ $(INSTALL) $(INSTALLFLAGS) -m 600 slapd.ldif.tmp $(DESTDIR)$(sysconfdir)/slapd.ldif; \
+ else \
+ echo "PRESERVING EXISTING CONFIGURATION FILE $(DESTDIR)$(sysconfdir)/slapd.ldif" ; \
+ fi
install-db-config: FORCE
@-$(MKDIR) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir)