summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.dep.mk
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-01-17 18:51:55 +0000
committerru <ru@FreeBSD.org>2004-01-17 18:51:55 +0000
commitc12dfd0f16123c27a24126a9bff6922b0a9d5319 (patch)
tree6e991d771e9311bf2247bb29a004205e0334a437 /share/mk/bsd.dep.mk
parent59924af79390567bccdbe659a3399964a249e59c (diff)
downloadFreeBSD-src-c12dfd0f16123c27a24126a9bff6922b0a9d5319.zip
FreeBSD-src-c12dfd0f16123c27a24126a9bff6922b0a9d5319.tar.gz
Guess better the source for object files in case .depend file is
missing and there are multiple choices using multiple inference (suffix transformation) rules. This is known to fix compilation of s_log1p.o in lib/msun on i386, as otherwise it attempted to use s_log1p.S as the source (which is marked broken) instead of legal s_log1p.c which is in CFLAGS. The normal case where .depend file exists is not affected. Reviewed by: bde
Diffstat (limited to 'share/mk/bsd.dep.mk')
-rw-r--r--share/mk/bsd.dep.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index 228dc89..aac8337 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -72,10 +72,19 @@ tags: ${SRCS}
.if defined(SRCS)
CLEANFILES?=
+.if !exists(${.OBJDIR}/${DEPENDFILE})
+.for _S in ${SRCS:N*.[hly]}
+${_S:R}.o: ${_S}
+.endfor
+.endif
+
.for _LSRC in ${SRCS:M*.l:N*/*}
.for _LC in ${_LSRC:R}.c
${_LC}: ${_LSRC}
${LEX} -t ${LFLAGS} ${.ALLSRC} > ${.TARGET}
+.if !exists(${.OBJDIR}/${DEPENDFILE})
+${_LC:R}.o: ${_LC}
+.endif
SRCS:= ${SRCS:S/${_LSRC}/${_LC}/}
CLEANFILES+= ${_LC}
.endfor
@@ -103,6 +112,9 @@ CLEANFILES+= ${_YH}
${_YC}: ${_YSRC}
${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC}
.endif
+.if !exists(${.OBJDIR}/${DEPENDFILE})
+${_YC:R}.o: ${_YC}
+.endif
.endfor
.endfor
.endif
OpenPOWER on IntegriCloud