1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-01 08:27:59 +00:00

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:
Ruslan Ermilov 2004-01-17 18:51:55 +00:00
parent a2cd4a0de6
commit 6b14fdfa52
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=124637
2 changed files with 18 additions and 0 deletions

View File

@ -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

View File

@ -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