freebsd at edvax.de
Wed Jan 12 21:43:26 UTC 2011
On Wed, 12 Jan 2011 12:35:04 -0800, Gary Kline <kline at thought.org> wrote:
> What should I turn on or off
> in the Makefile [or using `make config']?
Allow me a quite general comment: Do not modify a port's
Makefile directly. The interface to selectable options is
usually given by "make config" or the configuration files
of the port managament tool you use (if any).
A file-based mechanism has been present in ports, but I'm
not fully sure it hasn't been "obsoleted" already. I have
used this mechanism for things like configuring the options
for the mplayer port.
This mechanism is Makefile.local - a file you place into
the port's directory and specify all the options you need,
maybe based upon the Makefile itself.
For example, a /usr/ports/multimedia/mplayer/Makefile.local
could look this way:
CFLAGS+= -O2 -pipe -ffast-math
You can specify the =yes as an equivalent to setting [X]
in the "make config" screen, and you can also define
variables with strings (like WITH_DVD_DEVICE or the
alteration of CFLAGS in the example).
Reason: Changes to Makefile will be removed within the
process of "make update", but Makefile.local will be
ignored, so it will still be present after the update
of the ports tree.
Still, using a centralized configuration file for ports
options as provided by port management tools (such as
portupgrade or portmaster) often is the better solution
if you use those tools anyway.
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions