zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: add DESTDIR functionality to install
Date: Fri, 27 Aug 1999 15:39:49 +0000	[thread overview]
Message-ID: <990827153949.ZM28068@candle.brasslantern.com> (raw)
In-Reply-To: <19990820223935.A5728@dman.com>

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


  reply	other threads:[~1999-08-27 15:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-21  2:39 Clint Adams
1999-08-27 15:39 ` Bart Schaefer [this message]
1999-08-30 12:28 ` Peter Stephenson
1999-08-30 15:31   ` Bart Schaefer
1999-08-31  7:21   ` Andrej Borsenkow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=990827153949.ZM28068@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).