Subject: make dependencies for ".BEGIN"
To: None <>
From: Chuck Silvers <>
List: tech-toolchain
Date: 04/30/2005 16:37:29
I've noticed for a long time now that " -j 8 release" on i386
usually dies in the middle with errors like:

--- dependall-ne2000_isa ---
ln -s /build/obj/build/src/sys/arch/i386/stand/netboot/lib .
--- dependall-3c90xb ---
--- __always_make_zlib ---
--- dependall-ne2000_isa ---
[ -d /build/obj/build/src/sys/arch/i386/stand/netboot/lib ] || mkdir /build/obj/build/src/sys/arch/i386/stand/netboot/lib
--- dependall-pcnet_isapnp ---
--- lib ---
ln: ./lib: File exists
--- dependall-ne2000_isa ---
--- __always_make_kernlib ---
--- dependall-3c590 ---
--- netif_small.o ---
--- dependall-pcnet_isapnp ---
*** [lib] Error code 1

more recently I noticed that this problem is described by these PRs:

9566	.BEGIN target does not follow dependencies
9567	.BEGIN targets use depencencies

so should we apply the changes from the PRs, or does someone want to change
make to actually process dependencies of .BEGIN?

here's the list of makefiles under sys/arch that have this problem:

./arc/stand/boot/Makefile:.BEGIN: machine mips
./evbarm/stand/gzboot/Makefile.gzboot:.BEGIN: machine
./hp700/stand/ machine hp700 hppa
./i386/stand/boot/Makefile.boot:.BEGIN: machine x86 lib
./i386/stand/bootxx/Makefile.bootxx:.BEGIN: machine x86 lib
./i386/stand/mbr/Makefile.mbr:.BEGIN: machine x86
./i386/stand/Makefile.booters:.BEGIN: machine x86 lib
./mvme68k/stand/installboot/Makefile:.BEGIN: machine
./news68k/stand/boot/Makefile:.BEGIN: machine m68k
./news68k/stand/bootxx/Makefile:.BEGIN: machine m68k
./prep/stand/boot/Makefile:.BEGIN: machine powerpc
./sun68k/stand/ machine m68k sun68k

I see that at least one of the instances mentioned in the PR,
pmax/stand/Makefile.booters, has been fixed differently than the PR suggests.
it would be good to be consistent with this.

if we opt to leave .BEGIN the way it is now and not process its dependencies,
can we at least make it an error to specify dependencies for .BEGIN?