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

Re: CFLAGS usage

From
David Brown <git@davidb.org>
Date
Nov 4, 2005, 16:59 UTC
Message-ID
<20051104165903.GA13125@old.davidb.org>
In-Reply-To
<118833cc0511040721w7f3990fbw631feaa6a4bda936@mail.gmail.com>
On Fri, Nov 04, 2005 at 10:21:55AM -0500, Morten Welinder wrote:
> Various stuff is being added to CFLAGS, but CFLAGS is not being used
> after being composed in CFLAGS_ALL.
> CFLAGS = -g -O2 -Wall
> ALL_CFLAGS = $(CFLAGS) $(PLATFORM_DEFINES) $(DEFINES)
>                 CFLAGS += -I$(CURLDIR)/include

Make expands variable lazily, so the ALL_CFLAGS expansion only happens at the point of use, where all of the CFLAGS definitions have been made.

Dave
Previous: Morten WelinderNext: Junio C Hamano
Message 2 of 6 in “CFLAGS usage”
  1. Morten WelinderNov 4, 2005
  2. David BrownNov 4, 2005
  3. Junio C HamanoNov 4, 2005
  4. David BrownNov 4, 2005
  5. Junio C HamanoNov 4, 2005
  6. Simplify CFLAGS/DEFINES in MakefileJunio C Hamano, Nov 5, 2005

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.