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

Re: contrib/credential/osxkeychain: Makefile should allow to set CFLAGS

From
Junio C Hamano <gitster@pobox.com>
Date
May 22, 2012, 21:00 UTC
Message-ID
<7vtxz82ap6.fsf@alter.siamese.dyndns.org>
In-Reply-To
<AB628C35-FEC2-4425-B3D8-EEC7F8D6A66B@samueljohn.de>
Samuel John <mail@samueljohn.de> writes:
Show 14 quoted lines
> Hi there,
>
> the contrib/credential/osxkeychain/Makefile goes like this
>
>> CC = gcc
>> RM = rm -f
>> CFLAGS = -g -Wall
>> 
>> git-credential-osxkeychain: git-credential-osxkeychain.o
>> 	$(CC) -o $@ $< -Wl,-framework -Wl,Security
>
> and does not allow me to pass CFLAGS to build git-credential-osxkeychain.o.
> My hack is to call: make CC="$CC $CFLAGS"
> That is ugly.
Yeah, that is ugly.

It however seems to me that git-credential-osxkeychain.o does honor $(CFLAGS), either from the user "make CFLAGS=..." or the default the Makefile in question supplies.

The line you quoted is not using $(CC) as the compiler, but is using it to link the final build product. It may not hurt to have $(CFLAGS) on that line, but shouldn't the line also have $(LDFLAGS) on it?

Previous: Samuel JohnNext: Jeff King
Message 2 of 5 in “contrib/credential/osxkeychain: Makefile should allow to set CFLAGS”
  1. Samuel JohnMay 22, 2012
  2. Junio C HamanoMay 22, 2012
  3. Jeff KingMay 23, 2012
  4. Junio C HamanoMay 24, 2012
  5. Jeff KingMay 24, 2012

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.