From: Renato Botelho Date: Tue, 08 Sep 2015 08:19:19 GMT Subject: Re: Conditionally define vars to improve portability Message-ID: <36F51AF9-44A7-492B-9EFA-79962B79ADC4@FreeBSD.org> In-Reply-To: <20150908063034.GF26331@sigill.intra.peff.net> > On Sep 8, 2015, at 03:30, Jeff King wrote: > > On Mon, Sep 07, 2015 at 02:51:42PM -0300, Renato Botelho wrote: > >> 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]. > > Hmm. I can't really think of a downside to doing so, unless we expect > users to have things like CC set in the environment and _not_ want them > to bleed through to our build. > > But doesn't "gmake -e" solve your problem without a patch? Good idea, let me try it… :) -- Renato Botelho