Skip to content

Commit c37af95

Browse files
avardscho
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 719b3ab commit c37af95

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
@@ -474,8 +474,7 @@ ARFLAGS = rcs
474474
# This can help installing the suite in a relocatable way.
475475

476476
prefix = $(HOME)
477-
bindir_relative = bin
478-
bindir = $(prefix)/$(bindir_relative)
477+
bindir = $(prefix)/bin
479478
mandir = $(prefix)/share/man
480479
infodir = $(prefix)/share/info
481480
gitexecdir = libexec/git-core
@@ -492,6 +491,7 @@ lib = lib
492491
# DESTDIR =
493492
pathsep = :
494493

494+
bindir_relative = $(patsubst $(prefix)/%,%,$(bindir))
495495
mandir_relative = $(patsubst $(prefix)/%,%,$(mandir))
496496
infodir_relative = $(patsubst $(prefix)/%,%,$(infodir))
497497
htmldir_relative = $(patsubst $(prefix)/%,%,$(htmldir))

0 commit comments

Comments
 (0)