[PATCH 0/5] replacement for the part of js/more-win that is in pu
From: Johannes Sixt <hidden>
Date: 2016-06-15 22:44:56
Subsystem:
kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers:
Nathan Chancellor, Nicolas Schier, Linus Torvalds
The interdiff to js/more-win is below. It is mostly the changes
of 1/5.
Johannes Sixt (5):
Makefile: Normalize $(bindir) and $(gitexecdir) before comparing
Record the command invocation path early
Fix relative built-in paths to be relative to the command
invocation
Allow the built-in exec path to be relative to the command
invocation path
Allow add_path() to add non-existent directories to the path
Makefile | 33 +++++++++++++++++-----------
abspath.c | 36 ++++++++++++++++++++++++++++++
exec_cmd.c | 54 +++++++++++----------------------------------
exec_cmd.h | 3 +-
git.c | 5 +--
path.c | 36 ------------------------------
receive-pack.c | 2 +-
shell.c | 4 +-
upload-pack.c | 2 +-
9 files changed, 77 insertions(+), 98 deletions(-)
diff --git a/Makefile b/Makefile
index 3593e6f..4df6423 100644
--- a/Makefile
+++ b/Makefile@@ -1301,14 +1301,14 @@ remove-dashes: ### Installation rules ifeq ($(firstword $(subst /, ,$(template_dir))),..) -template_instdir = $(shell cd '$(bindir_SQ)/$(template_dir_SQ)' && pwd) +template_instdir = $(bindir)/$(template_dir) else template_instdir = $(template_dir) endif export template_instdir ifeq ($(firstword $(subst /, ,$(gitexecdir))),..) -gitexec_instdir = $(shell cd '$(bindir_SQ)/$(gitexecdir_SQ)' && pwd) +gitexec_instdir = $(bindir)/$(gitexecdir) else gitexec_instdir = $(gitexecdir) endif
@@ -1325,18 +1325,18 @@ ifndef NO_TCLTK $(MAKE) -C gitk-git install $(MAKE) -C git-gui install endif - if test 'z$(bindir_SQ)' != 'z$(gitexec_instdir_SQ)'; \ - then \ - ln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \ - '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/git$X' || \ - cp '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \ - '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/git$X'; \ - fi - $(foreach p,$(BUILT_INS), $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p' ;) ifneq (,$X) $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';) endif - ./check_bindir 'z$(bindir_SQ)' 'z$(gitexec_instdir_SQ)' '$(DESTDIR_SQ)$(bindir_SQ)/git-shell$X' + bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \ + execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \ + if test "z$$bindir" != "z$$execdir"; \ + then \ + ln -f "$$bindir/git$X" "$$execdir/git$X" || \ + cp "$$bindir/git$X" "$$execdir/git$X"; \ + fi && \ + { $(foreach p,$(BUILT_INS), $(RM) "$$execdir/$p" && ln "$$execdir/git$X" "$$execdir/$p" ;) } && \ + ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-shell$X" install-doc: $(MAKE) -C Documentation install