Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 499e7b3

Browse files
committed
Merge branch 'jc/install-no-hardlinks'
Your build platform may support hardlinks but you may prefer not to use them, e.g. when installing to DESTDIR to make a tarball and untarring on a filesystem that has poor support for hardlinks. The Makefile in git-gui project may need to learn to honor the same setting; it unconditionally creates git-citool by hardlinking git-gui. * jc/install-no-hardlinks: Makefile: NO_INSTALL_HARDLINKS
2 parents d41355f + 70de5e6 commit 499e7b3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ all::
247247
# Define NO_CROSS_DIRECTORY_HARDLINKS if you plan to distribute the installed
248248
# programs as a tar, where bin/ and libexec/ might be on different file systems.
249249
#
250+
# Define NO_INSTALL_HARDLINKS if you prefer to use either symbolic links or
251+
# copies to install built-in git commands e.g. git-cat-file.
252+
#
250253
# Define USE_NED_ALLOCATOR if you want to replace the platforms default
251254
# memory allocators with the nedmalloc allocator written by Niall Douglas.
252255
#
@@ -1835,6 +1838,10 @@ ifdef ASCIIDOC7
18351838
export ASCIIDOC7
18361839
endif
18371840

1841+
ifdef NO_INSTALL_HARDLINKS
1842+
export NO_INSTALL_HARDLINKS
1843+
endif
1844+
18381845
### profile feedback build
18391846
#
18401847

@@ -2574,26 +2581,29 @@ endif
25742581
{ test "$$bindir/" = "$$execdir/" || \
25752582
for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
25762583
$(RM) "$$execdir/$$p" && \
2577-
test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
2584+
test -z "$(NO_INSTALL_HARDLINKS)$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
25782585
ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \
25792586
cp "$$bindir/$$p" "$$execdir/$$p" || exit; \
25802587
done; \
25812588
} && \
25822589
for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
25832590
$(RM) "$$bindir/$$p" && \
2591+
test -z "$(NO_INSTALL_HARDLINKS)" && \
25842592
ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
25852593
ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
25862594
cp "$$bindir/git$X" "$$bindir/$$p" || exit; \
25872595
done && \
25882596
for p in $(BUILT_INS); do \
25892597
$(RM) "$$execdir/$$p" && \
2598+
test -z "$(NO_INSTALL_HARDLINKS)" && \
25902599
ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \
25912600
ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
25922601
cp "$$execdir/git$X" "$$execdir/$$p" || exit; \
25932602
done && \
25942603
remote_curl_aliases="$(REMOTE_CURL_ALIASES)" && \
25952604
for p in $$remote_curl_aliases; do \
25962605
$(RM) "$$execdir/$$p" && \
2606+
test -z "$(NO_INSTALL_HARDLINKS)" && \
25972607
ln "$$execdir/git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
25982608
ln -s "git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
25992609
cp "$$execdir/git-remote-http$X" "$$execdir/$$p" || exit; \

0 commit comments

Comments
 (0)