git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Brown <git@davidb.org>
To: Junio C Hamano <junkio@cox.net>
Cc: Morten Welinder <mwelinder@gmail.com>, git@vger.kernel.org
Subject: Re: CFLAGS usage
Date: Fri, 4 Nov 2005 10:23:44 -0800	[thread overview]
Message-ID: <20051104182342.GA27711@old.davidb.org> (raw)
In-Reply-To: <7voe50wblp.fsf@assigned-by-dhcp.cox.net>

On Fri, Nov 04, 2005 at 09:45:38AM -0800, Junio C Hamano wrote:
> Morten Welinder <mwelinder@gmail.com> writes:
> 
> > Various stuff is being added to CFLAGS, but CFLAGS is not being used
> > after being composed in CFLAGS_ALL.
> 
> True.
> 
> We should move ALL_CFLAGS definition at the very end; is
> anything else needed?

Although it will work fine just as it is (it may be misleading, though).
Lazy evaluation in make is important, it allows such things as having
different CFLAGS that for different source files.

  foo.o: CFLAGS += -fspecial-option

And the additional CFLAGS will only apply to the compilation of foo.
Since the ALL_CFLAGS is expanded lazily, it gets expanded for each target,
and the rule above causes CFLAGS to have extra values only on that target.

Dave

  reply	other threads:[~2005-11-04 18:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-04 15:21 CFLAGS usage Morten Welinder
2005-11-04 16:59 ` David Brown
2005-11-04 17:45 ` Junio C Hamano
2005-11-04 18:23   ` David Brown [this message]
2005-11-04 18:47     ` Junio C Hamano
2005-11-05  7:57       ` [PATCH] Simplify CFLAGS/DEFINES in Makefile Junio C Hamano

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=20051104182342.GA27711@old.davidb.org \
    --to=git@davidb.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=mwelinder@gmail.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).