Setting make options permanently (WITHOUT_GNOME, etc)

Andy Sparrow spadger at best.com
Tue Apr 1 21:28:56 PST 2003


> > > I've been wondering whether it is possible to make make (pardon the
> > > wording) always use specific options. For example, I see that many ports
> > > allow the user to set WITHOUT_GNOME or WITHOUT_X prior to building the
> > > port.

> >Add them to /etc/make.conf
> 
> Another good way is to set them in /usr/local/etc/pkgtools.conf, if you use 
> 'portupgrade'. That way you can set them for only the ports they apply to.

Another way is to set the options on a per-port basis in 
'Makefile.local' in the ports directory. This is then read in 
automagically by the ports makefiles.

I happen to like this approach, as it keeps per-port options local to 
the port, which I find a convenient place to save it after you've 
scraped the options you want out of the Makefile itself.

It also allows you to build some ports with different options without 
having to set them globally (e.g. in make.conf).

It also doesn't clutter up pkgtools.conf (which I edit so infrequently I 
can never remember what its called or where it lives). I find the 
individual port directory the most intuitive and logical place to look 
for local port-specific option settings, and it doesn't require you to 
install 'portupgrade' (which is, actually, very good - I use it almost 
exclusively).

HTH.

AS




More information about the freebsd-ports mailing list