mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-26 11:47:31 +00:00
d6b837de97
bsd.prog.mk and bsd.lib.mk already make OBJS depend on headers when there is not .OBJDIR/.depend file, which is still true for the initial meta mode builds. If there was something to benefit the meta mode build here then it should be extended to the non-meta mode build as well. Some of the problems here were just DPSRCS being hooked up wrongly, fixed in r291330. The logic itself is flawed as 'buildfiles' is in a different part of the dependency tree than the objects and headers are, so the objects will still be built independent from 'buildfiles'. 'buildfiles' is not ordered in the build before objects. Sponsored by: EMC / Isilon Storage Division
26 lines
558 B
Makefile
26 lines
558 B
Makefile
# $FreeBSD$
|
|
|
|
.if ${.MAKE.DEPENDFILE:M*.${MACHINE}} == ""
|
|
# by default only MACHINE0 does updates
|
|
UPDATE_DEPENDFILE_MACHINE?= ${MACHINE0}
|
|
.if ${MACHINE} != ${UPDATE_DEPENDFILE_MACHINE}
|
|
UPDATE_DEPENDFILE= no
|
|
.endif
|
|
.endif
|
|
|
|
CFLAGS+= ${CFLAGS_LAST}
|
|
CXXFLAGS+= ${CXXFLAGS_LAST}
|
|
LDFLAGS+= ${LDFLAGS_LAST}
|
|
|
|
CLEANFILES+= .depend
|
|
|
|
# handy for debugging
|
|
.SUFFIXES: .S .c .cc .cpp .cpp-out
|
|
|
|
|
|
.S.cpp-out .c.cpp-out: .NOMETA
|
|
@${CC} -E ${CFLAGS} ${.IMPSRC} | grep -v '^[[:space:]]*$$'
|
|
|
|
.cc.cpp-out: .NOMETA
|
|
@${CXX} -E ${CXXFLAGS} ${.IMPSRC} | grep -v '^[[:space:]]*$$'
|