From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17420 invoked from network); 27 Aug 1999 15:40:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Aug 1999 15:40:10 -0000 Received: (qmail 15473 invoked by alias); 27 Aug 1999 15:40:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7520 Received: (qmail 15462 invoked from network); 27 Aug 1999 15:40:02 -0000 From: "Bart Schaefer" Message-Id: <990827153949.ZM28068@candle.brasslantern.com> Date: Fri, 27 Aug 1999 15:39:49 +0000 In-Reply-To: <19990820223935.A5728@dman.com> Comments: In reply to Clint Adams "PATCH: add DESTDIR functionality to install" (Aug 20, 10:39pm) References: <19990820223935.A5728@dman.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: add DESTDIR functionality to install MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Aug 20, 10:39pm, Clint Adams wrote: } Subject: PATCH: add DESTDIR functionality to install } } This enables use of the DESTDIR variable which greatly facilitates } the installation of zsh in an alternate location without unwanted } behavior that can result from changing $(prefix). I had problems applying the Src/Makefile.in hunk of this patch because my copy uses $(LN) rather than an explicit "ln" command. Which turned out to be fortunate, as I discovered a bug in "make uninsall.bin-here": } --- zsh-3.1.6.orig/Src/Makefile.in } +++ zsh-3.1.6/Src/Makefile.in } # uninstall binary } uninstall.bin-here: uninstall.bin-@L@ } - rm -f $(bindir)/zsh-$(VERSION) $(bindir)/zsh } + rm -f $(DESTDIR)$(bindir)/zsh-$(VERSION) $(bindir)/zsh ^^^^^^^^^^^^^^ Here is a corrected patch, which should be applied to Src/Makefile.in *in place of* 7459. Index: Src/Makefile.in =================================================================== @@ -160,28 +160,28 @@ # install binary, creating install directory if necessary install.bin-here: zsh install.bin-@L@ - $(sdir_top)/mkinstalldirs $(bindir) - $(INSTALL_PROGRAM) $(STRIPFLAGS) zsh $(bindir)/zsh-$(VERSION) - if test -f $(bindir)/zsh; then \ - rm -f $(bindir)/zsh.old; \ - $(LN) $(bindir)/zsh $(bindir)/zsh.old; \ + $(sdir_top)/mkinstalldirs $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) $(STRIPFLAGS) zsh $(DESTDIR)$(bindir)/zsh-$(VERSION) + if test -f $(DESTDIR)$(bindir)/zsh; then \ + rm -f $(DESTDIR)$(bindir)/zsh.old; \ + $(LN) $(DESTDIR)$(bindir)/zsh $(DESTDIR)$(bindir)/zsh.old; \ else :; fi - rm -f $(bindir)/zsh.new - $(LN) $(bindir)/zsh-$(VERSION) $(bindir)/zsh.new - mv $(bindir)/zsh.new $(bindir)/zsh + rm -f $(DESTDIR)$(bindir)/zsh.new + $(LN) $(DESTDIR)$(bindir)/zsh-$(VERSION) $(DESTDIR)$(bindir)/zsh.new + mv $(DESTDIR)$(bindir)/zsh.new $(DESTDIR)$(bindir)/zsh install.bin-N: install.bin-L: $(LIBZSH) - $(sdir_top)/mkinstalldirs $(libdir)/zsh - $(INSTALL_PROGRAM) $(LIBZSH) $(libdir)/zsh/$(LIBZSH) + $(sdir_top)/mkinstalldirs $(DESTDIR)$(libdir)/zsh + $(INSTALL_PROGRAM) $(LIBZSH) $(DESTDIR)$(libdir)/zsh/$(LIBZSH) # uninstall binary uninstall.bin-here: uninstall.bin-@L@ - rm -f $(bindir)/zsh-$(VERSION) $(bindir)/zsh + rm -f $(DESTDIR)$(bindir)/zsh-$(VERSION) $(DESTDIR)$(bindir)/zsh uninstall.bin-N: uninstall.bin-L: - rm -f $(libdir)/zsh/$(LIBZSH) + rm -f $(DESTDIR)$(libdir)/zsh/$(LIBZSH) # ========== DEPENDENCIES FOR CLEANUP ========== -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com