Re: make install rewrites source files
- From
- Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no>
- Date
- Jan 23, 2012, 20:57 UTC
- Message-ID
- <hbf.20120123j61g@bombur.uio.no>
- In-Reply-To
- <7vhazm89bo.fsf@alter.siamese.dyndns.org>
On Mon, 23 Jan 2012 12:15:07 -0800, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no> writes: > >> INSTALL says we can install a profiled Git with >> $ make profile-all >> # make install prefix=... >> This does not work... > > We should just drop prefix=... from that line, as the "prefix=value must > be the same while building and installing" is not only about the "profile" > build but applies to any other build.
Either add or remove a prefix so they match, yes. Fine by me either way.
Show 7 quoted lines
> I however wonder why you would need a separate profile-install target, > though. Shouldn't > > $ make foo-build && make install > > install a funky 'foo' variant of the build for any supported value of > 'foo'?
'profile-all' makes 'all' with different CFLAGS from those in
Makefile. 'install' makes 'all' which notices CFLAGS has changed
since last build, so it rebuilds:
$ make install
* new build flags or prefix
...
That's also how the 2nd '$(MAKE) ... all' in profile-all can tell
that it should do anything. Thus my new 'profile-install:' target
with the same flags as the final $(MAKE) in profile-all.This looks way too clever to me. 'make' can detect that flags have changed, but should then fail (optionally?) instead of rebuilding. That'd likely solve my issue with other files rewritten as root too. But I'm not volunteering to rewrite your build system.
BTW, it'd be useful to split up 'profile-all' so it is possible to ignore 'make test' failure and compilete the build anyway:
.PHONY: profile-all profile-clean profile-gen profile-use profile-install profile-all: profile-clean profile-gen profile-use profile-gen: $(MAKE) CFLAGS="$(PROFILE_GEN_CFLAGS)" all $(MAKE) CFLAGS="$(PROFILE_GEN_CFLAGS)" -j1 test profile-use: $(MAKE) CFLAGS="$(PROFILE_USE_CFLAGS)" all
-- Hallvard