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

make install rewrites source files

From
HFHallvard Breien Furuseth <h.b.furuseth@usit.uio.no>
Date
Jan 23, 2012, 14:18 UTC
Message-ID
<hbf.20120123bz2f@bombur.uio.no>
INSTALL says we can install a profiled Git with
	$ make profile-all
	# make install prefix=...
This does not work: 'make install' notices that the build flags has
changed and rebuilds Git - presumably without using the profile info.
The patch below fixes this.
However, make install should not write to the source directory in any
case.  That fails as root if root lacks write access there, due to NFS
mounts that map root to nobody etc.  At least git-instaweb and
GIT-BUILD-OPTIONS are rewritten.  You can simulate this with
    su nobody -s /bin/bash -c 'make -k install'
after configuring with prefix=<directory owned by nobody>.
Index: INSTALL
--- INSTALL~
+++ INSTALL
@@ -29,6 +29,6 @@ If you're willing to trade off (much) lo
 faster git you can also do a profile feedback build with
 
-	$ make profile-all
-	# make prefix=... install
+	$ make profile-all     prefix=...
+	# make profile-install prefix=...
 
 This will run the complete test suite as training workload and then
Index: Makefile
--- Makefile~	2012-01-19 01:36:02.000000000 +0100
+++ Makefile	2012-01-23 14:44:56.554980323 +0100
@@ -2695,5 +2695,5 @@ cover_db_html: cover_db
 ### profile feedback build
 #
-.PHONY: profile-all profile-clean
+.PHONY: profile-all profile-clean profile-install
 
 PROFILE_GEN_CFLAGS := $(CFLAGS) -fprofile-generate -DNO_NORETURN=1
@@ -2708,2 +2708,5 @@ profile-all: profile-clean
 	$(MAKE) CFLAGS="$(PROFILE_GEN_CFLAGS)" -j1 test
 	$(MAKE) CFLAGS="$(PROFILE_USE_CFLAGS)" all
+
+profile-install:
+	$(MAKE) CFLAGS="$(PROFILE_USE_CFLAGS)" install
Next: Junio C Hamano
Message 1 of 9 in “make install rewrites source files”
  1. Hallvard Breien FurusethJan 23, 2012
  2. Junio C HamanoJan 23, 2012
  3. Hallvard Breien FurusethJan 23, 2012
  4. Clemens BuchacherJan 26, 2012
  5. Junio C HamanoJan 27, 2012
  6. Hallvard Breien FurusethJan 27, 2012
  7. Phillip SusiJan 23, 2012
  8. Junio C HamanoJan 23, 2012
  9. Hallvard B FurusethJan 27, 2012

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.