Deal brute-force with parallelism. In order to accomodate breaking the

build in the middle and restarting on another platform (requiring atomic
host tool builds), and keep parallelism, the ".lo" rules can't be used
at all.  Instead, compile all host .c files directly into executables.
This commit is contained in:
tv 2001-10-08 22:56:31 +00:00
parent 59ba87fb54
commit c88b6a3e03
1 changed files with 7 additions and 19 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 2001/07/24 21:16:08 tv Exp $
# $NetBSD: Makefile,v 1.4 2001/10/08 22:56:31 tv Exp $
LIB= backend
MKLINT= no
@ -19,7 +19,8 @@ HOST_CPPFLAGS+= -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
CLEANFILES+= gengenrtl genrtl.c genrtl.h \
gencheck tree-check.h
genrtl.c genrtl.h: gengenrtl.c
genrtl.c: genrtl.h
genrtl.h: gengenrtl.c
${HOST_LINK.c} -o gengenrtl $>
./gengenrtl genrtl.h genrtl.c
@ -27,31 +28,18 @@ tree-check.h: gencheck.c
${HOST_LINK.c} -o gencheck $>
./gencheck >$@
# Programs which depend on common sources. The ${MAKE} dance
# ensures that these programs regen their object files
# whenever they are needed (so a build can be restarted on
# another platform if desired).
LOFILES= obstack.lo ${G_HOST_RTL:.o=.lo} ${G_HOST_PRINT:.o=.lo}
lofiles: ${LOFILES}
.if !target(.BEGIN) && !make(lofiles)
.BEGIN:
@rm -f ${LOFILES}
.endif
.for f in attr.h attrtab.c codes.h config.h emit.c extract.c \
flags.h opinit.c peep.c output.c recog.c
CLEANFILES+= gen${f:R} insn-${f}
insn-${f}: genrtl.h gen${f:R}.c ${G_md_file}
@cd ${.CURDIR} && ${MAKE} lofiles
${HOST_LINK.c} -o gen${f:R} ${>:M*.c} ${LOFILES}
insn-${f}: genrtl.h gen${f:R}.c obstack.c ${G_md_file} \
${G_HOST_RTL:.o=.c} ${G_HOST_PRINT:.o=.c}
${HOST_LINK.c} -o gen${f:R} ${>:M*.c}
./gen${f:R} ${G_md_file} >$@
.endfor
insn-attrtab.c: ${G_HOST_RTLANAL:.o=.c}
insn-extract.c: insn-config.h
insn-attrtab.c insn-extract.c: insn-config.h
${OBJS} .depend: insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h
.PATH: ${DIST}/gcc ${DIST}/libiberty ${G_out_file:H}