If you plan on adding your current working directory to your PATH, you can do
USE_INPLACE=1 make
and you no longer need to worry about setting variables like GIT_EXEC_PATH and GIT_PYTHON_PATH.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
Makefile | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
applies-to: 66be81f4755380a7c9da56aa5fbc600565ff78a8 07f60591a5e881b2a46885ac9b6ba61a4931ac86
Show changes to Makefile +13 −0
diff --git a/Makefile b/Makefile index 55f4c6b..63c524d 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,9 @@ # Define USE_STDEV below if you want git to care about the underlying device # change being considered an inode change from the update-cache perspective. +# Define USE_INPLACE if you do not plan to install git anywhere, but rather +# want to add the working directory to your PATH. + GIT_VERSION = 0.99.9.GIT # CFLAGS and LDFLAGS are for the users to override from the command line. @@ -60,10 +63,16 @@ ALL_CFLAGS = $(CFLAGS) ALL_LDFLAGS = $(LDFLAGS) prefix = $(HOME) +ifdef USE_INPLACE +bindir = `pwd` +template_dir = `pwd`/templates +GIT_PYTHON_DIR = `pwd`/compat +else bindir = $(prefix)/bin template_dir = $(prefix)/share/git-core/templates/ GIT_PYTHON_DIR = $(prefix)/share/git-core/python # DESTDIR= +endif CC = gcc AR = ar @@ -432,6 +441,8 @@ check: ### Installation rules +ifndef USE_INPLACE + install: $(PROGRAMS) $(SCRIPTS) git $(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(bindir)) $(INSTALL) git $(PROGRAMS) $(SCRIPTS) $(call shellquote,$(DESTDIR)$(bindir)) @@ -468,6 +479,8 @@ deb: dist dpkg-source -b $(GIT_TARNAME) cd $(GIT_TARNAME) && fakeroot debian/rules binary +endif + ### Cleaning rules clean: --- 0.99.9.GIT