Skip to content

Commit 2a1feb9

Browse files
committed
Merge branch 'js/maint-no-ln-across-libexec-and-bin' into maint
* js/maint-no-ln-across-libexec-and-bin: Add NO_CROSS_DIRECTORY_HARDLINKS support to the Makefile Conflicts: Makefile
2 parents 5e04a1e + 3426e34 commit 2a1feb9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ all::
175175
# Define OBJECT_CREATION_USES_RENAMES if your operating systems has problems
176176
# when hardlinking a file to another name and unlinking the original file right
177177
# away (some NTFS drivers seem to zero the contents in that scenario).
178+
#
179+
# Define NO_CROSS_DIRECTORY_HARDLINKS if you plan to distribute the installed
180+
# programs as a tar, where bin/ and libexec/ might be on different file systems.
178181

179182
GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
180183
@$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -1550,6 +1553,7 @@ endif
15501553
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
15511554
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
15521555
{ $(RM) "$$execdir/git-add$X" && \
1556+
test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
15531557
ln "$$bindir/git$X" "$$execdir/git-add$X" 2>/dev/null || \
15541558
cp "$$bindir/git$X" "$$execdir/git-add$X"; } && \
15551559
{ for p in $(filter-out git-add$X,$(BUILT_INS)); do \

0 commit comments

Comments
 (0)