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
This commit is contained in:
parent
d341401653
commit
8f4d049b27
@ -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
|
||||
|
@ -255,10 +255,16 @@ lint: ${SRCS:M*.c}
|
||||
.if !exists(${.OBJDIR}/${DEPENDFILE})
|
||||
.if defined(LIB) && !empty(LIB)
|
||||
${OBJS} ${STATICOBJS} ${POBJS}: ${SRCS:M*.h}
|
||||
.for _S in ${SRCS:N*.[hly]}
|
||||
${_S:R}.po: ${_S}
|
||||
.endfor
|
||||
.endif
|
||||
.if defined(SHLIB_NAME) || \
|
||||
defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
|
||||
${SOBJS}: ${SRCS:M*.h}
|
||||
.for _S in ${SRCS:N*.[hly]}
|
||||
${_S:R}.So: ${_S}
|
||||
.endfor
|
||||
.endif
|
||||
.endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user