fix #H4287 - inconsistent handling of CPPFLAGS

[Subject should mention Unix, but would exceed 50 characters.]

Explicit build rules ignore $(CPPFLAGS), but the implicit C rule
(at least in GNU make) specifies it.  If user has a value for this
in the environment, that value would apply to building some source
files but not others.  This patch gives it an explicit empty value,
so building via implicit rule should expand it to nothing and match
the fact that it's omitted from explicit rules.

There was one C++ file which relied on the implicit C++ rule.  I've
added it to the files processed by 'make depend' and re-run that.
It now will get built via an explicit rule.

Also, a small amount of reformatting for HACKCSRC.
This commit is contained in:
PatR
2016-04-01 16:49:49 -07:00
parent dc9b6dc43d
commit d63ff7700d
3 changed files with 29 additions and 11 deletions

View File

@@ -221,6 +221,9 @@ unix: options file with CR+LF line ends and an invalid option line resulted in
unix: race condition with parallel make: src/Makefile might start building
makedefs before finishing monst.o and objects.o; if so, util/Makefile
can build them too, and they might be clobbered by simultaneous write
unix: Makefile.{src,utl} ignored CPPFLAGS which is expanded by the default .c
rule by GNU make so if user had a value for that in the environment,
it would apply to some files but not others; explicitly override it
win32gui: getversionstring() was overflowing the provided Help About buffer
win32gui: guard against buffer overflow in in mswin_getlin()
win32gui: handle menu_color attribute