From: Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: make install rewrites source files
Date: Mon, 23 Jan 2012 21:57:51 +0100 (CET) [thread overview]
Message-ID: <hbf.20120123j61g@bombur.uio.no> (raw)
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:
> 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.
> 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
next prev parent reply other threads:[~2012-01-23 20:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=hbf.20120123j61g@bombur.uio.no \
--to=h.b.furuseth@usit.uio.no \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).