Work around what looks like a bad make(1) bug. For some reason,

make(1) wants to build loader.sym *before* the .o files.  Eliminating
one seeminly intermediate step avoids the problem.  Somehow, it seems
that variables are not getting expanded at the right time.
Any explanations would be appreciated...

Changing:
${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o
	${LD} ...
To:
BASEOBJS= ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o

${BASE}.sym: ${BASEOBJS}
	echo ${BASEOBJS}
	${LD} ...
.. the echo only shows LIBFICL, CRT and vers.o. ${OBJS} is not included.
This commit is contained in:
Peter Wemm 2001-06-16 06:28:07 +00:00
parent 84982751aa
commit b62ddc1363

View File

@ -40,20 +40,18 @@ CRT= start.o
STRIP=
BINDIR?= /boot
all: ${BASE}
all: ${BASE} ${BASE}.help
vers.o: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
${CC} -c vers.c
${BASE}: ${BASE}.sym ${BASE}.help
objcopy -O binary ${BASE}.sym ${BASE}
${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o
${BASE}: ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o
${LD} -o ${BASE}.sym -M -e start -N -Ttext ${LOAD_ADDRESS} \
${CRT} ${OBJS} vers.o \
-L${DESTDIR}${LIBDIR} ${LIBSTAND} ${LIBALPHA} ${LIBFICL} ${LIBSTAND} \
>${.OBJDIR}/${BASE}.list
objcopy -O binary ${BASE}.sym ${BASE}
CLEANFILES+= ${BASE}.help
${BASE}.help: help.common help.alpha