Date: Mon, 13 Nov 2000 12:23:08 -0700 From: Warner Losh <imp@village.org> To: stable@FreeBSD.ORG Cc: current@FreeBSD.ORG Subject: Re: "make modules" kicks the first module directory twice Message-ID: <200011131923.MAA33880@harmony.village.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> <HLEDJBJKDDPDJBMGCLPPKEFGCIAA.otterr@telocity.com> <3A085F93.BC245A53@cup.hp.com> <20001113145812F.matusita@jp.FreeBSD.org> <200011130658.eAD6wdG38522@billy-club.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011131923.MAA33880>