Fix the way this checks the object files so it works correctly with make -j

This commit is contained in:
jmc 2004-11-29 15:19:26 +00:00
parent f9bdf3cd08
commit 355c871f88
1 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 2004/11/07 21:58:45 christos Exp $
# $NetBSD: Makefile,v 1.4 2004/11/29 15:19:26 jmc Exp $
PROG= xxboot
SRCS= start.S main.c readufs.c readufs_ffs.c readufs_lfs.c milli_tiny.S
@ -26,7 +26,7 @@ LIBCRT0=
LIBCRTEND=
LIBC=
${PROG}: iplsum
${PROG}: iplsum ${OBJS}
${LD} -Ttext 0 -Tdata 0 -e '$$START$$' -N -o $@1 $(OBJS)
${LD} -Ttext 0x100 -Tdata 0x23456780 -e '$$START$$' -N -o $@2 $(OBJS)
${SIZE} $@1
@ -58,6 +58,8 @@ CLEANFILES+= ${SRCS:M*.c:S/.c$/.o.S/}
# are relative to $global$.
.c.o:
${CC} ${CFLAGS} ${CPPFLAGS} -o $@.S -S ${.IMPSRC}
@grep -i 'ldil' $@.S | egrep -v "ldil L'-?[0-9]*," || exit 0; \
echo 'found non-relocatable code' >&2; exit 1
grep -i 'ldil' $@.S | egrep -v "ldil L'-?[0-9]*," > /dev/null 2>&1; \
if [ $$? = 0 ]; then \
echo 'found non-relocatable code' >&2 && exit 1; \
fi
sed -e 's/\.text/.data/' $@.S | ${AS} -o ${.TARGET}