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?