done
install-common:
- -$(MKDIR) $(MANDIR)
+ -$(MKDIR) $(DESTDIR)$(MANDIR)
PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
for page in $$PAGES; do \
echo "installing $(MANDIR)/$$page"; \
- $(RM) $(MANDIR)/$$page; \
- $(INSTALL) $(INSTALLFLAGS) -m 644 $$page.$(TMP_SUFFIX) $(MANDIR)/$$page; \
+ $(RM) $(DESTDIR)$(MANDIR)/$$page; \
+ $(INSTALL) $(INSTALLFLAGS) -m 644 $$page.$(TMP_SUFFIX) $(DESTDIR)$(MANDIR)/$$page; \
if test -f "$(srcdir)/$$page.links" ; then \
for link in `$(CAT) $(srcdir)/$$page.links`; do \
echo "installing $(MANDIR)/$$link as link to $$page"; \
- $(RM) $(MANDIR)/$$link ; \
- $(LN_S) $$page $(MANDIR)/$$link; \
+ $(RM) $(DESTDIR)$(MANDIR)/$$link ; \
+ $(LN_S) $$page $(DESTDIR)$(MANDIR)/$$link; \
done; \
fi; \
done
all-yes: $(LIBSTAT) all-local-lib FORCE
install-mod: $(LIBRARY)
- @-$(MKDIR) $(moduledir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(moduledir)
+ @-$(MKDIR) $(DESTDIR)$(moduledir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(moduledir)
install-local-lib:
install-yes: install-local-lib FORCE
exec_prefix = @exec_prefix@
ldap_subdir = @ldap_subdir@
-bindir = $(TMPROOT)@bindir@
-datadir = $(TMPROOT)@datadir@$(ldap_subdir)
-includedir = $(TMPROOT)@includedir@
-infodir = $(TMPROOT)@infodir@
-libdir = $(TMPROOT)@libdir@
-libexecdir = $(TMPROOT)@libexecdir@
-localstatedir = $(TMPROOT)@localstatedir@
-mandir = $(TMPROOT)@mandir@
-moduledir = $(TMPROOT)@libexecdir@$(ldap_subdir)
-sbindir = $(TMPROOT)@sbindir@
-sharedstatedir = $(TMPROOT)@sharedstatedir@
-sysconfdir = $(TMPROOT)@sysconfdir@$(ldap_subdir)
+bindir = @bindir@
+datadir = @datadir@$(ldap_subdir)
+includedir = @includedir@
+infodir = @infodir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+moduledir = @libexecdir@$(ldap_subdir)
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@$(ldap_subdir)
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
$(SED) -e 's|%LIBEXECDIR%|$(libexecdir)|' $(srcdir)/xrpcomp > xrpcomp.tmp
install-local: $(PROGRAMS) FORCE
- -$(MKDIR) $(libexecdir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 rp500 $(libexecdir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 fax500 $(libexecdir)
- $(INSTALL) $(INSTALLFLAGS) -m 755 xrpcomp.tmp $(libexecdir)/xrpcomp
+ -$(MKDIR) $(DESTDIR)$(libexecdir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 rp500 $(DESTDIR)$(libexecdir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 fax500 $(DESTDIR)$(libexecdir)
+ $(INSTALL) $(INSTALLFLAGS) -m 755 xrpcomp.tmp $(DESTDIR)$(libexecdir)/xrpcomp
$(MKVERSION) in.xfingerd > $@
install-local: $(PROGRAMS) FORCE
- -$(MKDIR) $(libexecdir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 in.xfingerd $(libexecdir)
+ -$(MKDIR) $(DESTDIR)$(libexecdir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 in.xfingerd $(DESTDIR)$(libexecdir)
$(MKVERSION) go500gw > $@
install-local: $(PROGRAMS) go500gw.help FORCE
- -$(MKDIR) $(libexecdir) $(datadir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 go500 $(libexecdir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 go500gw $(libexecdir)
- -$(MV) $(datadir)/go500gw.help $(datadir)/go500gw.help-
- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/go500gw.help $(datadir)
+ -$(MKDIR) $(DESTDIR)$(libexecdir) $(DESTDIR)$(datadir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 go500 $(DESTDIR)$(libexecdir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 go500gw $(DESTDIR)$(libexecdir)
+ -$(MV) $(DESTDIR)$(datadir)/go500gw.help $(DESTDIR)$(datadir)/go500gw.help-
+ $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/go500gw.help $(DESTDIR)$(datadir)
$(MKVERSION) mail500 > $@
install-local: $(PROGRAMS) FORCE
- -$(MKDIR) $(libexecdir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 mail500 $(libexecdir)
+ -$(MKDIR) $(DESTDIR)$(libexecdir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 mail500 $(DESTDIR)$(libexecdir)
$(MKVERSION) rcpt500 > $@
install-local: $(PROGRAMS) rcpt500.help FORCE
- -$(MKDIR) $(libexecdir) $(datadir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 rcpt500 $(libexecdir)
- -$(MV) $(datadir)/rcpt500.help $(datadir)/rcpt500.help-
- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/rcpt500.help $(datadir)
+ -$(MKDIR) $(DESTDIR)$(libexecdir) $(DESTDIR)$(datadir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 rcpt500 $(DESTDIR)$(libexecdir)
+ -$(MV) $(DESTDIR)$(datadir)/rcpt500.help $(DESTDIR)$(datadir)/rcpt500.help-
+ $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/rcpt500.help $(DESTDIR)$(datadir)
$(MKVERSION) ldapmodrdn > $@
install-local: FORCE
- -$(MKDIR) $(bindir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldapsearch $(bindir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldapmodify $(bindir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldapdelete $(bindir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldapmodrdn $(bindir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldappasswd $(bindir)
- $(RM) $(bindir)/ldapadd$(EXEEXT)
- $(LN) $(bindir)/ldapmodify$(EXEEXT) $(bindir)/ldapadd$(EXEEXT)
+ -$(MKDIR) $(DESTDIR)$(bindir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldapsearch $(DESTDIR)$(bindir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldapmodify $(DESTDIR)$(bindir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldapdelete $(DESTDIR)$(bindir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldapmodrdn $(DESTDIR)$(bindir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldappasswd $(DESTDIR)$(bindir)
+ $(RM) $(DESTDIR)$(bindir)/ldapadd$(EXEEXT)
+ $(LN) ldapmodify$(EXEEXT) $(DESTDIR)$(bindir)/ldapadd$(EXEEXT)
$(MKVERSION) -s -c -n Version UserDirectory > $@
install-local: FORCE
- -$(MKDIR) $(bindir)
- -mv -f $(bindir)/ud $(bindir)/ud-
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ud $(bindir)
+ -$(MKDIR) $(DESTDIR)$(bindir)
+ -mv -f $(DESTDIR)$(bindir)/ud $(DESTDIR)$(bindir)/ud-
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ud $(DESTDIR)$(bindir)
# The following definition can be set to non-null for special systems
# like AFS with replication. It allows the pathnames used for installation
# to be different than those used for actually reference files at
-# run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
+# run-time. DESTDIR is prepended to $prefix and $exec_prefix
# when installing files.
-INSTALL_ROOT =
+DESTDIR =
# Directory in which to search for tcl libraries
NEO_LIBRARY = $(exec_prefix)/lib/ldaptcl$(VERSION)
# Directory in which to install the ldaptcl binary:
-BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
+BIN_INSTALL_DIR = $(DESTDIR)$(exec_prefix)/bin
# Directory in which to install the .a or .so binary for the Neo library:
-LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
+LIB_INSTALL_DIR = $(DESTDIR)$(exec_prefix)/lib
# Path to use at runtime to refer to LIB_INSTALL_DIR:
LIB_RUNTIME_DIR = $(exec_prefix)/lib
# Top-level directory for man entries:
-MANN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man/mann
+MANN_INSTALL_DIR = $(DESTDIR)$(prefix)/man/mann
# The symbols below provide support for dynamic loading and shared
$(LTLINK) -o $@ $(OBJS) $(LIBS)
install-local: $(PROGRAMS) FORCE
- -$(MKDIR) $(bindir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 saucer $(bindir)
- -test -d $(MANDIR) || $(MKDIR) $(mandir) $(MANDIR)
- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/saucer.1 $(MANDIR)/saucer.1
+ -$(MKDIR) $(DESTDIR)$(bindir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 saucer $(DESTDIR)$(bindir)
+ -$(MKDIR) $(DESTDIR)$(MANDIR)
+ $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/saucer.1 $(DESTDIR)$(MANDIR)/saucer.1
$(LTLINK) -o $@ $(OBJS) $(LIBS)
install-local: $(PROGRAMS) FORCE
- -test -d $(libexecdir) || $(MKDIR) $(libexecdir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 web_ldap $(libexecdir)
+ -$(MKDIR) $(DESTDIR)$(libexecdir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 web_ldap $(DESTDIR)$(libexecdir)
@echo ">> You must copy and edit web_ldap.cfg and web_ldap.html as needed. <<"
install: inst-whois++
-inst-whois++: $(ETCDIR)/whois++d
- -mkdir -p $(CONFIG_DIRECTORY)
- cp -r templates $(CONFIG_DIRECTORY)
- -mkdir -p $(HELP_DIRECTORY)
- cp -r helpfiles/* $(HELP_DIRECTORY)
- sed -e 's#ETCDIR#$(ETCDIR)#' whois++d.man > $(MANDIR)/man$(MANSEC)/whois++d.$(MANSEC)
+inst-whois++: $(DESTDIR)$(ETCDIR)/whois++d
+ -$(MKDIR) $(DESTDIR)$(CONFIG_DIRECTORY)
+ cp -r templates $(DESTDIR)$(CONFIG_DIRECTORY)
+ -$(MKDIR) $(DESTDIR)$(HELP_DIRECTORY)
+ cp -r helpfiles/* $(DESTDIR)$(HELP_DIRECTORY)
+ -$(MKDIR) $(DESTDIR)$(DESTDIR)$(MANDIR)/man$(MANSEC)
+ sed -e 's#ETCDIR#$(ETCDIR)#' whois++d.man > $(DESTDIR)$(MANDIR)/man$(MANSEC)/whois++d.$(MANSEC)
@echo "Don't forget to modify and install the tailor file"
-$(ETCDIR)/whois++d: whois++d
- install -c -m 755 whois++d $(ETCDIR)
+$(DESTDIR)$(ETCDIR)/whois++d: whois++d
+ install -c -m 755 whois++d $(DESTDIR)$(ETCDIR)
lint:;
lint $(SRCS)
all-local: ldap_config.h FORCE
install-local: FORCE
- -$(MKDIR) -p $(includedir)
- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/lber.h $(includedir)
- $(INSTALL) $(INSTALLFLAGS) -m 644 lber_types.h $(includedir)
- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/ldap.h $(includedir)
- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/ldap_cdefs.h $(includedir)
- $(INSTALL) $(INSTALLFLAGS) -m 644 ldap_features.h $(includedir)
- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/ldap_schema.h $(includedir)
- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/disptmpl.h $(includedir)
- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/srchpref.h $(includedir)
+ -$(MKDIR) $(DESTDIR)$(includedir)
+ for header in $(srcdir)/lber.h lber_types.h $(srcdir)/ldap.h \
+ $(srcdir)/ldap_cdefs.h ldap_features.h $(srcdir)/ldap_schema.h \
+ $(srcdir)/disptmpl.h $(srcdir)/srchpref.h; do \
+ $(INSTALL) $(INSTALLFLAGS) -m 644 $$header $(DESTDIR)$(includedir); \
+ done
clean-local: FORCE
$(RM) ldap_config.h
$(LTLINK) $(LDFLAGS) -o $@ idtest.o $(LIBS)
install-local: FORCE
- -$(MKDIR) $(libdir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(libdir)
+ -$(MKDIR) $(DESTDIR)$(libdir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
CFFILES=ldap.conf ldapfilter.conf ldaptemplates.conf ldapsearchprefs.conf
install-local: $(CFFILES) FORCE
- -$(MKDIR) $(libdir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(libdir)
- -$(MKDIR) $(sysconfdir)
+ -$(MKDIR) $(DESTDIR)$(libdir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
+ -$(MKDIR) $(DESTDIR)$(sysconfdir)
@for i in $(CFFILES); do \
- if test ! -f $(sysconfdir)/$$i; then \
+ if test ! -f $(DESTDIR)$(sysconfdir)/$$i; then \
echo "installing $$i in $(sysconfdir)"; \
- echo "$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(sysconfdir)/$$i"; \
- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(sysconfdir)/$$i; \
+ echo "$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(DESTDIR)$(sysconfdir)/$$i"; \
+ $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(DESTDIR)$(sysconfdir)/$$i; \
else \
echo "PRESERVING EXISTING CONFIGURATION FILE $(sysconfdir)/$$i" ; \
fi; \
- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(sysconfdir)/$$i.default; \
+ $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(DESTDIR)$(sysconfdir)/$$i.default; \
done
- -$(MKDIR) $(datadir)
- -$(MV) $(datadir)/ldapfriendly $(datadir)/ldapfriendly-
- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/ldapfriendly $(datadir)/ldapfriendly
+ -$(MKDIR) $(DESTDIR)$(datadir)
+ -$(MV) $(DESTDIR)$(datadir)/ldapfriendly $(DESTDIR)$(datadir)/ldapfriendly-
+ $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/ldapfriendly $(DESTDIR)$(datadir)/ldapfriendly
$(LTLINK) $(LDFLAGS) -o $@ tmpltest.o $(LIBS)
install-local: $(CFFILES) FORCE
- -$(MKDIR) $(libdir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(libdir)
+ -$(MKDIR) $(DESTDIR)$(libdir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
LDAP-types.h: LDAP_tables.c
install-local-srv: FORCE
- @-$(MKDIR) $(libexecdir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldapd $(libexecdir)
+ -$(MKDIR) $(DESTDIR)$(libexecdir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldapd $(DESTDIR)$(libexecdir)
install-local-srv: install-slapd install-conf install-tools
install-slapd: FORCE
- @-$(MKDIR) $(libexecdir)
- @-$(MKDIR) $(localstatedir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 slapd $(libexecdir)
+ -$(MKDIR) $(DESTDIR)$(libexecdir)
+ -$(MKDIR) $(DESTDIR)$(localstatedir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 slapd $(DESTDIR)$(libexecdir)
@if [ ! -z "$(SLAPD_MODULES)" ]; then \
for i in back-* shell-backends tools; do \
if [ -d $$i ]; then \
touch all-cffiles
install-conf: FORCE
- @-$(MKDIR) $(sysconfdir)
+ @-$(MKDIR) $(DESTDIR)$(sysconfdir)
@for i in $(CFFILES); do \
tmpcf=$$i.tmp ; \
if test $$i = slapd.conf ; then \
else \
mode=644 ; \
fi ; \
- if test ! -f $(sysconfdir)/$$i; then \
+ if test ! -f $(DESTDIR)$(sysconfdir)/$$i; then \
echo "installing $$i in $(sysconfdir)"; \
- echo "$(INSTALL) $(INSTALLFLAGS) -m $$mode $$tmpcf $(sysconfdir)/$$i"; \
- $(INSTALL) $(INSTALLFLAGS) -m $$mode $$tmpcf $(sysconfdir)/$$i; \
+ echo "$(INSTALL) $(INSTALLFLAGS) -m $$mode $$tmpcf $(DESTDIR)$(sysconfdir)/$$i"; \
+ $(INSTALL) $(INSTALLFLAGS) -m $$mode $$tmpcf $(DESTDIR)$(sysconfdir)/$$i; \
else \
- echo "PRESERVING EXISTING CONFIGURATION FILE $(sysconfdir)/$$i" ; \
+ echo "PRESERVING EXISTING CONFIGURATION FILE $(DESTDIR)$(sysconfdir)/$$i" ; \
fi; \
- $(INSTALL) $(INSTALLFLAGS) -m $$mode $$tmpcf $(sysconfdir)/$$i.default ; \
+ $(INSTALL) $(INSTALLFLAGS) -m $$mode $$tmpcf $(DESTDIR)$(sysconfdir)/$$i.default ; \
done
install-tools: FORCE
- @-$(MKDIR) $(sbindir)
+ @-$(MKDIR) $(DESTDIR)$(sbindir)
(cd tools; $(MAKE) $(MFLAGS) install)
install-ldbm-no install-bdb2-no install-quipu-no:
install-ldbm-yes install-ldbm-mod: FORCE
- @-$(MKDIR) $(sbindir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 slapadd $(sbindir) ; \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 slapcat $(sbindir) ; \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 slapindex $(sbindir) ; \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif $(sbindir) ; \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 centipede $(sbindir)
+ -$(MKDIR) $(DESTDIR)$(sbindir)
+ for bin in slapadd slapcat slapindex centipede ldif; do \
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 $$bin $(DESTDIR)$(sbindir); \
+ done
install-bdb2-yes install-bdb2-mod: FORCE
- @-$(MKDIR) $(sbindir)
+ @-$(MKDIR) $(DESTDIR)$(sbindir)
install-quipu-yes: FORCE
- @-$(MKDIR) $(sbindir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(sbindir); \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(sbindir)
+ @-$(MKDIR) $(DESTDIR)$(sbindir)
+ for bin in edb2ldif chlog2replog; do \
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 $$bin $(DESTDIR)$(sbindir); \
+ done
$(MKVERSION) slurpd > $@
install-local-srv: FORCE
- @-$(MKDIR) $(libexecdir)
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 slurpd $(libexecdir)
+ -$(MKDIR) $(DESTDIR)$(libexecdir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 slurpd $(DESTDIR)$(libexecdir)