Use per-target temp files, rather than sharing the same ones.

Fixes parallel build problem noted by Bill Sommerfeld.
This commit is contained in:
lukem 2002-05-05 14:37:38 +00:00
parent da5192b2fe
commit 9fd667b2c2

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.7 2002/05/02 18:02:33 lukem Exp $
# $NetBSD: Makefile,v 1.8 2002/05/05 14:37:38 lukem Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@ -15,25 +15,25 @@ TARGETS= IQ80310 IQ80310 0x00080000 netbsd \
.for K G R W in ${TARGETS} # {
GZB${G}DIR!= cd ${.CURDIR}/../gzboot_${G}_flash_${R} && ${PRINTOBJDIR}
GZB${G}= ${GZB${K}DIR}/gzboot_${G}_${R}.sym
GZB${G}= ${GZB${G}DIR}/gzboot_${G}_${R}.sym
GZIMGS+= gzimg_${G}_flash_${R}.gz
gzimg_${G}_flash_${R}.gz: .NOTMAIN ${GZB${G}} ${KERNOBJDIR}/${K}/${W}.bin
@echo "Populating ${.TARGET}"
cp ${KERNOBJDIR}/${K}/${W}.bin netbsd.tmp
gzip -9f netbsd.tmp
cp ${GZB${G}} gzboot.sym
${MDSETIMAGE} -v -s gzboot.sym netbsd.tmp.gz
${OBJCOPY} -O binary gzboot.sym gzboot.bin
gzip -9f gzboot.bin
mv gzboot.bin.gz ${.TARGET}
rm gzboot.sym netbsd.tmp.gz
cp ${KERNOBJDIR}/${K}/${W}.bin ${.TARGET:R}.kern
gzip -9f ${.TARGET:R}.kern
cp ${GZB${G}} ${.TARGET:R}
${MDSETIMAGE} -v -s ${.TARGET:R} ${.TARGET:R}.kern.gz
${OBJCOPY} -O binary ${.TARGET:R} ${.TARGET:R}
gzip -9f ${.TARGET:R}
CLEANFILES+= gzimg_${G}_flash_${R}.kern gzimg_${G}_flash_${R}.kern.gz \
gzimg_${G}_flash_${R}
.endfor # }
CLEANFILES+= netbsd.tmp netbsd.tmp.gz gzboot.sym \
gzboot.bin gzboot.bin.gz ${GZIMGS}
CLEANFILES+= ${GZIMGS}
realall: ${GZIMGS}