[PATCH 4/4] remote-helpers: add exec-path links

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This way we don't have to modify the PATH ourselves and it's easier to
test without 'make'.

Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 .gitignore                      |  2 ++
 contrib/remote-helpers/Makefile | 13 +++++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index 10aee94..a79b412 100644
--- a/.gitignore
+++ b/.gitignore
@@ -119,11 +119,13 @@
 /git-reflog
 /git-relink
 /git-remote
+/git-remote-bzr
 /git-remote-http
 /git-remote-https
 /git-remote-ftp
 /git-remote-ftps
 /git-remote-fd
+/git-remote-hg
 /git-remote-ext
 /git-remote-testgit
 /git-remote-testpy
diff --git a/contrib/remote-helpers/Makefile b/contrib/remote-helpers/Makefile
index 55abf0b..98150b4 100644
--- a/contrib/remote-helpers/Makefile
+++ b/contrib/remote-helpers/Makefile
@@ -1,9 +1,9 @@
 TESTS := $(wildcard test-*.t)
 SCRIPTS := $(wildcard git-remote-*.py)
+LINKS := $(addprefix ../../,$(patsubst %.py,%,$(SCRIPTS)))
 
 export T := $(addprefix $(CURDIR)/,$(TESTS))
 export MAKE := $(MAKE) -e
-export PATH := $(CURDIR):$(PATH)
 export TEST_LINT := test-lint-executable test-lint-shell-syntax
 export TEST_DIRECTORY := $(CURDIR)/../../t
 
@@ -15,10 +15,15 @@ all: $(SCRIPTS)
 install:
 	$(MAKE) -C ../.. install-python-script
 
-test: all
+links: all $(LINKS)
+
+test: links
 	$(MAKE) -C ../../t $@
 
-$(TESTS): all
+$(LINKS):
+	ln -sf contrib/remote-helpers/$(notdir $@) ../..
+
+$(TESTS): links
 	$(MAKE) -C ../../t $(CURDIR)/$@
 
-.PHONY: all install test $(TESTS)
+.PHONY: all install test links $(TESTS)
-- 
1.8.3.rc3.312.g47657de

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]