Support reading in .depend files.

This is for an upcoming change that fixes .depend handling in here.
It will cause some duplicate sources which need to be trimmed out.

MFC after:	2 weeks
Sponsored by:	DellEMC
This commit is contained in:
Bryan Drewery 2019-06-15 17:08:32 +00:00
parent 9e0a1e78e5
commit dcf1f83876
4 changed files with 16 additions and 15 deletions

View File

@ -49,23 +49,23 @@ CLEANFILES= ${OBJS} ${SOBJS} ${TGTOBJS}
crtbegin.o: ${BEGINSRC}
${CC} ${CFLAGS} -g0 -DCRT_BEGIN \
-c -o ${.TARGET} ${.ALLSRC:N*.h}
-c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
crtbeginT.o: ${BEGINSRC}
${CC} ${CFLAGS} -g0 -DCRT_BEGIN -DCRTSTUFFT_O \
-c -o ${.TARGET} ${.ALLSRC:N*.h}
-c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
crtbeginS.o: ${BEGINSRC}
${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \
-c -o ${.TARGET} ${.ALLSRC:N*.h}
-c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
crtend.o: ${ENDSRC}
${CC} ${CFLAGS} -g0 -DCRT_END \
-c -o ${.TARGET} ${.ALLSRC:N*.h}
-c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
crtendS.o: ${ENDSRC}
${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \
-c -o ${.TARGET} ${.ALLSRC:N*.h}
-c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
COMMONHDRS+= tm.h tconfig.h options.h
CLEANFILES+= ${COMMONHDRS} optionlist cs-tconfig.h cs-tm.h

View File

@ -224,11 +224,11 @@ ${T}_OBJS_S = ${${T}_FUNCS:S/$/.pico/}
SOBJS += ${${T}_FUNCS:S/$/.pico/}
${${T}_OBJS_T}: ${${T}_CFILE} ${COMMONHDRS}
${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
${CC_T} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
${${T}_OBJS_P}: ${${T}_CFILE} ${COMMONHDRS}
${CC_P} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
${CC_P} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
${${T}_OBJS_S}: ${${T}_CFILE} ${COMMONHDRS}
${CC_S} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
${CC_S} ${${T}_CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
.endfor
#-----------------------------------------------------------------------
@ -249,9 +249,9 @@ STAT_OBJS_P = ${SYMS_ST:S/$/.po/}
STATICOBJS = ${SYMS_ST:S/$/.o/}
${STAT_OBJS_T}: ${STD_CFILE} ${COMMONHDRS}
${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
${STAT_OBJS_P}: ${STD_CFILE} ${COMMONHDRS}
${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
#-----------------------------------------------------------------------
#

View File

@ -51,16 +51,16 @@ CLEANFILES+= ${COMMONHDRS} cs-tm.h cs-tconfig.h options.h optionlist
${OBJS} beforedepend: ${COMMONHDRS}
${OBJS_T}: libgcov.c
${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
.if !defined(NO_PIC)
${OBJS_S}: libgcov.c
${CC_S} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
${CC_S} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
.endif
.if ${MK_PROFILE} != "no"
${OBJS_P}: libgcov.c
${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c:[1]}
.endif
.include <bsd.lib.mk>

View File

@ -22,10 +22,11 @@ crtend.o: crtend.c
crtendS.o: crtend.c
crtbegin.o crtend.o crtbeginT.o:
${CC} ${CFLAGS} -I${.CURDIR} -c -o ${.TARGET} ${.ALLSRC}
${CC} ${CFLAGS} -I${.CURDIR} -c -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
crtbeginS.o crtendS.o:
${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o ${.TARGET} ${.ALLSRC}
${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o ${.TARGET} \
${.ALLSRC:N*.h:[1]}
.endif