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).
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).