From owner-freebsd-questions@FreeBSD.ORG Sat Jul 1 21:53:58 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 53BB916A611 for ; Sat, 1 Jul 2006 21:53:58 +0000 (UTC) (envelope-from backyard1454-bsd@yahoo.com) Received: from web81605.mail.mud.yahoo.com (web81605.mail.mud.yahoo.com [68.142.199.157]) by mx1.FreeBSD.org (Postfix) with SMTP id 9910744BC6 for ; Sat, 1 Jul 2006 19:47:18 +0000 (GMT) (envelope-from backyard1454-bsd@yahoo.com) Received: (qmail 33066 invoked by uid 60001); 1 Jul 2006 19:47:14 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=GbttTL7jc7wmYApDhC6+4R5P9J4yyUneVwJ15IPxlYcbEKKPoOXK+oyLzq/WpVmFJt6xSXIRU5SLqyiOYenvyzBYdZT81HCEz1O5aj2TTACXMFRbMXWHUJuEgP+p9MvKOIDTvqNiFgFjDSL9aQZkR2ep1gTjaO8Gg0a18V5dQZk= ; Message-ID: <20060701194714.33064.qmail@web81605.mail.mud.yahoo.com> Received: from [75.9.132.47] by web81605.mail.mud.yahoo.com via HTTP; Sat, 01 Jul 2006 12:47:14 PDT Date: Sat, 1 Jul 2006 12:47:14 -0700 (PDT) From: To: Javier Echaiz , "Michael P. Soulier" In-Reply-To: <1c8c9de30607010520md22fe1es73ebd0d9a9b3345@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org Subject: Re: batching port builds X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: backyard1454-bsd@yahoo.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2006 21:53:58 -0000 --- Javier Echaiz wrote: > You can put BATCH=yes in your /etc/make.conf > > The settings for each port (if it has something to > config) are stored > in /var/db/ports/{port dir name}/options (just in > case you want to see > what the port assumed). > > If you want to configure ports (with than ncurses > blues screen) > sometimes and assume defaults in other cases perhaps > you should try > portupgrade -m BATCH=yes on a need basis. > > As David suggested you can always do "make > config-recursive install > clean", to answer all the option questions before > the port builds. > > Warmly, > Javier > > >>On 30/06/06 David J Brooks said: > >> > >> If you do 'make -DBATCH' instead of 'make' - > you will use the preset > >> defaults for each port with options. Or you can > do > >> 'make config-recursive' - which will offer you > all the option screens for > >> the port in whose directory you're currently in > and all its dependencies. > >> > >> See 'man ports' for more information. > >> > >> To use those with 'portupgrade -a' will probably > take some custom scripting. > > > >Ah, so there's no make.conf option for this? > > > >Thanks, > >Mike > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > the most convenient way to batch build ports is to use this sort of if statements in make.conf .if ${.CURDIR:M*/databases/mysql*} BUILD_STATIC=yes BUILD_OPTIMIZED=yes WITH_LINUXTHREADS=yes .endif #reference #http://blog.innerewut.de/articles/2006/01/14/upgrading-ports-and-preserve-make-options this will work with portupgrade even in dependancies because the port will always look to make.conf for default system settings. so .if ${.CURDIR:M*/foo/bar} BATCH=yes WITH_THISOPTION=yes WITHOUT_2NDOPTION=yes .endif will build with and without those options. just remember to prefix the OPTIONS in a menu config setup with WITH or WITHOUT to enable/disable what you want. Always make sure to remember WITH_FOO=no means WITH_FOO=yes, it should be WITHOUT_FOO=whatever_it_is_now_set. The good thing is individually you can choose to use one setting over the other, and this also ensures one ports options don't mess things up in another ones build. I know when I was blindly setting build options in make.conf weird problems began to arrise until I got errors about make.conf being too large. this can make make.conf get large so I've been meaning to move the port configs into port.conf instead and reference it in like .if ${.CURDIR:M*/usr/ports/*} include /foo/port.conf .endif I believe this is the correct syntax but I haven't tried it yet. This method is how I am batch building my servers. Ultimately I will make a Makefile to build what I need and let it do its thing. I wish this method was documented better. Although it is trivially simple if one understands makefiles so I can see why its not really discussed. It is none the less very effective and simple. What I would like to know is if there is a simple way to get the build options for every port in the collection so it can easily be brought into a "port.conf" file simply. I know I saw a command that would parse the makefiles of all the ports and do something to that effect but I can't recall it. -brian