Then there's also bootblk.text: not required by bootblk, not installed and only used with Sun's fakeboot in a target that cannot work:
$ make -n fake ([ -h machine ] || ln -s /home/kn/src/sys/arch/sparc64/stand/bootblk/../../include machine) ../fakeboot/fakeboot -elf32 <bootblk >/bootblk ../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text ksh(1) explains and a quick demo confirms this: Input/output redirection [...] > file [...] Note that this means the command cmd < foo > foo will open foo for reading and then truncate it when it opens it for writing, before cmd gets a chance to actually read foo. $ cat foo foo $ cat < foo > foo $ du foo 0 NetBSD still has the same Makefile bits; I never had access to fakeboot and thus can't judge its usefulness (today), but I'm pretty sure the current target can't work. Is anyone still using this or can it go? Diff on top of the previous. diff --git a/sys/arch/sparc64/stand/bootblk/Makefile b/sys/arch/sparc64/stand/bootblk/Makefile index f544c6508ed..851b0484df3 100644 --- a/sys/arch/sparc64/stand/bootblk/Makefile +++ b/sys/arch/sparc64/stand/bootblk/Makefile @@ -8,8 +8,7 @@ S= ${CURDIR}/../../../.. # Override normal settings # -CLEANFILES= machine ffs.fth.h \ - bootblk.text bootblk.text.tmp -.d +CLEANFILES= machine ffs.fth.h -.d PROG= bootblk SRCS= @@ -26,27 +25,12 @@ CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} @([ -h machine ] || ln -s ${.CURDIR}/../../include machine) .endif -all: bootblk.text - ffs.fth.h: ${.CURDIR}/genassym.sh genfth.cf sh ${.CURDIR}/genassym.sh -f ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \ < ${.CURDIR}/genfth.cf >ffs.fth.h.tmp && \ mv -f ffs.fth.h.tmp ffs.fth.h -bootblk.text: bootblk.fth ffs.fth.h - awk '/fload/ { print "#include \"" $$2 "\"" }; !/fload/' \ - ${.CURDIR}/bootblk.fth | /usr/bin/cpp -P > bootblk.text.tmp && \ - mv -f bootblk.text.tmp bootblk.text - bootblk: bootblk.fth ffs.fth.h fgen -o bootblk ${.CURDIR}/bootblk.fth -# -# The following are if you grab the fakeboot program from the Sun website -# - -fake: bootblk bootblk.text - ../fakeboot/fakeboot -elf32 <bootblk >/bootblk - ../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text - .include <bsd.prog.mk>