Skip to content

Commit 7bc506d

Browse files
avargitster
authored andcommitted
Makefile: fix broken bindir_relative variable
Change the bindir_relative variable to work like the other *_relative variables, which are computed as a function of the absolute path. Before this change, supplying e.g. bindir=/tmp/git/binaries to the Makefile would yield a bindir_relative of just "bin", as opposed to "binaries". This logic was originally added back in 026fa0d ("Move computation of absolute paths from Makefile to runtime (in preparation for RUNTIME_PREFIX)", 2009-01-18), then later in 971f853 ("Makefile: make mandir, htmldir and infodir absolute", 2013-02-24) when more *_relative variables were added those new variables didn't have this bug, but bindir_relative was never fixed. There is a small change in behavior here, which is that setting bindir_relative as an argument to the Makefile won't work anymore, I think that's fine, since this was always intended as an internal variable (e.g. INSTALL documents bindir=*, not bindir_relative=*). Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7fb6aef commit 7bc506d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,7 @@ ARFLAGS = rcs
468468
# This can help installing the suite in a relocatable way.
469469

470470
prefix = $(HOME)
471-
bindir_relative = bin
472-
bindir = $(prefix)/$(bindir_relative)
471+
bindir = $(prefix)/bin
473472
mandir = $(prefix)/share/man
474473
infodir = $(prefix)/share/info
475474
gitexecdir = libexec/git-core
@@ -486,6 +485,7 @@ lib = lib
486485
# DESTDIR =
487486
pathsep = :
488487

488+
bindir_relative = $(patsubst $(prefix)/%,%,$(bindir))
489489
mandir_relative = $(patsubst $(prefix)/%,%,$(mandir))
490490
infodir_relative = $(patsubst $(prefix)/%,%,$(infodir))
491491
htmldir_relative = $(patsubst $(prefix)/%,%,$(htmldir))

0 commit comments

Comments
 (0)