From owner-freebsd-stable Mon Nov 13 11:23:22 2000 Delivered-To: freebsd-stable@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 87B9737B479; Mon, 13 Nov 2000 11:23:10 -0800 (PST) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.0/8.11.0) with ESMTP id eADJN8R07833; Mon, 13 Nov 2000 12:23:09 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id MAA33880; Mon, 13 Nov 2000 12:23:08 -0700 (MST) Message-Id: <200011131923.MAA33880@harmony.village.org> To: stable@FreeBSD.ORG Subject: Re: "make modules" kicks the first module directory twice Cc: current@FreeBSD.ORG In-reply-to: Your message of "Mon, 13 Nov 2000 09:55:55 PST." <20001113095555.A38404@dragon.nuxi.com> References: <20001113095555.A38404@dragon.nuxi.com> <20001113145812F.matusita@jp.FreeBSD.org> <3A085F93.BC245A53@cup.hp.com> <20001113145812F.matusita@jp.FreeBSD.org> <200011130658.eAD6wdG38522@billy-club.village.org> Date: Mon, 13 Nov 2000 12:23:08 -0700 From: Warner Losh Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20001113095555.A38404@dragon.nuxi.com> "David O'Brien" writes: : On Sun, Nov 12, 2000 at 11:58:39PM -0700, Warner Losh wrote: : > In message <20001113145812F.matusita@jp.FreeBSD.org> Makoto MATSUSHITA writes: : > : It does not fix this problem. However, if we separate the execution of : > : "make obj" and "make all", we can avoid (again, not *fix*) the problem. : > : Maybe this change is reasonable; there is few meaning doing "make : > : kernel-depend" in "doMODULES" target. : > : > I think that make has no business doing an implicit make obj for the : > all target. : : Someone has to run `make obj' for the modules tree. How are you doing it : locally? Right now we do it twice. Once in make dpeend and again in make all. My patch removes it from make all. : > I have been running with patches in my tree that doesn't do the obj : > target if .depend exists. : : can you post them for review. Sure. It is i386 only right now. should be easy to port. : > Of course, you have to be more careful about running make depend in : > that case : : Now *that* sounds scarry to me. We'll have people all over the lists who : forget to and would now get rather bitten. From the sounds of it, your : patch doesn't create as robust a world, but maybe it does. I'm not sure what you're criteria for a robust world is here. If the directory doesn't exist, it will warn the user. If new directories appear, then there is a problem in that it will build in $S/modules/foo rather than in the object tree. I really don't think that we should be doing the make obj twice. Once for make depend and then again for make all. Maybe I'm just too impatient to sit still for it :-). doing it during make all has the effect of creating a race. since the obj and all targets are done in parallel for -j N, we have similar problems if the obj leg runs more slowely than the all leg. At least this restores deterministic behavior to the build. Clearly something better needs to happen than either what we're doing now, or my small band-aid. Warner Index: Makefile.i386 =================================================================== RCS file: /home/imp/FreeBSD/CVS/src/sys/conf/Makefile.i386,v retrieving revision 1.212 diff -u -r1.212 Makefile.i386 --- Makefile.i386 2000/10/29 09:47:50 1.212 +++ Makefile.i386 2000/11/13 18:12:18 @@ -270,8 +270,11 @@ MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} modules: - @mkdir -p ${.OBJDIR}/modules - cd $S/modules && env ${MKMODULESENV} ${MAKE} obj all + @if [ ! -d ${.OBJDIR}/modules ]; then \ + echo You must run make depend before building modules; \ + exit 1; \ + fi + cd $S/modules && env ${MKMODULESENV} ${MAKE} all modules-depend: @mkdir -p ${.OBJDIR}/modules To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message