<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Committed in r189372. Thanks, Steve!</div><div><br></div><br><div><div>On Aug 27, 2013, at 9:41 , Steve McCoy <<a href="mailto:mccoyst@gmail.com">mccoyst@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Yeah, make doesn't treat environment variables in the same way as it does override arguments. Here's a short example:<div><br></div><div>% cat makefile</div><div><div>CC := clang</div><div>all:</div>
<div><span class="" style="white-space:pre">    </span>@echo $(CC)</div></div><div>% make<br></div><div><div>clang</div><div>% CC=gcc make</div><div>clang</div><div>% make CC=gcc</div><div>gcc</div></div><div><br></div><div>
<br></div><div>More details: <a href="http://www.gnu.org/software/make/manual/html_node/Overriding.html">http://www.gnu.org/software/make/manual/html_node/Overriding.html</a><br></div><div><br></div><div>I've attached a patch. Let me know if you need anything else!</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 27, 2013 at 11:21 AM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hm, interesting. I think that's cause we do set CC in the environment, and usually that's good enough to get picked up by the Makefile. Is that not happening in your case?<br>

<br>
If it's the right thing to do, please send a patch to invert the logic here, so that we check for make before checking for IgnoreErrors.<br>
<br>
Thanks!<br>
Jordan<br>
<div class="im"><br>
<br>
On Aug 26, 2013, at 10:32 , Steve McCoy <<a href="mailto:mccoyst@gmail.com">mccoyst@gmail.com</a>> wrote:<br>
<br>
> I was having some trouble getting scan-build to scan my C code when running make, so I looked into the perl and saw that I need to pass the -k flag to scan-build to override the CC variable. Is this the intended behavior? The docs make it sound like -k is just there for convenience, but none of the examples with make show manually overriding CC when not passing -k. This is happening with checker-275, but the version in svn has identical logic around 'AddIfNotPresent($Args, "CC=$CCAnalyzer");'<br>

><br>
> Thanks for any help!<br>
</div>> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote></div><br></div>
</blockquote></div></body></html>