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

Re: [PATCH] Avoid rebuilding everything if user changes CFLAGS on the make command line

From
Junio C Hamano <junkio@cox.net>
Date
Mar 7, 2007, 18:01 UTC
Message-ID
<7vd53lexw5.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<45EEC122.EA43CB72@eudaptics.com>
Johannes Sixt <J.Sixt@eudaptics.com> writes:
> IMHO, the value of $(CFLAGS) (which the Makefile declares as "for the
> users to override from the command line") should never take part in this
> build-flags-change-autodetection.

This on the surface looks nicer than the other Johannes's approach, but I have reservations. The user can always say "make CFLAGS=-DNO_SYNLINK_HEAD=NoThanks" from the command line to affect the behaviour, and in such a case this approach breaks.

As long as you declare CFLAGS is there for users to override only the way the programs are compiled (e.g. optimization) and it is forbidden to use CFLAGS to affect the way the programs are to behave (iow, "use of -D<FEATURE> in CFLAGS is forbidden"), it would be Ok, but in effect it is forcing people to modify config.mak even for "try out this configuration just this time, one-shot" compilation, which makes me somewhat unhappy.

IGNORE_GIT_CFLAGS looks much uglier, but is much nicer from design standpoint. At least the user declares "I know what I am doing, and I assume full responsibility". That might be less confusing in the end.

Undecided.
Previous: Johannes Sixt
Message 5 of 5 in “Makefile: do not optimize when DEBUG=1”
  1. Makefile: do not optimize when DEBUG=1Johannes Schindelin, Mar 6, 2007
  2. Johannes SixtMar 7, 2007
  3. Johannes SchindelinMar 7, 2007
  4. Avoid rebuilding everything if user changes CFLAGS on the make command lineJohannes Sixt, Mar 7, 2007
  5. Junio C HamanoMar 7, 2007

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.