Bug 4155 - TOOLS_CFLAGS can't be customised
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: unspecified
Hardware: PC Linux
: P3 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2009-06-28 11:42 EDT by Ben Millwood
Modified: 2009-09-14 21:36:28 EDT
1 user (show)

See Also:


Attachments
+= instead of = (976 bytes, patch)
2009-06-28 11:42 EDT, Ben Millwood

Description Ben Millwood 2009-06-28 11:42:26 EDT
Created attachment 2084 [details]
+= instead of =

In order to make ccache work with ioq3/Tremulous, I needed to set cflags for all compiles, so I made a Makefile.local to fiddle with CFLAGS and TOOLS_CFLAGS. The CFLAGS worked fine, they were added to the beginning of the options without problem, but the TOOLS_CFLAGS that I set in the environment or Makefile.local were discarded. I have to override the variable entirely if I want to make changes.

The following patch makes no change unless TOOLS_CFLAGS is defined in the environment or by Makefile.local, in which case it appends the default set to the variable instead of replacing it with them. As an aside, I believe this may fix the addition of -DMACOS_X to the tools compilation, which previously was done earlier in the Makefile and hence overriden (this is not a real bug since the define is not used in any functionally-critical way in the tools).
Comment 1 Ryan C. Gordon 2009-09-14 21:36:28 EDT
Fixed in svn revision #1606.

--ryan.