Make some rules reentrant, and mark the onces that cannot be.

This commit is contained in:
Poul-Henning Kamp 1996-05-09 13:01:44 +00:00
parent 31d4757546
commit 4a6a373a1c
2 changed files with 38 additions and 32 deletions

View File

@ -1,5 +1,5 @@
# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
# $Id: bsd.lib.mk,v 1.30 1996/03/24 00:21:04 wosch Exp $
# $Id: bsd.lib.mk,v 1.31 1996/04/21 17:45:38 jdp Exp $
#
.if exists(${.CURDIR}/../Makefile.inc)
@ -33,66 +33,66 @@ STRIP?= -s
.c.o:
${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -x -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.c.po:
${CC} -p ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -X -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.c.so:
${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -x -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.cc.o .cxx.o .C.o:
${CXX} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -x -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.cc.po .C.po .cxx.o:
${CXX} -p ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -X -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.cc.so .C.so:
${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -x -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.f.o:
${FC} ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
@${LD} -x -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.f.po:
${FC} -p ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
@${LD} -X -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.f.so:
${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
@${LD} -x -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.s.o:
${CPP} -E ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \
${AS} -o ${.TARGET}
@${LD} -x -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.s.po:
${CPP} -E -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \
${AS} -o ${.TARGET}
@${LD} -X -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.s.so:
${CPP} -E -DPIC ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \
${AS} -k -o ${.TARGET}
@${LD} -x -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.S.o:
${CPP} -E ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \
@ -105,18 +105,18 @@ STRIP?= -s
.S.so:
${CPP} -E -DPIC ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \
${AS} -k -o ${.TARGET}
@${LD} -x -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.m.po:
${CC} ${CFLAGS} -p -c ${.IMPSRC} -o ${.TARGET}
@${LD} -X -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.m.o:
${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -X -r ${.TARGET}
@mv a.out ${.TARGET}
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
@mv ${.TARGET}.tmp ${.TARGET}
.if !defined(INTERNALLIB) || defined(INTERNALSTATICLIB)
.if !defined(NOPROFILE) && !defined(INTERNALLIB)

View File

@ -1,5 +1,5 @@
# from: @(#)sys.mk 8.2 (Berkeley) 3/21/94
# $Id: sys.mk,v 1.11 1995/10/21 12:46:02 bde Exp $
# $Id: sys.mk,v 1.12 1996/03/24 00:02:38 wosch Exp $
unix ?= We run FreeBSD, not UNIX.
@ -89,20 +89,24 @@ YFLAGS ?= -d
.s.o:
${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC}
# XXX not -j safe
.y.o:
${YACC} ${YFLAGS} ${.IMPSRC}
${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET}
rm -f y.tab.c
# XXX not -j safe
.l.o:
${LEX} ${LFLAGS} ${.IMPSRC}
${CC} ${CFLAGS} -c lex.yy.c -o ${.TARGET}
rm -f lex.yy.c
# XXX not -j safe
.y.c:
${YACC} ${YFLAGS} ${.IMPSRC}
mv y.tab.c ${.TARGET}
# XXX not -j safe
.l.c:
${LEX} ${LFLAGS} ${.IMPSRC}
mv lex.yy.c ${.TARGET}
@ -115,11 +119,13 @@ YFLAGS ?= -d
${LDLIBS} -o ${.TARGET}
rm -f ${.PREFIX}.o
# XXX not -j safe
.y.out:
${YACC} ${YFLAGS} ${.IMPSRC}
${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET}
rm -f y.tab.c
# XXX not -j safe
.l.out:
${LEX} ${LFLAGS} ${.IMPSRC}
${CC} ${CFLAGS} ${LDFLAGS} lex.yy.c ${LDLIBS} -ll -o ${.TARGET}