git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Add option USE_INPLACE to Makefile

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 16, 2005, 02:35 UTC
Message-ID
<Pine.LNX.4.63.0511160333460.15130@wbgn013.biozentrum.uni-wuerzburg.de>

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

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
Next: Junio C Hamano
Message 1 of 5 in “Add option USE_INPLACE to Makefile”
  1. Add option USE_INPLACE to MakefileJohannes Schindelin, Nov 16, 2005
  2. Junio C HamanoNov 16, 2005
  3. Johannes SchindelinNov 16, 2005
  4. Junio C HamanoNov 16, 2005
  5. Johannes SchindelinNov 16, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.