From owner-freebsd-questions@FreeBSD.ORG Mon Nov 5 14:40:29 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8B0716A502 for ; Mon, 5 Nov 2007 14:40:29 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.t-hosting.hu (server.t-hosting.hu [81.2.252.59]) by mx1.freebsd.org (Postfix) with ESMTP id 6E0BF13C4DB for ; Mon, 5 Nov 2007 14:40:29 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by server.t-hosting.hu (Postfix) with ESMTP id 86CD2A4A821; Mon, 5 Nov 2007 15:27:33 +0100 (CET) X-Virus-Scanned: amavisd-new at t-hosting.hu Received: from server.t-hosting.hu ([127.0.0.1]) by localhost (server.t-hosting.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id VtvK3CC+oeDW; Mon, 5 Nov 2007 15:27:24 +0100 (CET) Received: from [192.168.2.186] (catv-5063f539.catv.broadband.hu [80.99.245.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.t-hosting.hu (Postfix) with ESMTP id 9867EA4A804; Mon, 5 Nov 2007 15:27:24 +0100 (CET) Message-ID: <472F284B.6050904@FreeBSD.org> Date: Mon, 05 Nov 2007 15:27:23 +0100 From: Gabor Kovesdan User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: White Hat References: <849261.96295.qm@web34408.mail.mud.yahoo.com> In-Reply-To: <849261.96295.qm@web34408.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: FreeBSD Users Questions Subject: Re: Configure to use WITH_DEBUG X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2007 14:40:29 -0000 White Hat escribió: >> 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="" > #2 or #3. Also, take a look at ports-mgmt/portconf. > > One other question. From what I have been reading, the use of 'WITH_DEBUG' also prevents the stripping of debug code when the program is installed. Is that correct, or do I have to use another flag to insure that debug code is not stripped from the installed program? > Yes, it's true. There might be some weird ports, which do things in a non-standard way, this might not apply to those, but for the most of our ports, which respect the most important macros, it is going to work. -- Gabor Kovesdan FreeBSD Volunteer EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org WEB: http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org