--- Javier Echaiz <[EMAIL PROTECTED]> 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 <package> 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
> "[EMAIL PROTECTED]"
> 

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
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to