Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2011 22:43:23 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Gary Kline <kline@thought.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Which php??
Message-ID:  <20110112224323.b211b66d.freebsd@edvax.de>
In-Reply-To: <20110112203503.GA22381@thought.org>
References:  <20110110212143.GA8276@thought.org> <4D2D7C3E.50404@ifdnrg.com> <20110112195347.GA21353@thought.org> <201101121758.12869.rjgonzale@estrads.com.ar> <20110112203503.GA22381@thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 12 Jan 2011 12:35:04 -0800, Gary Kline <kline@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:

WITH_SDL=yes
WITH_VORBIS=yes
WITH_THEORA=yes
WITH_XANIM=yes
WITH_XVID=yes
WITH_REALPLAYER=yes
WITH_LIVEMEDIA=yes
WITH_ESOUND=yes
WITH_FREETYPE=yes
WITH_LANG=yes
WITH_GUI=yes
WITH_DVD=yes
WITH_GTK1=yes
WITH_LIBDVDNAV=yes
WITH_AMR=yes
WITH_VPX=yes
WITH_WIN32=yes
WITH_V4L=yes
WITH_DVD_DEVICE=/dev/dvd
WITH_OPTIMIZED_CFLAGS=yes
WITHOUT_RUNTIME_CPUDETECTION=yes
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.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110112224323.b211b66d.freebsd>