Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Nov 2007 15:26:02 +0100
From:      "[LoN]Kamikaze" <LoN_Kamikaze@gmx.de>
To:        White Hat <pigskin_referee@yahoo.com>
Cc:        FreeBSD Users Questions <freebsd-questions@freebsd.org>
Subject:   Re: Configure to use WITH_DEBUG
Message-ID:  <472F27FA.4090304@gmx.de>
In-Reply-To: <849261.96295.qm@web34408.mail.mud.yahoo.com>
References:  <849261.96295.qm@web34408.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
White Hat wrote:
>> In response to White Hat :
>>
>>> I have a system that I am setting up that will only be used to test programs.
>>> I therefore want all programs built with debug code. To facilitate that task, I
>>> was wondering if I could put a global flag in the '/etc/make.conf' file.
>>> Assuming that would work, which of these is the better solution.
>>>
>>> 1) WITH_DEBUG
>>> 2) WITH_DEBUG=1
>>> 3) WITH_DEBUG=true
>>> 4) -DWITH_DEBUG
>>>
>>> If there is a better solution, I would appreciate hearing about it.
>> #2 and #3 will work.
>> The key is that the variable is set, not what it's set to. As a joke,
>> you can do WITH_DEBUG=no in make.conf, and confuse the hell out of other
>> sysadmins.
>>
>> Note that there may be additional port-specific debugging that would
>> not be turned on by the global WITH_DEBUG, but you'll have to handle
>> that on a port-by-port basis.
>>
>> -- 
>> Bill Moran
>> http://www.potentialtech.com
>  
> Interesting. Now if I want to turn DEBUG off for a particular port, would I use:
>  
> 1)    WITH_DEBUG
> 2)    WITH_DEBUG=
> 3)    WITH_DEBUG=""
>  

The make manpage is your friend:

.if ${.CURDIR:M/usr/ports/category/port}
.undef WITH_DEBUG
.endif




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