C Why doesn't sys.mk honour CPPFLAGS?

When fiddling with a pet project I noticed that the file containing implicit make rules, /usr/share/mk/sys.mk, doesn't use CPPFLAGS at all (nor do any of the other files in that directory, for that matter). Surely it's easy enough to add this (i.e. the implicit rule would become what's written below), so there must be a pressing reason why it's not done. Does anyone know?
Code:
.c.o:
        ${CC} ${CFLAGS} [highlight]${CPPFLAGS}[/highlight] -c ${.IMPSRC}
        ${CTFCONVERT_CMD}
 
The only file which contains CPPFLAGS is /usr/share/mk/bsd.progs.mk.

From bsd.README:
Code:
There are two main types of make include files.  One type is the generally
usable make include files, such as bsd.prog.mk and bsd.lib.mk.  The other is
the internal make include files, such as bsd.files.mk and bsd.man.mk, which
can not/should not be used directly but are used by the other make include
files.  In most cases it is only interesting to include bsd.prog.mk or
bsd.lib.mk.
Could this be of any help?
 
On my system none of the files in /usr/share/mk contain CPPFLAGS. May I ask what version you're on?

Sure:
Code:
#uname -a
FreeBSD Jarvis.my.domain 10.1-STABLE FreeBSD 10.1-STABLE #0 r274707: Wed Nov 19 14:38:28 CET 2014  luca@Jarvis.my.domain:/usr/obj/usr/src/sys/JARVIS  amd64
This system was "born" as a 10-RELEASE. Every time I recompile the system I usually do a make delete-old and a make delete-old-libs, so I think all files in /usr/share/mk are up-to-date.

Just to be sure, I compared my bsd.progs.mk with this (see line #46) and they are identical.

I hope this is what you're looking for.
 
Just to be sure, I compared my bsd.progs.mk with this (see line #46) and they are identical.

I hope this is what you're looking for.
It would seem that something changed somewhere between FreeBSD 9 and 10, so it does help somewhat. Thanks.
 
Well, originally my system was a 9.x-STABLE upgraded to 10.0-STABLE using sources, but I remember that there was always something that was not right. In the end I decided to do a fresh 10-RELEASE install. To be totally honest, at the same time I've switched from UFS to ZFS, so maybe the source of my problems was not in the system but in my actions.
 
Back
Top