and setting of variables from Make-platform with defaults in Make-common.
#############################################################################
## LDAP install paths ##
#############################################################################
-#
# by default, everything is installed below INSTROOT
# config files, etc. are put in ETCDIR
# include files get put in INCLUDEDIR
# programs end-users will run are put in BINDIR
# programs sysadmins will run are put in SBINDIR
# servers are put in LIBEXECDIR
+# pid/args files are put in RUNDIR
#
-PREFIX?=/usr/local
-INSTROOT?=${PREFIX}
-ETCDIR?= $(INSTROOT)/etc/ldap
-INCLUDEDIR?= $(INSTROOT)/include
-LIBDIR?= $(INSTROOT)/lib
-MANDIR?= $(INSTROOT)/man
-BINDIR?= $(INSTROOT)/bin
-SBINDIR?=$(INSTROOT)/sbin
-LIBEXECDIR?=$(INSTROOT)/libexec
+# Per platform defaults override these.
#
-# if you want things to run in a different directory from where they
-# are installed, set this accordingly (this path gets compiled into a
-# few binaries). otherwise, leave it alone.
-RUNTIMEETCDIR?= $(ETCDIR)
+LDAP_PREFIX?= /usr/local
+LDAP_INSTROOT?= $(LDAP_PREFIX)
+LDAP_ETCDIR?= $(LDAP_INSTROOT)/etc/ldap
+LDAP_INCDIR?= $(LDAP_INSTROOT)/include
+LDAP_LIBDIR?= $(LDAP_INSTROOT)/lib
+LDAP_MANDIR?= $(LDAP_INSTROOT)/man
+LDAP_BINDIR?= $(LDAP_INSTROOT)/bin
+LDAP_SBINDIR?=$(LDAP_INSTROOT)/sbin
+LDAP_LIBEXECDIR?= $(LDAP_INSTROOT)/libexec
+LDAP_RUNDIR?= $(LDAP_ETCDIR)
#############################################################################
## General compiler options ##
#THREADS?=-DNO_THREADS
#THREADSLIB?=
-#
# Locations of auxilary programs
# (excepts to below are generally defined in Make-platform)
-SENDMAIL?=/usr/lib/sendmail
-EDITOR?=/usr/ucb/vi
-FINGER?=/usr/ucb/finger
+LDAP_SENDMAIL?=/usr/lib/sendmail
+LDAP_EDITOR?=/usr/ucb/vi
+LDAP_FINGER?=/usr/ucb/finger
+
+# For generation of compressed man pages
+# (excepts to below are generally defined in Make-platform)
+MANCOMPRESS?=cat
+MANCOMPRESSSUFFIX?=
#############################################################################
## The following options are used by the xax500 client. If you haven't ##
FINGER=/usr/bin/finger
SENDMAIL=/usr/sbin/sendmail
+RUNDIR=/var/run
+
+MANCOMPRESS=gzip
+MANCOMPRESSSUFFIX=.gz
+
+
#
# LDAP has a problem with the idea of implicit vs. explicit yields
# in call conversion threading packages, like the MIT pthreads
< Version.c > $@ )
install: rp500 xrpcomp fax500 FORCE
- -$(MKDIR) -p $(ETCDIR) $(BINDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 755 rp500 $(LIBEXECDIR)
- $(SED) -e 's%ETCDIR%$(LIBEXECDIR)%' xrpcomp > /tmp/xrpcomp.tmp
- $(INSTALL) $(INSTALLFLAGS) -m 755 /tmp/xrpcomp.tmp $(BINDIR)/xrpcomp
+ -$(MKDIR) -p $(LDAP_ETCDIR) $(LDAP_BINDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 755 rp500 $(LDAP_LIBEXECDIR)
+ $(SED) -e 's%ETCDIR%$(LDAP_LIBEXECDIR)%' xrpcomp > /tmp/xrpcomp.tmp
+ $(INSTALL) $(INSTALLFLAGS) -m 755 /tmp/xrpcomp.tmp $(LDAP_BINDIR)/xrpcomp
$(RM) /tmp/xrpcomp.tmp
- $(INSTALL) $(INSTALLFLAGS) -m 755 fax500 $(LIBEXECDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 755 fax500 $(LDAP_LIBEXECDIR)
lint: FORCE
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
< Version.c > $@)
install: in.xfingerd FORCE
- -$(MKDIR) -p $(ETCDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 755 in.xfingerd $(LIBEXECDIR)
+ -$(MKDIR) -p $(LDAP_LIBEXECDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 755 in.xfingerd $(LDAP_LIBEXECDIR)
lint: FORCE
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
< Versiongw.c > $@)
install: go500 go500gw go500gw.help FORCE
- -$(MKDIR) -p $(ETCDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 755 go500 $(LIBEXECDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 755 go500gw $(LIBEXECDIR)
- -$(MV) $(ETCDIR)/go500gw.help $(ETCDIR)/go500gw.help-
- $(INSTALL) $(INSTALLFLAGS) -m 644 go500gw.help $(ETCDIR)
+ -$(MKDIR) -p $(LDAP_ETCDIR) $(LDAP_LIBEXECDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 755 go500 $(LDAP_LIBEXECDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 755 go500gw $(LDAP_LIBEXECDIR)
+ -$(MV) $(LDAP_ETCDIR)/go500gw.help $(LDAP_ETCDIR)/go500gw.help-
+ $(INSTALL) $(INSTALLFLAGS) -m 644 go500gw.help $(LDAP_ETCDIR)
lint: FORCE
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
< Version.c > $@)
install: mail500 FORCE
- -$(MKDIR) -p $(ETCDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 755 mail500 $(LIBEXECDIR)
+ -$(MKDIR) -p $(LDAP_LIBEXECDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 755 mail500 $(LDAP_LIBEXECDIR)
lint: FORCE
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
< Version.c > $@)
install: rcpt500 rcpt500.help FORCE
- -$(MKDIR) -p $(ETCDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 755 rcpt500 $(LIBEXECDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 644 rcpt500.help $(ETCDIR)
+ -$(MKDIR) -p $(LDAP_ETCDIR) $(LDAP_LIBEXECDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 755 rcpt500 $(LDAP_LIBEXECDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 644 rcpt500.help $(LDAP_ETCDIR)
lint: FORCE
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
< Versionldr.c > $@)
install: ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd FORCE
- -$(MKDIR) -p $(BINDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 755 ldapsearch $(BINDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 755 ldapmodify $(BINDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 755 ldapdelete $(BINDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 755 ldapmodrdn $(BINDIR)
- $(RM) $(BINDIR)/ldapadd
- $(HARDLN) $(BINDIR)/ldapmodify $(BINDIR)/ldapadd
+ -$(MKDIR) -p $(LDAP_BINDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 755 ldapsearch $(LDAP_BINDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 755 ldapmodify $(LDAP_BINDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 755 ldapdelete $(LDAP_BINDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 755 ldapmodrdn $(LDAP_BINDIR)
+ $(RM) $(LDAP_BINDIR)/ldapadd
+ $(HARDLN) $(LDAP_BINDIR)/ldapmodify $(LDAP_BINDIR)/ldapadd
lint: FORCE
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
HDRS= ud.h
INCLUDES= -I$(HDIR) $(KRBINCLUDEFLAG)
-DEFINES= $(DEFS) -DDEBUG -DCONFIG_FILE=\"$(RUNTIMEETCDIR)/ud.conf\" \
- -DLDAP_FRIENDLY_MAP_FILE=\"$(RUNTIMEETCDIR)/ldapfriendly\"
+DEFINES= $(DEFS) -DDEBUG -DCONFIG_FILE=\"$(LDAP_ETCDIR)/ud.conf\" \
+ -DLDAP_FRIENDLY_MAP_FILE=\"$(LDAP_ETCDIR)/ldapfriendly\"
TERMLIB= -ltermcap
CFLAGS= ${INCLUDES} ${DEFINES} ${ACFLAGS}
< Version.c > $@)
install: ud FORCE
- -$(MKDIR) -p $(BINDIR)
- -mv -f ${BINDIR}/ud ${BINDIR}/ud-
- $(INSTALL) $(INSTALLFLAGS) -m 775 ud ${BINDIR}
+ -$(MKDIR) -p $(LDAP_BINDIR)
+ -mv -f $(LDAP_BINDIR)/ud $(LDAP_BINDIR)/ud-
+ $(INSTALL) $(INSTALLFLAGS) -m 775 ud $(LDAP_BINDIR)
depend: FORCE
$(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
unprotoize -c "$(CFLAGS)" $(SRCS)
install: saucer FORCE
- -$(MKDIR) -p $(BINDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 755 saucer $(BINDIR)
- -$(MKDIR) -p $(INSTMAN)
- @TMPMAN=/tmp/ldapman.$$$$; \
+ -$(MKDIR) -p $(LDAP_BINDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 755 saucer $(LDAP_BINDIR)
+ -$(MKDIR) -p $(LDAP_MANDIR)
+ @TMPMAN=/tmp/ldapman.$$$$$(MANCOMPRESSSUFFIX); \
VERSION=`$(CAT) $(VERFILE)`; \
for page in *.$(SECT); do \
- $(SED) -e 's%ETCDIR%$(ETCDIR)%' -e "s%LDVERSION%$$VERSION%" \
- $$page > $$TMPMAN; \
+ $(SED) -e 's%ETCDIR%$(LDAP_ETCDIR)%' -e "s%LDVERSION%$$VERSION%" \
+ $$page | $(MANCOMPRESS) > $$TMPMAN; \
echo "installing $(INSTMAN)/$$page"; \
- $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTMAN)/$$page; \
+ $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(LDAP_INSTMAN)/$$page$(MANCOMPRESSSUFFIX); \
done; \
$(RM) $$TMPMAN
LDAPSRC= ../../..
SECT=1
-INSTDIR=$(MANDIR)/man$(SECT)
+INSTDIR=$(LDAP_MANDIR)/man$(SECT)
VERSIONFILE = $(LDAPSRC)/build/version
all: FORCE
install: FORCE
-$(MKDIR) -p $(INSTDIR)
- @TMPMAN=/tmp/ldapman.$$$$; \
+ @TMPMAN=/tmp/ldapman.$$$$$(MANCOMPRESSSUFFIX); \
VERSION=`$(CAT) $(VERSIONFILE)`; \
for page in *.$(SECT); do \
$(SED) -e "s%LDVERSION%$$VERSION%" \
- -e 's%ETCDIR%$(RUNTIMEETCDIR)%' \
- -e 's%SBINDIR%$(SBINDIR)%' \
- -e 's%BINDIR%$(BINDIR)%' \
- -e 's%LIBEXECDIR%$(LIBEXECDIR)%' \
- $$page > $$TMPMAN; \
+ -e 's%ETCDIR%$(LDAP_ETCDIR)%' \
+ -e 's%SBINDIR%$(LDAP_SBINDIR)%' \
+ -e 's%BINDIR%$(LDAP_BINDIR)%' \
+ -e 's%LIBEXECDIR%$(LDAP_LIBEXECDIR)%' \
+ $$page | $(MANCOMPRESS) > $$TMPMAN; \
echo "installing $(INSTDIR)/$$page"; \
- $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page; \
+ $(RM) $(INSTDIR)/$$page $(INSTDIR)/$$page$(MANCOMPRESSSUFFIX); \
+ $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page$(MANCOMPRESSSUFFIX); \
if [ -f "$$page.links" ]; then \
for link in `$(CAT) $$page.links`; do \
echo "installing $(INSTDIR)/$$link as link to $$page"; \
- ln -sf $$page.gz $(INSTDIR)/$$link.gz; \
+ $(RM) $(INSTDIR)/$$link $(INSTDIR)/$$link$(MANCOMPRESSSUFFIX); \
+ ln -sf $$page$(MANCOMPRESSSUFFIX) $(INSTDIR)/$$link$(MANCOMPRESSSUFFIX); \
done; \
fi; \
done; \
LDAPSRC= ../../..
SECT=3
-INSTDIR=$(MANDIR)/man$(SECT)
+INSTDIR=$(LDAP_MANDIR)/man$(SECT)
VERSIONFILE = $(LDAPSRC)/build/version
all: FORCE
install: FORCE
-$(MKDIR) -p $(INSTDIR)
- @TMPMAN=/tmp/ldapman.$$$$; \
+ @TMPMAN=/tmp/ldapman.$$$$$(MANCOMPRESSSUFFIX); \
VERSION=`$(CAT) $(VERSIONFILE)`; \
for page in *.$(SECT); do \
$(SED) -e "s%LDVERSION%$$VERSION%" \
- -e 's%ETCDIR%$(RUNTIMEETCDIR)%' \
- -e 's%SBINDIR%$(SBINDIR)%' \
- -e 's%BINDIR%$(BINDIR)%' \
- -e 's%LIBEXECDIR%$(LIBEXECDIR)%' \
- $$page > $$TMPMAN; \
+ -e 's%ETCDIR%$(LDAP_ETCDIR)%' \
+ -e 's%SBINDIR%$(LDAP_SBINDIR)%' \
+ -e 's%BINDIR%$(LDAP_BINDIR)%' \
+ -e 's%LIBEXECDIR%$(LDAP_LIBEXECDIR)%' \
+ $$page | $(MANCOMPRESS) > $$TMPMAN; \
echo "installing $(INSTDIR)/$$page"; \
- $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page; \
+ $(RM) $(INSTDIR)/$$page $(INSTDIR)/$$page$(MANCOMPRESSSUFFIX); \
+ $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page$(MANCOMPRESSSUFFIX); \
if [ -f "$$page.links" ]; then \
for link in `$(CAT) $$page.links`; do \
echo "installing $(INSTDIR)/$$link as link to $$page"; \
- ln -sf $$page.gz $(INSTDIR)/$$link.gz; \
+ $(RM) $(INSTDIR)/$$link $(INSTDIR)/$$link$(MANCOMPRESSSUFFIX); \
+ ln -sf $$page$(MANCOMPRESSSUFFIX) $(INSTDIR)/$$link$(MANCOMPRESSSUFFIX); \
done; \
fi; \
done; \
LDAPSRC= ../../..
SECT=5
-INSTDIR=$(MANDIR)/man$(SECT)
+INSTDIR=$(LDAP_MANDIR)/man$(SECT)
VERSIONFILE = $(LDAPSRC)/build/version
all: FORCE
install: FORCE
-$(MKDIR) -p $(INSTDIR)
- @TMPMAN=/tmp/ldapman.$$$$; \
+ @TMPMAN=/tmp/ldapman.$$$$$(MANCOMPRESSSUFFIX); \
VERSION=`$(CAT) $(VERSIONFILE)`; \
for page in *.$(SECT); do \
$(SED) -e "s%LDVERSION%$$VERSION%" \
- -e 's%ETCDIR%$(RUNTIMEETCDIR)%' \
- -e 's%SBINDIR%$(SBINDIR)%' \
- -e 's%BINDIR%$(BINDIR)%' \
- -e 's%LIBEXECDIR%$(LIBEXECDIR)%' \
- $$page > $$TMPMAN; \
+ -e 's%ETCDIR%$(LDAP_ETCDIR)%' \
+ -e 's%SBINDIR%$(LDAP_SBINDIR)%' \
+ -e 's%BINDIR%$(LDAP_BINDIR)%' \
+ -e 's%LIBEXECDIR%$(LDAP_LIBEXECDIR)%' \
+ $$page | $(MANCOMPRESS) > $$TMPMAN; \
echo "installing $(INSTDIR)/$$page"; \
- $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page; \
+ $(RM) $(INSTDIR)/$$page $(INSTDIR)/$$page$(MANCOMPRESSSUFFIX); \
+ $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page$(MANCOMPRESSSUFFIX); \
if [ -f "$$page.links" ]; then \
for link in `$(CAT) $$page.links`; do \
echo "installing $(INSTDIR)/$$link as link to $$page"; \
- ln -sf $$page.gz $(INSTDIR)/$$link.gz; \
+ $(RM) $(INSTDIR)/$$link $(INSTDIR)/$$link$(MANCOMPRESSSUFFIX); \
+ ln -sf $$page$(MANCOMPRESSSUFFIX) $(INSTDIR)/$$link$(MANCOMPRESSSUFFIX); \
done; \
fi; \
done; \
LDAPSRC= ../../..
SECT=8
-INSTDIR=$(MANDIR)/man$(SECT)
+INSTDIR=$(LDAP_MANDIR)/man$(SECT)
VERSIONFILE = $(LDAPSRC)/build/version
all: FORCE
install: FORCE
-$(MKDIR) -p $(INSTDIR)
- @TMPMAN=/tmp/ldapman.$$$$; \
+ @TMPMAN=/tmp/ldapman.$$$$$(MANCOMPRESSSUFFIX); \
VERSION=`$(CAT) $(VERSIONFILE)`; \
for page in *.$(SECT); do \
$(SED) -e "s%LDVERSION%$$VERSION%" \
- -e 's%ETCDIR%$(RUNTIMEETCDIR)%' \
- -e 's%SBINDIR%$(SBINDIR)%' \
- -e 's%BINDIR%$(BINDIR)%' \
- -e 's%LIBEXECDIR%$(LIBEXECDIR)%' \
- $$page > $$TMPMAN; \
+ -e 's%ETCDIR%$(LDAP_ETCDIR)%' \
+ -e 's%SBINDIR%$(LDAP_SBINDIR)%' \
+ -e 's%BINDIR%$(LDAP_BINDIR)%' \
+ -e 's%LIBEXECDIR%$(LDAP_LIBEXECDIR)%' \
+ $$page | $(MANCOMPRESS) > $$TMPMAN; \
echo "installing $(INSTDIR)/$$page"; \
- $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page; \
+ $(RM) $(INSTDIR)/$$page $(INSTDIR)/$$page$(MANCOMPRESSSUFFIX) ; \
+ $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page$(MANCOMPRESSSUFFIX); \
if [ -f "$$page.links" ]; then \
for link in `$(CAT) $$page.links`; do \
echo "installing $(INSTDIR)/$$link as link to $$page"; \
- ln -sf $$page.gz $(INSTDIR)/$$link.gz; \
+ $(RM) $(INSTDIR)/$$link $(INSTDIR)/$$link$(MANCOMPRESSSUFFIX) ; \
+ ln -sf $$page$(MANCOMPRESSSUFFIX) $(INSTDIR)/$$link$(MANCOMPRESSSUFFIX); \
done; \
fi; \
done; \
.LP
.nf
.ft tt
- ETCDIR/slapd
+ LIBEXECDIR/slapd
.ft
.fi
.LP
echo " */ " >> $@; \
echo "" >> $@; \
$(SED) -e 's;%ETCDIR%;$(RUNTIMEETCDIR);' \
- -e 's;%SBINDIR%;$(SBINDIR);' \
- -e 's;%LIBEXECDIR%;$(LIBEXECDIR);' \
- -e 's;%EDITOR%;$(EDITOR);' \
- -e 's;%FINGER%;$(FINGER);' \
- -e 's;%SENDMAIL%;$(SENDMAIL);' \
+ -e 's;%SBINDIR%;$(LDAP_SBINDIR);' \
+ -e 's;%LIBEXECDIR%;$(LDAP_LIBEXECDIR);' \
+ -e 's;%RUNDIR%;$(LDAP_RUNDIR);' \
+ -e 's;%EDITOR%;$(LDAP_EDITOR);' \
+ -e 's;%FINGER%;$(LDAP_FINGER);' \
+ -e 's;%SENDMAIL%;$(LDAP_SENDMAIL);' \
ldapconfig.h.edit >> $@; \
$(CHMOD) 444 $@
install: all FORCE
-$(MKDIR) -p $(INCLUDEDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 644 ldap.h $(INCLUDEDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 644 lber.h $(INCLUDEDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 644 proto-lber.h $(INCLUDEDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 644 proto-ldap.h $(INCLUDEDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 644 disptmpl.h $(INCLUDEDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 644 srchpref.h $(INCLUDEDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 644 ldap.h $(LDAP_INCDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 644 lber.h $(LDAP_INCDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 644 proto-lber.h $(LDAP_INCDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 644 proto-ldap.h $(LDAP_INCDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 644 disptmpl.h $(LDAP_INCDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 644 srchpref.h $(LDAP_INCDIR)
depend: FORCE
/* default timelimit to spend on a search */
#define SLAPD_DEFAULT_TIMELIMIT 3600
/* location of the slapd pid file */
-#define SLAPD_PIDFILE "%ETCDIR%/slapd.pid"
+#define SLAPD_PIDFILE "%RUNDIR%/slapd.pid"
/* location of the slapd args file */
-#define SLAPD_ARGSFILE "%ETCDIR%/slapd.args"
+#define SLAPD_ARGSFILE "%RUNDIR%/slapd.args"
/* dn of the special "monitor" entry */
#define SLAPD_MONITOR_DN "cn=monitor"
/* dn of the special "config" entry */
#define _THREAD
#include <pthread.h>
+#include <sched.h>
#define pthread_mutexattr_default NULL
#define pthread_condattr_default NULL
< Version.c > $@)
install: liblber.a FORCE
- -$(MKDIR) -p $(LIBDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 644 liblber.a $(LIBDIR)
+ -$(MKDIR) -p $(LDAP_LIBDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 644 liblber.a $(LDAP_LIBDIR)
@if [ ! -z "$(RANLIB)" ]; then \
- (cd /tmp; $(RANLIB) $(LIBDIR)/liblber.a) \
+ (cd /tmp; $(RANLIB) $(LDAP_LIBDIR)/liblber.a) \
fi
lint: FORCE
HDIR = ../../include
INCLUDES= -I$(HDIR) $(KRBINCLUDEFLAG)
-DEFINES = $(DEFS) -DFILTERFILE="\"$(RUNTIMEETCDIR)/ldapfilter.conf\"" \
- -DTEMPLATEFILE="\"$(RUNTIMEETCDIR)/ldaptemplates.conf\""
+DEFINES = $(DEFS) -DFILTERFILE="\"$(LDAP_ETCDIR)/ldapfilter.conf\"" \
+ -DTEMPLATEFILE="\"$(LDAP_ETCDIR)/ldaptemplates.conf\""
CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS)
LIBS = -L. -L../liblber -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS)
< Version.c > $@)
install: libldap.a ldapfilter.conf ldapfriendly ldaptemplates.conf ldapsearchprefs.conf FORCE
- -$(MKDIR) -p $(LIBDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 644 libldap.a $(LIBDIR)
+ -$(MKDIR) -p $(LDAP_LIBDIR) $(LDAP_ETCDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 644 libldap.a $(LDAP_LIBDIR)
@if [ ! -z "$(RANLIB)" ]; then \
- (cd /tmp; $(RANLIB) $(LIBDIR)/libldap.a) \
+ (cd /tmp; $(RANLIB) $(LDAP_LIBDIR)/libldap.a) \
fi
- -$(MKDIR) -p $(ETCDIR)
- -$(MV) $(ETCDIR)/ldapfriendly $(ETCDIR)/ldapfriendly-
- $(INSTALL) $(INSTALLFLAGS) -m 644 ldapfriendly $(ETCDIR)
- -$(MV) $(ETCDIR)/ldapfilter.conf $(ETCDIR)/ldapfilter.conf-
- $(INSTALL) $(INSTALLFLAGS) -m 644 ldapfilter.conf $(ETCDIR)
- -$(MV) $(ETCDIR)/ldaptemplates.conf $(ETCDIR)/ldaptemplates.conf-
- $(INSTALL) $(INSTALLFLAGS) -m 644 ldaptemplates.conf $(ETCDIR)
- -$(MV) $(ETCDIR)/ldapsearchprefs.conf $(ETCDIR)/ldapsearchprefs.conf-
- $(INSTALL) $(INSTALLFLAGS) -m 644 ldapsearchprefs.conf $(ETCDIR)
+ -$(MKDIR) -p $(LDAP_ETCDIR)
+ -$(MV) $(LDAP_ETCDIR)/ldapfriendly $(LDAP_ETCDIR)/ldapfriendly-
+ $(INSTALL) $(INSTALLFLAGS) -m 644 ldapfriendly $(LDAP_ETCDIR)
+ -$(MV) $(LDAP_ETCDIR)/ldapfilter.conf $(LDAP_ETCDIR)/ldapfilter.conf-
+ $(INSTALL) $(INSTALLFLAGS) -m 644 ldapfilter.conf $(LDAP_ETCDIR)
+ -$(MV) $(LDAP_ETCDIR)/ldaptemplates.conf $(LDAP_ETCDIR)/ldaptemplates.conf-
+ $(INSTALL) $(INSTALLFLAGS) -m 644 ldaptemplates.conf $(LDAP_ETCDIR)
+ -$(MV) $(LDAP_ETCDIR)/ldapsearchprefs.conf $(LDAP_ETCDIR)/ldapsearchprefs.conf-
+ $(INSTALL) $(INSTALLFLAGS) -m 644 ldapsearchprefs.conf $(LDAP_ETCDIR)
lint: FORCE
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
#if defined ( POSIX_THREADS )
-void p_thread_yield( void )
+#include <sched.h>
+
+void pthread_yield( void )
{
sched_yield();
}
echo "uncomment the HAVEISODE=yes line in the Make-common file to build and install ldapd"; \
fi
-install-ldapd: $(LIBEXECDIR) $(LIBEXECDIR)/ldapd
+install-ldapd: $(LDAP_LIBEXECDIR) $(LDAP_LIBEXECDIR)/ldapd
-$(LIBEXECDIR)/ldapd: ldapd
- $(INSTALL) $(INSTALLFLAGS) -m 755 ldapd $(LIBEXECDIR)
+$(LDAP_LIBEXECDIR)/ldapd: ldapd
+ $(INSTALL) $(INSTALLFLAGS) -m 755 ldapd $(LDAP_LIBEXECDIR)
lint: FORCE
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
-e "s|%VERSION%|$${v}|" \
< Version.c > $@)
-install: all $(LIBEXECDIR) $(LIBEXECDIR)/slapd \
- $(ETCDIR) $(ETCDIR)/slapd.conf \
- $(ETCDIR)/slapd.at.conf $(ETCDIR)/slapd.oc.conf \
+install: all $(LDAP_LIBEXECDIR) $(LDAP_LIBEXECDIR)/slapd \
+ $(LDAP_ETCDIR) $(LDAP_ETCDIR)/slapd.conf \
+ $(LDAP_ETCDIR)/slapd.at.conf $(LDAP_ETCDIR)/slapd.oc.conf \
install-tools
-$(LIBEXECDIR)/slapd: slapd
- $(INSTALL) $(INSTALLFLAGS) -m 755 slapd $(LIBEXECDIR)
+$(LDAP_LIBEXECDIR)/slapd: slapd
+ $(INSTALL) $(INSTALLFLAGS) -m 755 slapd $(LDAP_LIBEXECDIR)
-$(ETCDIR)/slapd.conf: slapd.conf
- $(SED) -e 's;%ETCDIR%;$(RUNTIMEETCDIR);' slapd.conf > /tmp/slapd.$$
- -$(MV) $(ETCDIR)/slapd.conf $(ETCDIR)/slapd.conf-
- $(INSTALL) $(INSTALLFLAGS) -m 644 /tmp/slapd.$$ $(ETCDIR)/slapd.conf
+$(LDAP_ETCDIR)/slapd.conf: slapd.conf
+ $(SED) -e 's;%ETCDIR%;$(LDAP_ETCDIR);' slapd.conf > /tmp/slapd.$$
+ -$(MV) $(LDAP_ETCDIR)/slapd.conf $(LDAP_ETCDIR)/slapd.conf-
+ $(INSTALL) $(INSTALLFLAGS) -m 644 /tmp/slapd.$$ $(LDAP_ETCDIR)/slapd.conf
$(RM) -f /tmp/slapd.$$
-$(ETCDIR)/slapd.at.conf: slapd.at.conf
- -$(MV) $(ETCDIR)/slapd.at.conf $(ETCDIR)/slapd.at.conf-
- $(INSTALL) $(INSTALLFLAGS) -m 644 slapd.at.conf $(ETCDIR)
+$(LDAP_ETCDIR)/slapd.at.conf: slapd.at.conf
+ -$(MV) $(LDAP_ETCDIR)/slapd.at.conf $(LDAP_ETCDIR)/slapd.at.conf-
+ $(INSTALL) $(INSTALLFLAGS) -m 644 slapd.at.conf $(LDAP_ETCDIR)
-$(ETCDIR)/slapd.oc.conf: slapd.oc.conf
- -$(MV) $(ETCDIR)/slapd.oc.conf $(ETCDIR)/slapd.oc.conf-
- $(INSTALL) $(INSTALLFLAGS) -m 644 slapd.oc.conf $(ETCDIR)
+$(LDAP_ETCDIR)/slapd.oc.conf: slapd.oc.conf
+ -$(MV) $(LDAP_ETCDIR)/slapd.oc.conf $(LDAP_ETCDIR)/slapd.oc.conf-
+ $(INSTALL) $(INSTALLFLAGS) -m 644 slapd.oc.conf $(LDAP_ETCDIR)
install-tools: FORCE
(cd tools; $(MAKE) $(MFLAGS) install)
}
(void) SIGNAL( SIGPIPE, SIG_IGN );
-#ifdef SIGSTKFLT
+#ifdef linux
+ /*
+ * LinuxThreads are implemented using SIGUSR1/USR2,
+ * so we'll use SIGSTKFLT and SIGUNUSED
+ */
(void) SIGNAL( SIGSTKFLT, (void *) do_nothing );
-#else
- (void) SIGNAL( SIGUSR1, (void *) do_nothing );
-#endif
-#ifdef SIGUNUSED
(void) SIGNAL( SIGUNUSED, (void *) set_shutdown );
-#else
+#else /* !linux */
+ (void) SIGNAL( SIGUSR1, (void *) do_nothing );
(void) SIGNAL( SIGUSR2, (void *) set_shutdown );
-#endif
+#endif /* !linux */
(void) SIGNAL( SIGTERM, (void *) set_shutdown );
(void) SIGNAL( SIGINT, (void *) set_shutdown );
(void) SIGNAL( SIGHUP, (void *) set_shutdown );
{
Debug( LDAP_DEBUG_ANY, "slapd got shutdown signal\n", 0, 0, 0 );
slapd_shutdown = 1;
-#ifdef SIGSTKFLT
+#ifdef linux
+ /*
+ * LinuxThreads are implemented using SIGUSR1/USR2,
+ * so we'll use SIGSTKFLT and SIGUNUSED
+ */
pthread_kill( listener_tid, SIGSTKFLT );
-#else
- pthread_kill( listener_tid, SIGUSR1 );
-#endif
-#ifdef SIGUNUSED
(void) SIGNAL( SIGUNUSED, (void *) set_shutdown );
-#else
+#else /* !linux */
+ pthread_kill( listener_tid, SIGUSR1 );
(void) SIGNAL( SIGUSR2, (void *) set_shutdown );
-#endif
+#endif /* !linux */
(void) SIGNAL( SIGTERM, (void *) set_shutdown );
(void) SIGNAL( SIGINT, (void *) set_shutdown );
(void) SIGNAL( SIGHUP, (void *) set_shutdown );
do_nothing()
{
Debug( LDAP_DEBUG_TRACE, "slapd got do_nothing signal\n", 0, 0, 0 );
-#ifdef SIGSTKFLT
+#ifdef linux
+ /*
+ * LinuxThreads are implemented using SIGUSR1/USR2,
+ * so we'll use SIGSTKFLT and SIGUNUSED
+ */
(void) SIGNAL( SIGSTKFLT, (void *) do_nothing );
-#else
+#else /* !linux */
(void) SIGNAL( SIGUSR1, (void *) do_nothing );
-#endif
+#endif /* !linux */
}
pthread_mutex_lock( &active_threads_mutex );
active_threads--;
conn->c_writewaiter = 1;
-#ifdef SIGSTKFLT
+#ifdef linux
pthread_kill( listener_tid, SIGSTKFLT );
-#else
+#else /* !linux */
pthread_kill( listener_tid, SIGUSR1 );
-#endif
+#endif /* !linux */
pthread_cond_wait( &conn->c_wcv, &active_threads_mutex );
pthread_mutex_unlock( &active_threads_mutex );
../libbackends.a $(LDFLAGS) $(LIBS2)
ldif2ldbm.sed.c: ldif2ldbm.c
- $(SED) -e 's;%ETCDIR%;$(RUNTIMEETCDIR);' \
- -e 's;%SBINDIR%;$(SBINDIR);' \
+ $(SED) -e 's;%ETCDIR%;$(LDAP_ETCDIR);' \
+ -e 's;%SBINDIR%;$(LDAP_SBINDIR);' \
ldif2ldbm.c > ldif2ldbm.sed.c
ldif2id2entry: ldif2id2entry.o ../libbackends.a $(OBJS2)
$(CC) $(ALDFLAGS) -o ldbmtest ldbmtest.o $(OBJS2) \
../libbackends.a $(LDFLAGS) $(LIBS2)
-install: $(SBINDIR) $(SBINDIR)/edb2ldif $(SBINDIR)/ldif2ldbm \
- $(SBINDIR)/ldif2index $(SBINDIR)/ldif2id2entry \
- $(SBINDIR)/ldif2id2children $(SBINDIR)/ldbmcat \
- $(SBINDIR)/centipede $(SBINDIR)/ldbmtest \
- $(SBINDIR)/ldif
+install: $(LDAP_SBINDIR) $(LDAP_SBINDIR)/edb2ldif $(LDAP_SBINDIR)/ldif2ldbm \
+ $(LDAP_SBINDIR)/ldif2index $(LDAP_SBINDIR)/ldif2id2entry \
+ $(LDAP_SBINDIR)/ldif2id2children $(LDAP_SBINDIR)/ldbmcat \
+ $(LDAP_SBINDIR)/centipede $(LDAP_SBINDIR)/ldbmtest \
+ $(LDAP_SBINDIR)/ldif
-$(SBINDIR)/edb2ldif: build-edb2ldif
+$(LDAP_SBINDIR)/edb2ldif: build-edb2ldif
@if [ "$(HAVEISODE)" = "yes" ]; then \
- $(INSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(SBINDIR); \
+ $(INSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(LDAP_SBINDIR); \
else \
exit 0; \
fi
-$(SBINDIR)/chlog2replog: build-chlog2replog
+$(LDAP_SBINDIR)/chlog2replog: build-chlog2replog
@if [ "$(HAVEISODE)" = "yes" ]; then \
- $(INSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(SBINDIR); \
+ $(INSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(LDAP_SBINDIR); \
else \
exit 0; \
fi
-$(SBINDIR)/ldif2ldbm: ldif2ldbm
- $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(SBINDIR)
+$(LDAP_SBINDIR)/ldif2ldbm: ldif2ldbm
+ $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(LDAP_SBINDIR)
-$(SBINDIR)/ldif2index: ldif2index
- $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(SBINDIR)
+$(LDAP_SBINDIR)/ldif2index: ldif2index
+ $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(LDAP_SBINDIR)
-$(SBINDIR)/ldif2id2entry: ldif2id2entry
- $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(SBINDIR)
+$(LDAP_SBINDIR)/ldif2id2entry: ldif2id2entry
+ $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(LDAP_SBINDIR)
-$(SBINDIR)/ldif2id2children: ldif2id2children
- $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(SBINDIR)
+$(LDAP_SBINDIR)/ldif2id2children: ldif2id2children
+ $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(LDAP_SBINDIR)
-$(SBINDIR)/ldbmcat: ldbmcat
- $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(SBINDIR)
+$(LDAP_SBINDIR)/ldbmcat: ldbmcat
+ $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(LDAP_SBINDIR)
-$(SBINDIR)/ldif: ldif
- $(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(SBINDIR)
+$(LDAP_SBINDIR)/ldif: ldif
+ $(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(LDAP_SBINDIR)
-$(SBINDIR)/centipede: centipede
- $(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(SBINDIR)
+$(LDAP_SBINDIR)/centipede: centipede
+ $(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(LDAP_SBINDIR)
-$(SBINDIR)/ldbmtest: ldbmtest
- $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(SBINDIR)
+$(LDAP_SBINDIR)/ldbmtest: ldbmtest
+ $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(LDAP_SBINDIR)
lint: FORCE
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
-e "s|%VERSION%|$${v}|" \
< Version.c > $@)
-install: $(LIBEXECDIR) $(LIBEXECDIR)/slurpd
+install: $(LDAP_LIBEXECDIR) $(LDAP_LIBEXECDIR)/slurpd
-$(LIBEXECDIR)/slurpd: slurpd
- $(INSTALL) $(INSTALLFLAGS) -m 755 slurpd $(LIBEXECDIR)
+$(LDAP_LIBEXECDIR)/slurpd: slurpd
+ $(INSTALL) $(INSTALLFLAGS) -m 755 slurpd $(LDAP_LIBEXECDIR)
lint: FORCE
$(LINT) $(INCLUDES) $(DEFINES) $(SRCS)