can i use flags at once?

b. f. bf1783 at
Tue Jun 8 19:28:01 UTC 2010

Just to clarify some of the earlier comments, the ports knobs that can
be used to define certain build options are automatically persistent
only if the knobs are defined as part of the OPTIONS framework, and if
you don't subsequently delete the /var/db/port/*/options files, either
directly or via the rmconfig target.  You can reset the values of
these knobs by re-running the config target.  If you do that, it is
usually best to run rmconfig first, because obsolete knobs aren't
cleared by config, and can clutter up the options files, and thus your
build environment.  The first time you build a port, and every time
thereafter that the available OPTIONS are changed for a port, you will
be prompted to reconfigure, unless you set BATCH in your build
environment, either directly or via switches in portmaster or
portupgrade -- in which case a prior choice for a knob setting will be
used, if you have made one, or the default value, if you have not.

There are also some knobs that are _not_ OPTIONS, and so must be
defined in the build environment each time the port is
built/installed/packaged.  These knobs are usually either knobs that
were meant to be used for a lot of ports (e.g. WITHOUT_X11), or knobs
from older ports that weren't converted to the OPTIONS framework, or
experimental/maintainer knobs that the maintainer didn't want to
expose for wider use.  You can find these, for example,  by visual
inspection of the port Makefiles, by using sed/grep/awk on the port
Makefiles, or by using something like the ports-mgmt/portsopt port.
You can make these knobs persistent by using the ports-mgmt/portconf
port, or the more complicated sysutils/penv port, or by adding them to
pkgtools.conf(5) from the ports-mgmt/portupgrade* ports, or by adding
them to some included makefile.  /etc/make.conf exists partly for this
purpose.  But it is used for all invocations of make by default, even
for the base system and for other software that is not in ports, so it
is a good idea to limit the scope of your knob settings in this file
by making the definitions conditional, in order to avoid polluting
other builds.  You can do this, for example, by using statements like:

#insert knobs for all ports here

#insert knobs for the devel/bar port here

or by using other makefile directives.  (This assumes of course, that
you haven't changed PORTSDIR to be something other than /usr/ports.)

It usually takes some time and effort to determine which settings are
best for you, for all of your ports, if you need to customize them --
so be patient.  And if you really liked Portage, there is an
experimental project to use Portage on FreeBSD (although I'm not sure
whether this means stock FreeBSD, or a hybrid system with a FreeBSD
kernel and GNU/LInux userland) that you may want to monitor:


More information about the freebsd-questions mailing list