Skip to content

Makefile: add a INSTALL_SYMLINKS option

Ævar Arnfjörð Bjarmason git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Makefile: fix broken bindir_relative variableMakefile+2 -20 replies
2/3Makefile: add a gitexecdir_relative variableMakefile+2 -00 replies
3/3Makefile: optionally symlink libexec/git-core binaries to bin/gitMakefile+31 -1534 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Makefile: add a INSTALL_SYMLINKS option

On Tue, Mar 13 2018, Junio C. Hamano jotted:

Quoted 11 lines
Quoted 7 lines · Ævar Arnfjörð Bjarmason

Related to this, I came across this bug report
https://gitlab.com/gitlab-org/omnibus-gitlab/issues/3265 which is wondering why we're installing N copies of the git binary, presumably they're building with NO_INSTALL_HARDLINKS.
...
But is there any reason anyone can think of for why we shouldn't be figuring out the relative path and symlinking the two?

Quoted 7 lines

There is no fundamental reason not to offer such an "install" method as an option; unless you count a more philosophical aversion to use symlinks due to (perceived) additional fragility, that is.

The resulting code may become messier than without, but as long as it is without the reasonable range for usual price we would pay for a new "feature", that would be tolerable, I guess.

Cool. I think it makes sense for us to have this. Here's an implementation of it. The 3/3 patch looks a bit scary, but "git show" with --word-diff will show that the change is minimal.

This steals a small piece from Daniel's relocatable series, and doesn't in any way conflict with it. None of this will need to be fixed up to make git relocatable since all the symlinks are relative already.

Ævar Arnfjörð Bjarmason (3):
Makefile: fix broken bindir_relative variable
Makefile: add a gitexecdir_relative variable
Makefile: optionally symlink libexec/git-core binaries to bin/git

 Makefile | 52 +++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 35 insertions(+), 17 deletions(-)
Signature · 1 line
2.15.1.424.g9478a66081