From owner-freebsd-questions@FreeBSD.ORG Tue Apr 20 14:20:23 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC24C16A4CE for ; Tue, 20 Apr 2004 14:20:23 -0700 (PDT) Received: from cmsrelay02.mx.net (cmsrelay02.mx.net [165.212.11.111]) by mx1.FreeBSD.org (Postfix) with SMTP id 8EEDE43D60 for ; Tue, 20 Apr 2004 14:20:23 -0700 (PDT) (envelope-from noackjr@alumni.rice.edu) Received: from uadvg131.cms.usa.net (165.212.11.131) by cmsoutbound.mx.net with SMTP; 20 Apr 2004 21:20:22 -0000 Received: from optimator.noacks.org [66.140.17.8] by uadvg131.cms.usa.net (ASMTP/noackjr@usa.net) via mtad (C8.MAIN.3.13N) with ESMTP id 475iDTVuu0433M31; Tue, 20 Apr 2004 21:20:20 GMT X-USANET-Auth: 66.140.17.8 AUTH noackjr@usa.net optimator.noacks.org Received: from localhost (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id 64B19617D; Tue, 20 Apr 2004 16:20:19 -0500 (CDT) Received: from optimator.noacks.org ([127.0.0.1]) by localhost (optimator.noacks.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 54648-05; Tue, 20 Apr 2004 16:20:18 -0500 (CDT) Received: from alumni.rice.edu (optimator [192.168.1.11]) by optimator.noacks.org (Postfix) with ESMTP id CC1D8616D; Tue, 20 Apr 2004 16:20:17 -0500 (CDT) Message-ID: <40859411.60300@alumni.rice.edu> Date: Tue, 20 Apr 2004 16:20:17 -0500 From: Jon Noack User-Agent: Mozilla Thunderbird 0.6a (Windows/20040419) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Matthew Seaman References: <408576C7.7030404@alumni.rice.edu> <20040420194607.GA35510@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20040420194607.GA35510@happy-idiot-talk.infracaninophile.co.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at noacks.org cc: questions@freebsd.org Subject: Re: recursive 'make config'? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: noackjr@alumni.rice.edu List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2004 21:20:24 -0000 On 4/20/2004 2:46 PM, Matthew Seaman wrote: > On Tue, Apr 20, 2004 at 02:15:19PM -0500, Jon Noack wrote: >> I love the 'make config' option. Is there a way to recursively >> 'make config' before installing a port with a lot of dependencies >> (similar to the way sysutils/portupgrade can recursively fetch with >> -RF)? If I want to install kde, for example, I'd prefer to >> configure options for each dependent port before installing. In >> other words, I don't want to set "BATCH=yes". However, without >> "BATCH=yes" I have to check the progress occasionally to configure >> some port because the build process stopped. I know this is only a >> big deal on the first install (because the options are saved), but >> it's rather annoying to start a kde compile before you go to bed >> and wake up with only a few ports installed... > > You can't do a recursive make config like that I'm afraid. What you > can do is set the various configuration options used by make(1) before > starting the compilation job, so that it doesn't stop to ask questions > halfway through. There's actually quite a number of ways you can do > that: > > i) Globally in /etc/make.conf -- variables set here will apply to > all ports you compile. > > ii) Setting the variable in the environment before starting the > compilation. Again this applies to all compilations, but only > certain variables can be set this way. Many will be overridden > by settings in Makefiles or make.conf. > > iii) Globally in the 'Environment' section of > /usr/local/etc/pkgtools.conf -- of course this only works if > you're a portupgrade(1) user. Same caveats as for (ii) apply > > iv) Locally to a port by creating a Makefile.local in the port > directory and putting the settings within that. There are > actually several subsiduary makefile names that will be > automatically included like this: see /usr/ports/Mk/bsd.port/mk > for details. Note however that 'Makefile.local' is the name > intended for human overrides of the default settings, whereas > 'Makefile.inc' and '../Makefile.inc' can be machine generated > as part of the port's configuration, or it can be a permanent > file commited as part of the ports. > > v) Locally to a port (or a series of ports matching a glob > expression) in the MAKE_ARGS section of pkgtools.conf > > vi) Locally to a port if it uses the OPTIONS variable within it's > Makefile. In these cases, just run 'make config' one time, and > the settings will be stored in /var/db/ports: you'll only get > the configuration dialog coming up if the port is modified to > use some new options. > > Option vii) is (of course) to set the options on the make(1) command > line, as you build the port, which I include for completeness' sake > only as it doesn't help you run your big build job unattended. > > Most people will use a combination of (i), (v) and (vi) -- for those > ports where it applies. You will still have to scan through all of > the dependency ports that you will be installing, read their Makefiles > and decide what options (if any) you wish to set. You can get some > lists of the dependencies by running: > > % make pretty-print-build-depends-list > % make pretty-print-run-depends-list > > from the directory of the top level port you wish to install. > > Cheers, > > Matthew Wow -- thanks for the comprehensive response. I'm a member of the (i) and (vi) club. What I was hoping to avoid was the scan through all the ports. For kde this is probably around 100 ports (no bloat jokes, please). That's just too much time. As a result, I'll continue my current "lazy allocation" of options. I keep a backup of /etc/make.conf and the contents of /var/db/ports, which should help kick things off the next time I need to reinstall or install on another machine. Thanks, Jon