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
This commit is contained in:
commit
499e7b3150
12
Makefile
12
Makefile
@ -247,6 +247,9 @@ all::
|
|||||||
# Define NO_CROSS_DIRECTORY_HARDLINKS if you plan to distribute the installed
|
# Define NO_CROSS_DIRECTORY_HARDLINKS if you plan to distribute the installed
|
||||||
# programs as a tar, where bin/ and libexec/ might be on different file systems.
|
# programs as a tar, where bin/ and libexec/ might be on different file systems.
|
||||||
#
|
#
|
||||||
|
# Define NO_INSTALL_HARDLINKS if you prefer to use either symbolic links or
|
||||||
|
# copies to install built-in git commands e.g. git-cat-file.
|
||||||
|
#
|
||||||
# Define USE_NED_ALLOCATOR if you want to replace the platforms default
|
# Define USE_NED_ALLOCATOR if you want to replace the platforms default
|
||||||
# memory allocators with the nedmalloc allocator written by Niall Douglas.
|
# memory allocators with the nedmalloc allocator written by Niall Douglas.
|
||||||
#
|
#
|
||||||
@ -1835,6 +1838,10 @@ ifdef ASCIIDOC7
|
|||||||
export ASCIIDOC7
|
export ASCIIDOC7
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef NO_INSTALL_HARDLINKS
|
||||||
|
export NO_INSTALL_HARDLINKS
|
||||||
|
endif
|
||||||
|
|
||||||
### profile feedback build
|
### profile feedback build
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -2574,19 +2581,21 @@ endif
|
|||||||
{ test "$$bindir/" = "$$execdir/" || \
|
{ test "$$bindir/" = "$$execdir/" || \
|
||||||
for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
|
for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
|
||||||
$(RM) "$$execdir/$$p" && \
|
$(RM) "$$execdir/$$p" && \
|
||||||
test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
|
test -z "$(NO_INSTALL_HARDLINKS)$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
|
||||||
ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \
|
ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \
|
||||||
cp "$$bindir/$$p" "$$execdir/$$p" || exit; \
|
cp "$$bindir/$$p" "$$execdir/$$p" || exit; \
|
||||||
done; \
|
done; \
|
||||||
} && \
|
} && \
|
||||||
for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
|
for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
|
||||||
$(RM) "$$bindir/$$p" && \
|
$(RM) "$$bindir/$$p" && \
|
||||||
|
test -z "$(NO_INSTALL_HARDLINKS)" && \
|
||||||
ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
|
ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
|
||||||
ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
|
ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
|
||||||
cp "$$bindir/git$X" "$$bindir/$$p" || exit; \
|
cp "$$bindir/git$X" "$$bindir/$$p" || exit; \
|
||||||
done && \
|
done && \
|
||||||
for p in $(BUILT_INS); do \
|
for p in $(BUILT_INS); do \
|
||||||
$(RM) "$$execdir/$$p" && \
|
$(RM) "$$execdir/$$p" && \
|
||||||
|
test -z "$(NO_INSTALL_HARDLINKS)" && \
|
||||||
ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \
|
ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \
|
||||||
ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
|
ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
|
||||||
cp "$$execdir/git$X" "$$execdir/$$p" || exit; \
|
cp "$$execdir/git$X" "$$execdir/$$p" || exit; \
|
||||||
@ -2594,6 +2603,7 @@ endif
|
|||||||
remote_curl_aliases="$(REMOTE_CURL_ALIASES)" && \
|
remote_curl_aliases="$(REMOTE_CURL_ALIASES)" && \
|
||||||
for p in $$remote_curl_aliases; do \
|
for p in $$remote_curl_aliases; do \
|
||||||
$(RM) "$$execdir/$$p" && \
|
$(RM) "$$execdir/$$p" && \
|
||||||
|
test -z "$(NO_INSTALL_HARDLINKS)" && \
|
||||||
ln "$$execdir/git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
|
ln "$$execdir/git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
|
||||||
ln -s "git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
|
ln -s "git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
|
||||||
cp "$$execdir/git-remote-http$X" "$$execdir/$$p" || exit; \
|
cp "$$execdir/git-remote-http$X" "$$execdir/$$p" || exit; \
|
||||||
|
Loading…
Reference in New Issue
Block a user