git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* make install rewrites source files
@ 2012-01-23 14:18 Hallvard Breien Furuseth
  2012-01-23 20:15 ` Junio C Hamano
  2012-01-23 20:28 ` Phillip Susi
  0 siblings, 2 replies; 9+ messages in thread
From: Hallvard Breien Furuseth @ 2012-01-23 14:18 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-01-27 13:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-23 14:18 make install rewrites source files Hallvard Breien Furuseth
2012-01-23 20:15 ` Junio C Hamano
2012-01-23 20:57   ` Hallvard Breien Furuseth
2012-01-26 22:52     ` Clemens Buchacher
2012-01-27  0:49       ` Junio C Hamano
2012-01-27 13:11       ` Hallvard Breien Furuseth
2012-01-23 20:28 ` Phillip Susi
2012-01-23 20:52   ` Junio C Hamano
2012-01-27  9:46   ` Hallvard B Furuseth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).