Subject: toolchain/31082: [PATCH] parallel build fix for src/tools/Makefile
To: None <toolchain-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <fun@naobsd.org>
List: netbsd-bugs
Date: 08/28/2005 06:39:00
>Number:         31082
>Category:       toolchain
>Synopsis:       [PATCH] parallel build fix for src/tools/Makefile
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 28 06:39:00 +0000 2005
>Originator:     FUKAUMI Naoki
>Release:        NetBSD 3.99.7
>Organization:
	FUKAUMI Naoki
>Environment:
System: NetBSD gigalandisk.naobsd.org 3.99.7 NetBSD 3.99.7 (GIGALANDISK) #0: Tue Aug 16 23:35:55 JST 2005 root@turion64.naobsd.org:/usr/obj/gigalandisk/sys/arch/gigalandisk/compile/GIGALANDISK gigalandisk
Architecture: arm
Machine: gigalandisk
>Description:
	disklabel.h and related header files for tools are installed at
	"make beforedepend" stage in src/tools/disklabel. These files
	are also used by (at least) fdisk and installboot.

	When parallel building, compiling fdisk and/or installboot are
	started BEFORE end of "make beforedepend" of disklabel, then get
	error because header files are NOT installed yet.

>How-To-Repeat:
	./build.sh -j N tools # N > 1

>Fix:
	Patch attached. But I think header files which are used by
	multiple tools should NOT depend on disklabel.

Index: tools/Makefile
===================================================================
RCS file: /home/fun/cvsroot/NetBSD/src/tools/Makefile,v
retrieving revision 1.91
diff -u -p -r1.91 Makefile
--- tools/Makefile	12 Jun 2005 20:24:14 -0000	1.91
+++ tools/Makefile	28 Aug 2005 04:58:39 -0000
@@ -32,7 +32,7 @@ SUBDIR=	host-mkdep .WAIT compat .WAIT \
 		file lint1 \
 		makefs menuc mkcsmapper mkesdb mklocale mknod msgc \
 		pax .WAIT \
-		disklabel \
+		disklabel .WAIT \
 		fdisk \
 		installboot \
 		pwd_mkdb stat sunlabel zic