From: Junio C Hamano Date: Tue, 22 May 2012 21:00:05 GMT Subject: Re: contrib/credential/osxkeychain: Makefile should allow to set CFLAGS Message-ID: <7vtxz82ap6.fsf@alter.siamese.dyndns.org> In-Reply-To: Samuel John writes: > 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?