From owner-freebsd-questions Fri Dec 22 20:24:13 2000 From owner-freebsd-questions@FreeBSD.ORG Fri Dec 22 20:24:09 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 22A0737B400 for ; Fri, 22 Dec 2000 20:24:09 -0800 (PST) Received: (qmail 95769 invoked by uid 100); 23 Dec 2000 04:24:03 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14916.10466.839301.389833@guru.mired.org> Date: Fri, 22 Dec 2000 22:24:02 -0600 (CST) To: "Justin Honold" Cc: questions@freebsd.org Subject: RE: a few simple make world questions In-Reply-To: References: <14914.44660.275671.78585@guru.mired.org> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Justin Honold types: > thanks for the quick/great response! this is the script i intend to run now > from a screen to automatically build/install...look right? Well, it doesn't look wrong. However, you should leave -questions on the mail. > i ran 'make world' and watched the output, and it doesn't appear to do 'make > clean' :/ the /usr/src/Makefile doesn't say world has clean as a target > either. i'm assuming i shouldn't 'make -j4 clean update world' since the j4 > wouldn't help (might hurt?) the clean and update. the removing of /usr/obj > isn't done by clean, and is recommended in the handbook for speeding up the > process. 'make clean' from /usr/src doesn't wipe out old builds of > sysinstall either, so i manually run it there. i use sysinstall only for > disk purposes too, but i would like to keep it in sync with any bugfixes etc > for that reason. You're right, buildworld doesn't clean up /usr/obj. But that's overkill. I believe the handbook is out of date; the buildworld target now cleans things up in a better manner than it used to. You might note that if buildworld didn't clean things up, then removing things yourself wouldn't make much difference. Sysinstall is a whole 'nother thing, and I'm not familiar with installing it. #!/bin/sh > cd /usr/obj && rm -rf * && chflags -R noschg * && rm -rf * > cd ../src && make clean update && make -j4 world > make kernel KERNEL=DEMON > cd release/sysinstall && make clean install > mergemaster > > > -----Original Message----- > > From: Mike Meyer [mailto:mwm@mired.org] > > Sent: Thursday, December 21, 2000 7:29 PM > > To: Justin Honold > > Subject: Re: a few simple make world questions > > > > > > Justin Honold types: > > > when one enters multiple make targets ('make update > > buildworld'), does it > > > only proceed with the second target if the first one was > > successful ('make > > > update && make buildworld')? > > > > Make stops whatever it's doing when it hits an error, so yes. > > > > > does 'make all' exist only for the passing of multiple targets > > ('make all > > > install' versus 'make && make install')? > > > > No. In fact, if the makefile is built properly, install will depend on > > all, so that "make install" causes make to make all before doing the > > install. > > > > Generally, "all" is used to provide a "build the entire world" target > > when you have different parts that you might want to make > > independently. > > > > > is it at all necessary to 'make clean' or 'make depend' from > > /usr/src before > > > beginning a world build? > > > > No. "make world" does the clean for you. > > > > > should i still remove the compile directory for my kernel before doing a > > > kernel build when using the preferred method? > > > > There's no need to. > > > > > does 'make world' imply 'make buildworld && make installworld', > > or will it > > > proceed with the installation even if the compile had errors? > > > > As above, make stops working when it hits an error (unless it's told > > to ignore that error). So yes, it'll stop. Personally, I do things in > > two phases, doing the "buildworld" multiuser, and then the > > "installworld" single user. I also build on one box then install on > > the others. > > > > > is there a build/make in one target for the preferred kernel > > build method > > > ('make kernel KERNEL=KERNEL_NAME' versus 'make buildkernel > > > KERNEL=KERNEL_NAME && make installkernel KERNEL=KERNEL_NAME')? > > > > Makefile.inc1 says that "kernel" is shorthand for "buildkernel > > installkernel", so you just named the method. > > > > > would it ever be desirable to 'make all install' the entire > > /usr/src/release > > > section? when i attempt to build the entire structure, it says > > "warning: > > > object directory not changed from original /usr/src/release" and does > > > nothing. i get the same warning when manually building > > sysinstall, but it > > > actually compiles and installs fine. > > > > Um - "release" builds the release floppies, CD images, etc. It's not > > something you normally want to build at all. > > > > I personally don't use sysinstall. Pretty much everything it lets you > > do can be done from the command line - except I wish the nice, visual > > partition/slice editors were outside of it. > > > > > presently i use 2 scripts for the updating process; 1 for > > building, 1 for > > > installing. here they are: > > > > > > #!/bin/sh > > > chflags -R noschg /usr/obj/* && rm -rf /usr/obj/* > > > cd /usr/src && make clean && make update && make -j4 buildworld > > > make buildkernel KERNEL=DEMON > > > cd release/sysinstall && make > > > > All that cleaning isn't needed, as the buildworld process cleans > > things up before it starts. If you really want to do it, it'll run > > faster if you run the rm first, with a chflags -R in between > > (basically, it's much faster to walk the full tree once deleting > > everything you can, then change the flags and remove the rest than to > > walk the full tree twice: once changing flags and once removing). > > > > > -- > > Mike Meyer > http://www.mired.org/home/mwm/ > Independent WWW/Unix/FreeBSD consultant, email for more information. > > -- Mike Meyer http://www.mired.org/home/mwm/ Independent WWW/Unix/FreeBSD consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message