git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Schuberth <sschuberth@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	"Kyle J. McKay" <mackyle@gmail.com>,
	Git Mailing List <git@vger.kernel.org>,
	Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH 1/2] Makefile: Use the same source directory for "ln -s" as for "ln" / "cp"
Date: Thu, 5 Feb 2015 21:29:04 +0100	[thread overview]
Message-ID: <CAHGBnuPL7NN9J+4xd7xifsmbSPcC5V2ze05ji7P_qnvWHPGV+A@mail.gmail.com> (raw)
In-Reply-To: <20150205195143.GB15326@peff.net>

On Thu, Feb 5, 2015 at 8:51 PM, Jeff King <peff@peff.net> wrote:

> On Thu, Feb 05, 2015 at 08:26:08PM +0100, Sebastian Schuberth wrote:
>
>> > It is not even correct, is it?
>> >
>> > When DESTDIR is set to allow you to install into a temporary place
>> > only so that you can "tar" up the resulting filesystem tree, bindir
>> > points at the location we need to "cp" the built programs into, i.e.
>> > inside DESTDIR.
>>
>> Agreed folks, please disregard this as well as 2/2 of this series.
>
> We would still want an equivalent to 2/2 to set up a relative symlink
> for $(ALL_PROGRAMS), though, right?

Probably. But I'm not sure how to calculate the relative path
correctly so that it'll work with all possible bin / execdir
combinations. A simple

diff --git a/Makefile b/Makefile
index 21f23cb..d2849c3 100644

--- a/Makefile
+++ b/Makefile

@@ -2258,8 +2258,8 @@

 endif
 ········$(RM)·"$$execdir/$$p"·&&·\
 ········test·-z·"$(NO_INSTALL_HARDLINKS)$(NO_CROSS_DIRECTORY_HARDLINKS)"·&&·\
 ········ln·"$$bindir/$$p"·"$$execdir/$$p"·2>/dev/null·||·\
+········ln·-s·"../$$p"·"$$execdir/$$p"·2>/dev/null·||·\
 ········cp·"$$bindir/$$p"·"$$execdir/$$p"·||·exit;·\
 ······done;·\
 ····}·&&·\
--·

does not seem to be correct in all cases.

-- 
Sebastian Schuberth

  reply	other threads:[~2015-02-05 20:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 15:51 [PATCH 1/2] Makefile: Use the same source directory for "ln -s" as for "ln" / "cp" Sebastian Schuberth
2015-02-05 17:48 ` Kyle J. McKay
2015-02-05 19:23   ` Junio C Hamano
2015-02-05 19:26     ` Sebastian Schuberth
2015-02-05 19:51       ` Jeff King
2015-02-05 20:29         ` Sebastian Schuberth [this message]
2015-02-05 20:45           ` Jeff King
2015-02-05 20:52             ` Sebastian Schuberth
2015-02-05 20:41         ` Kyle J. McKay
2015-02-05 20:59           ` Junio C Hamano
2015-02-05 22:44             ` Kyle J. McKay

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=CAHGBnuPL7NN9J+4xd7xifsmbSPcC5V2ze05ji7P_qnvWHPGV+A@mail.gmail.com \
    --to=sschuberth@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=mackyle@gmail.com \
    --cc=peff@peff.net \
    /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.
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).