prepend DESTDIR to install locations
authorOliver Kiddle <okiddle@yahoo.co.uk>
Tue, 8 Nov 2005 16:58:08 +0000 (16:58 +0000)
committerOliver Kiddle <okiddle@yahoo.co.uk>
Tue, 8 Nov 2005 16:58:08 +0000 (16:58 +0000)
ChangeLog
etc/Makefile.in
man/Makefile.in
uip/Makefile.in

index 9eadf32..8ebd6b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-11-08  Oliver Kiddle  <okiddle@yahoo.co.uk>
 
+       * bug #10230: etc/Makefile.in, man/Makefile.in, uip/Makefile.in:
+       Michael De La Rue: prepend DESTDIR to install locations
+
        * configure.in, */Makefile.in, mts/smtp/smtp.c: replace obsolete
        autoconf macros
 
index 20ea6d5..8fb3ea2 100644 (file)
@@ -83,13 +83,13 @@ sendfiles: $(srcdir)/sendfiles.in Makefile
 install: install-bin-files install-etc-files
 
 install-bin-files:
-       $(top_srcdir)/mkinstalldirs $(bindir)
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
        for script in $(GENERATED_BIN_FILES); do \
-         $(INSTALL_PROGRAM) $$script $(bindir)/$$script; \
+         $(INSTALL_PROGRAM) $$script $(DESTDIR)$(bindir)/$$script; \
        done
 
 install-etc-files:
-       $(top_srcdir)/mkinstalldirs $(etcdir)
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(etcdir)
        INSTALL_FILES="$(GENERATED_ETC_FILES)"; \
        for file in $(STATIC_FILES); do \
          INSTALL_FILES="$$INSTALL_FILES $(srcdir)/$$file"; \
@@ -97,11 +97,11 @@ install-etc-files:
        for path in $$INSTALL_FILES; do \
          file=`basename $$path`; \
          echo "Installing $$file..."; \
-         if [ -f $(etcdir)/$$file ]; then \
-           mv $(etcdir)/$$file $(etcdir)/$$file.prev; \
-           $(INSTALL_DATA) $$path $(etcdir)/$$file; \
-           if diff $(etcdir)/$$file.prev $(etcdir)/$$file; then \
-             rm $(etcdir)/$$file.prev; \
+         if [ -f $(DESTDIR)$(etcdir)/$$file ]; then \
+           mv $(DESTDIR)$(etcdir)/$$file $(DESTDIR)$(etcdir)/$$file.prev; \
+           $(INSTALL_DATA) $$path $(DESTDIR)$(etcdir)/$$file; \
+           if diff $(DESTDIR)$(etcdir)/$$file.prev $(DESTDIR)$(etcdir)/$$file; then \
+             rm $(DESTDIR)$(etcdir)/$$file.prev; \
            else \
              echo; \
              echo "  Previous version of $$file saved as $$file.prev due\c";\
@@ -111,7 +111,7 @@ install-etc-files:
              echo; \
            fi; \
          else \
-           $(INSTALL_DATA) $$path $(etcdir)/$$file; \
+           $(INSTALL_DATA) $$path $(DESTDIR)$(etcdir)/$$file; \
          fi; \
        done
 
@@ -119,12 +119,12 @@ uninstall: uninstall-bin-files uninstall-etc-files
 
 uninstall-bin-files:
        for script in $(GENERATED_BIN_FILES); do \
-         rm -f $(bindir)/$$script; \
+         rm -f $(DESTDIR)$(bindir)/$$script; \
        done
 
 uninstall-etc-files:
        for file in $(STATIC_FILES) $(GENERATED_ETC_FILES); do \
-         rm -f $(etcdir)/$$file; \
+         rm -f $(DESTDIR)$(etcdir)/$$file; \
        done
 
 # ========== DEPENDENCIES FOR CLEANUP ==========
index ad2b458..1730ae9 100644 (file)
@@ -130,27 +130,27 @@ install: install-man1 install-man5 install-man8
 
 # install the man pages in man1
 install-man1:
-       $(top_srcdir)/mkinstalldirs $(mandir)/man$(manext1)
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext1)
        for file in $(MAN1); do \
-         $(INSTALL_DATA) $$file $(mandir)/man$(manext1) ; \
+         $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man$(manext1) ; \
        done
 
 # install the man pages in man5
 install-man5:
-       $(top_srcdir)/mkinstalldirs $(mandir)/man$(manext5)
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext5)
        for file in $(MAN5); do \
-         $(INSTALL_DATA) $$file $(mandir)/man$(manext5) ; \
+         $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man$(manext5) ; \
        done
-       if [ ! -f $(mandir)/man$(manext5)/mh_profile.$(manext5) ] ; then \
-         ( cd $(mandir)/man$(manext5) ; ln mh-profile.$(manext5) \
+       if [ ! -f $(DESTDIR)$(mandir)/man$(manext5)/mh_profile.$(manext5) ] ; then \
+         ( cd $(DESTDIR)$(mandir)/man$(manext5) ; ln mh-profile.$(manext5) \
             mh_profile.$(manext5) ) \
        fi
 
 # install the man pages in man8
 install-man8:
-       $(top_srcdir)/mkinstalldirs $(mandir)/man$(manext8)
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext8)
        for file in $(MAN8); do \
-         $(INSTALL_DATA) $$file $(mandir)/man$(manext8) ; \
+         $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man$(manext8) ; \
        done
 
 # ========= UNINSTALL TARGETS =========
@@ -160,19 +160,19 @@ uninstall: uninstall-man1 uninstall-man5 uninstall-man8
 # uninstall the man pages in man1
 uninstall-man1:
        for file in $(MAN1); do \
-         rm -f $(mandir)/man$(manext1)/$$file; \
+         rm -f $(DESTDIR)$(mandir)/man$(manext1)/$$file; \
        done
 
 # uninstall the man pages in man5
 uninstall-man5:
        for file in $(MAN5); do \
-         rm -f $(mandir)/man$(manext5)/$$file; \
+         rm -f $(DESTDIR)$(mandir)/man$(manext5)/$$file; \
        done
 
 # uninstall the man pages in man8
 uninstall-man8:
        for file in $(MAN8); do \
-         rm -f $(mandir)/man$(manext8)/$$file; \
+         rm -f $(DESTDIR)$(mandir)/man$(manext8)/$$file; \
        done
 
 # ========== DEPENDENCIES FOR CLEANUP ==========
index a711a92..36bcb3d 100644 (file)
@@ -255,51 +255,51 @@ install: install-cmds install-misc install-lcmds install-scmds
 
 # install commands
 install-cmds:
-       $(top_srcdir)/mkinstalldirs $(bindir)
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
        for cmd in $(CMDS); do \
-         $(INSTALL_PROGRAM) $$cmd $(bindir)/$$cmd; \
+         $(INSTALL_PROGRAM) $$cmd $(DESTDIR)$(bindir)/$$cmd; \
        done
 
 # install links
 install-lcmds:
-       rm -f $(bindir)/flists
-       rm -f $(bindir)/folders
-       rm -f $(bindir)/prev
-       rm -f $(bindir)/next
-       rm -f $(libdir)/install-mh
-       $(LN) $(bindir)/flist  $(bindir)/flists
-       $(LN) $(bindir)/folder $(bindir)/folders
-       $(LN) $(bindir)/show   $(bindir)/prev
-       $(LN) $(bindir)/show   $(bindir)/next
-       $(LN) $(bindir)/install-mh   $(libdir)/install-mh
+       rm -f $(DESTDIR)$(bindir)/flists
+       rm -f $(DESTDIR)$(bindir)/folders
+       rm -f $(DESTDIR)$(bindir)/prev
+       rm -f $(DESTDIR)$(bindir)/next
+       rm -f $(DESTDIR)$(libdir)/install-mh
+       $(LN) $(DESTDIR)$(bindir)/flist  $(DESTDIR)$(bindir)/flists
+       $(LN) $(DESTDIR)$(bindir)/folder $(DESTDIR)$(bindir)/folders
+       $(LN) $(DESTDIR)$(bindir)/show   $(DESTDIR)$(bindir)/prev
+       $(LN) $(DESTDIR)$(bindir)/show   $(DESTDIR)$(bindir)/next
+       $(LN) $(DESTDIR)$(bindir)/install-mh   $(DESTDIR)$(libdir)/install-mh
 
 # install misc support binaries
 install-misc:
-       $(top_srcdir)/mkinstalldirs $(libdir)
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
        for misc in $(MISC); do \
-         $(INSTALL_PROGRAM) $$misc $(libdir)/$$misc; \
+         $(INSTALL_PROGRAM) $$misc $(DESTDIR)$(libdir)/$$misc; \
        done
 
 # install commands with special installation needs (thus no $(SCMDS) use here)
 install-scmds:
        if test x$(SETGID_MAIL) != x; then \
-         $(INSTALL_PROGRAM) -g $(MAIL_SPOOL_GRP) -m 2755 inc $(bindir)/$$cmd; \
+         $(INSTALL_PROGRAM) -g $(MAIL_SPOOL_GRP) -m 2755 inc $(DESTDIR)$(bindir)/$$cmd; \
        else \
-         $(INSTALL_PROGRAM)                 inc $(bindir)/$$cmd; \
+         $(INSTALL_PROGRAM)                 inc $(DESTDIR)$(bindir)/$$cmd; \
        fi
 
 uninstall:
        for cmd in $(CMDS); do \
-         rm -f $(bindir)/$$cmd; \
+         rm -f $(DESTDIR)$(bindir)/$$cmd; \
        done
        for lcmd in $(LCMDS); do \
-         rm -f $(bindir)/$$lcmd; \
+         rm -f $(DESTDIR)$(bindir)/$$lcmd; \
        done
        for misc in $(MISC); do \
-         rm -f $(libdir)/$$misc; \
+         rm -f $(DESTDIR)$(libdir)/$$misc; \
        done
        for cmd in $(SCMDS); do \
-         rm -f $(bindir)/$$cmd; \
+         rm -f $(DESTDIR)$(bindir)/$$cmd; \
        done
 
 # ========== DEPENDENCIES FOR CLEANUP ==========