Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jun 2006 18:37:56 +0400
From:      Arseny Nasokin <tarc@tarc.po.cs.msu.su>
To:        freebsd-ports <freebsd-ports@freebsd.org>
Subject:   HEADSUP: WITH and WITHOUT options knobs checking
Message-ID:  <20060627143756.GS32801@tarc.po.cs.msu.su>

next in thread | raw e-mail | index | archive | help
It's wrong if you write in your Makefiles something about:
--------------%<----------------
...
OPTIONS= ABC "Enable abc feature" off 
...
.include <bsd.port.pre.mk>
...
.if defined (WITH_ABC)
# configure ABC feature
.endif
...
.include <bsd.port.post.mk>
------------->%-----------------

The main reason is that, ${OPTIONSFILE} included as is, and if you enable ABC(as in example), you have in ${OPTIONSFILE} something about:
--------------%<----------------
...
WITH_ABC=true
...
------------->%-----------------


Ok, and now some experiments.
If ABC is feature, that you want enable im many ports (for example, OPTIMIZED_FLAGS or THREADS, or ESOUND/ESD.....)
you possibly want add it to your /etc/make.conf file.

cat WITH_ABC=true >>  /etc/make.conf 

than, you want compile port, without this feature. You do `make config' and as result in your ${OPTIONSFILE} you have:
--------------%<----------------
...
WITHOUT_ABC=true
...
------------->%-----------------

And now - compile...

when you type `make build' you have defined BOTH `WITH_ABC' and `WITHOUT_ABC' knobs

and as you check _only_ WITH_ABC, this feature included. That's wrong!!!


Please, check WITH_ knobs, as it:
.if defined (WITH_ABC) && ! defined(WITHOUT_ABC)

-- 
   Best regards,
   	Arseny Nasokin



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