From: Ben Collins Date: Wed, 22 Sep 1999 21:51:30 +0000 (+0000) Subject: * build/top.mk: removed references to TMPROOT and added DESTDIR support X-Git-Tag: UCDATA_2_4~399 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=53da7b6cda5429cdd7996f6407e2eb883d142f6c;p=openldap * build/top.mk: removed references to TMPROOT and added DESTDIR support * all others: Added DESTDIR support --- diff --git a/build/man.mk b/build/man.mk index 91a96065cb..5d7c644f45 100644 --- a/build/man.mk +++ b/build/man.mk @@ -26,17 +26,17 @@ all-common: 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 diff --git a/build/mod.mk b/build/mod.mk index 380e1dc78c..ce88c5ceec 100644 --- a/build/mod.mk +++ b/build/mod.mk @@ -46,8 +46,8 @@ all-local-lib: 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 diff --git a/build/top.mk b/build/top.mk index 550d52d8b5..519708a216 100644 --- a/build/top.mk +++ b/build/top.mk @@ -22,18 +22,18 @@ prefix = @prefix@ 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@ diff --git a/clients/fax500/Makefile.in b/clients/fax500/Makefile.in index 4520a63ef6..037ad897ba 100644 --- a/clients/fax500/Makefile.in +++ b/clients/fax500/Makefile.in @@ -32,7 +32,7 @@ xrpcomp.tmp: xrpcomp $(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 diff --git a/clients/finger/Makefile.in b/clients/finger/Makefile.in index 613bda9e40..2192c2b531 100644 --- a/clients/finger/Makefile.in +++ b/clients/finger/Makefile.in @@ -19,5 +19,5 @@ version.c: ${OBJS} ${LDAP_LIBDEPEND} $(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) diff --git a/clients/gopher/Makefile.in b/clients/gopher/Makefile.in index a9d5e4ee94..5022e50ba8 100644 --- a/clients/gopher/Makefile.in +++ b/clients/gopher/Makefile.in @@ -30,8 +30,8 @@ gwversion.c: ${GWOBJS} $(LDAP_LIBDEPEND) $(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) diff --git a/clients/mail500/Makefile.in b/clients/mail500/Makefile.in index 38b61fd404..4cfb4d7281 100644 --- a/clients/mail500/Makefile.in +++ b/clients/mail500/Makefile.in @@ -20,5 +20,5 @@ version.c: ${OBJS} $(LDAP_LIBDEPEND) $(MKVERSION) mail500 > $@ install-local: $(PROGRAMS) FORCE - -$(MKDIR) $(libexecdir) - $(LTINSTALL) $(INSTALLFLAGS) -m 755 mail500 $(libexecdir) + -$(MKDIR) $(DESTDIR)$(libexecdir) + $(LTINSTALL) $(INSTALLFLAGS) -m 755 mail500 $(DESTDIR)$(libexecdir) diff --git a/clients/rcpt500/Makefile.in b/clients/rcpt500/Makefile.in index 5af6536f91..d8809107de 100644 --- a/clients/rcpt500/Makefile.in +++ b/clients/rcpt500/Makefile.in @@ -20,7 +20,7 @@ version.c: ${OBJS} $(LDAP_LIBDEPEND) $(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) diff --git a/clients/tools/Makefile.in b/clients/tools/Makefile.in index 11acdd9cff..6012ce1677 100644 --- a/clients/tools/Makefile.in +++ b/clients/tools/Makefile.in @@ -55,11 +55,11 @@ ldrversion.c: ldapmodrdn.o $(LDAP_LIBDEPEND) $(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) diff --git a/clients/ud/Makefile.in b/clients/ud/Makefile.in index 54c16e29e1..8af1f5a2af 100644 --- a/clients/ud/Makefile.in +++ b/clients/ud/Makefile.in @@ -22,6 +22,6 @@ version.c: ${OBJS} $(LDAP_LIBDEPEND) $(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) diff --git a/contrib/ldaptcl/Makefile.in b/contrib/ldaptcl/Makefile.in index c195b1b392..04586ff58e 100644 --- a/contrib/ldaptcl/Makefile.in +++ b/contrib/ldaptcl/Makefile.in @@ -21,24 +21,24 @@ exec_prefix = @exec_prefix@ # 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 diff --git a/contrib/saucer/Makefile.in b/contrib/saucer/Makefile.in index 3d5479968b..ca810b5672 100644 --- a/contrib/saucer/Makefile.in +++ b/contrib/saucer/Makefile.in @@ -17,7 +17,7 @@ saucer: ${OBJS} $(LDAP_LIBDEPEND) $(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 diff --git a/contrib/web_ldap/Makefile.in b/contrib/web_ldap/Makefile.in index 0157d0f452..1b3d64f47d 100644 --- a/contrib/web_ldap/Makefile.in +++ b/contrib/web_ldap/Makefile.in @@ -13,6 +13,6 @@ web_ldap: ${OBJS} $(LDAP_LIBDEPEND) $(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. <<" diff --git a/contrib/whois++/Makefile b/contrib/whois++/Makefile index d5e5af0536..f7995036ea 100644 --- a/contrib/whois++/Makefile +++ b/contrib/whois++/Makefile @@ -60,16 +60,17 @@ whois++.o: whois++.c $(HDRS) 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) diff --git a/include/Makefile.in b/include/Makefile.in index a3342c6a58..1c89d0f71f 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -7,15 +7,12 @@ 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 diff --git a/libraries/liblber/Makefile.in b/libraries/liblber/Makefile.in index 4808224b22..33459b7a91 100644 --- a/libraries/liblber/Makefile.in +++ b/libraries/liblber/Makefile.in @@ -30,6 +30,6 @@ idtest: $(LIBRARY) idtest.o $(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) diff --git a/libraries/libldap/Makefile.in b/libraries/libldap/Makefile.in index 1ee85ec934..f4cf68cd87 100644 --- a/libraries/libldap/Makefile.in +++ b/libraries/libldap/Makefile.in @@ -44,20 +44,20 @@ ttest: $(LIBRARY) tmpltest.o $(LDAP_LIBLBER_DEPEND) 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 diff --git a/libraries/libldap_r/Makefile.in b/libraries/libldap_r/Makefile.in index fba054ecb0..47058146e9 100644 --- a/libraries/libldap_r/Makefile.in +++ b/libraries/libldap_r/Makefile.in @@ -61,5 +61,5 @@ ttest: $(LIBRARY) tmpltest.o $(LDAP_LIBLBER_DEPEND) $(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) diff --git a/servers/ldapd/Makefile.in b/servers/ldapd/Makefile.in index 57ff20adde..9e4723dfc0 100644 --- a/servers/ldapd/Makefile.in +++ b/servers/ldapd/Makefile.in @@ -48,5 +48,5 @@ LDAP_tables.c: ldap.py 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) diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index c589cf26c9..61eb507b3e 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -113,9 +113,9 @@ veryclean-local-srv: FORCE 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 \ @@ -138,7 +138,7 @@ all-cffiles: slapd 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 \ @@ -146,17 +146,17 @@ install-conf: FORCE 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) diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in index 5e6c8719ff..31fc81a247 100644 --- a/servers/slapd/tools/Makefile.in +++ b/servers/slapd/tools/Makefile.in @@ -142,17 +142,16 @@ install-local: install-ldbm-$(BUILD_LDBM) install-bdb2-$(BUILD_BDB2) \ 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 diff --git a/servers/slurpd/Makefile.in b/servers/slurpd/Makefile.in index 3b244dace5..8d5951637e 100644 --- a/servers/slurpd/Makefile.in +++ b/servers/slurpd/Makefile.in @@ -40,5 +40,5 @@ version.c: $(OBJS) $(LDAP_LIBDEPEND) $(LDAP_LIBTHREAD_DEPEND) $(MKVERSION) slurpd > $@ install-local-srv: FORCE - @-$(MKDIR) $(libexecdir) - $(LTINSTALL) $(INSTALLFLAGS) -m 755 slurpd $(libexecdir) + -$(MKDIR) $(DESTDIR)$(libexecdir) + $(LTINSTALL) $(INSTALLFLAGS) -m 755 slurpd $(DESTDIR)$(libexecdir)