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

Conditionally define vars to improve portability

From
Renato Botelho <garga@freebsd.org>
Date
Sep 7, 2015, 17:51 UTC
Message-ID
<81961DE1-FA30-4E55-8818-9FCA3BC59B81@FreeBSD.org>
Default variables used to build are set using = on Makefile, (e.g. CC, INSTALL, CFLAGS, …). GNU make overwrite these values if it’s passed as an argument (make CC=clang) and it works as expected.
Default method of passing arguments for make operations on FreeBSD ports tree is using environment variables instead of make arguments, then we have CC set on env before call gmake. Today these values are ignored by git Makefile, and we ended up patching Makefile replacing = by ?= on variable assignments [1].
Before I write a patch and submit I would like to check if it would be an acceptable change of if it’s something you won’t accept for any reason.
Regards

[1] https://svnweb.freebsd.org/ports/head/devel/git/files/patch-Makefile?revision=396048&view=markup#l7 -- Renato Botelho

Next: Jeff King
Message 1 of 5 in “Conditionally define vars to improve portability”
  1. Renato BotelhoSep 7, 2015
  2. Jeff KingSep 8, 2015
  3. Renato BotelhoSep 8, 2015
  4. Junio C HamanoSep 8, 2015
  5. Jacob KellerSep 8, 2015

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.