From: Junio C Hamano <gitster@pobox.com>
To: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
Cc: Eric Sunshine <sunshine@sunshineco.com>,
Alexander Ost <ost@ieee.org>, Git List <git@vger.kernel.org>
Subject: Re: [BUG] `make install' partly ignores `NO_INSTALL_HARDLINKS'
Date: Fri, 14 Aug 2020 10:26:24 -0700 [thread overview]
Message-ID: <xmqqo8ndxhof.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200814150214.GC9518@danh.dev> ("Đoàn Trần Công Danh"'s message of "Fri, 14 Aug 2020 22:02:14 +0700")
Đoàn Trần Công Danh <congdanhqx@gmail.com> writes:
>> Thanks. Perhaps something along this line (which is totally
>> untested), as the top-level Makefile already exports
>> NO_INSTALL_HARDLINKS to submakes?
>>
>>
>>
>> Makefile | 9 +++++++--
>> 1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index f10caedaa7..1cdbf8e504 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -44,6 +44,11 @@ endif
>> ifndef INSTALL
>> INSTALL = install
>> endif
>> +ifdef NO_INSTALL_HARDLINKS
>> + LN = cp
>
> Since both git-citool and git-gui will be installed into same
> directory "$(libexecdir)", I think it would make more sense to use:
>
> LN = ln -s
>
> here instead?
In the top-level Makefile, INSTALL_SYMLINKS make macro does exist,
but it is not exported to submakes. If it were, something like
ifdef INSTALL_SYMLINKS
LN = ln -s
else
ifdef NO_INSTALL_HARDLINKS
LN = cp
else
LN = ln
endif
endif
might become possible, but you'd need to audit what is fed to $(LN)
at the locations the macro is used and make necessary adjustment
accordingly. "cp A ../B" or "ln A ../B" will make a usable copy of
file A appear inside ../B directory, but "ln -s A ../B" will not,
and I didn't see if all uses of $(LN) was to give synonyms to what
is already installed, or some of them were truly installing from the
build location when I gave the "something along this line" example.
next prev parent reply other threads:[~2020-08-14 17:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 8:15 [BUG] `make install' partly ignores `NO_INSTALL_HARDLINKS' Alexander Ost
2020-08-13 21:45 ` Eric Sunshine
2020-08-13 21:52 ` Junio C Hamano
2020-08-14 8:33 ` Alexander Ost
2020-08-14 15:02 ` Đoàn Trần Công Danh
2020-08-14 17:26 ` Junio C Hamano [this message]
2020-08-15 1:15 ` Đoàn Trần Công Danh
2020-08-17 16:40 ` Junio C Hamano
2020-08-17 17:06 ` Đoàn Trần Công Danh
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqo8ndxhof.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=congdanhqx@gmail.com \
--cc=git@vger.kernel.org \
--cc=ost@ieee.org \
--cc=sunshine@sunshineco.com \
/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://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).