From owner-freebsd-ports@FreeBSD.ORG Tue Sep 7 16:48:26 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 60D4B16A4CF for ; Tue, 7 Sep 2004 16:48:26 +0000 (GMT) Received: from sv02.webonaut.com (kirk.webonaut.com [212.41.243.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id E67E443D41 for ; Tue, 7 Sep 2004 16:48:25 +0000 (GMT) (envelope-from klammer@webonaut.com) Received: from localhost (localhost [127.0.0.1]) by sv02.webonaut.com (Postfix) with ESMTP id 066397642C; Tue, 7 Sep 2004 18:48:22 +0200 (CEST) Received: from sv02.webonaut.com ([127.0.0.1]) by localhost (sv02.webonaut.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 91474-08; Tue, 7 Sep 2004 18:48:16 +0200 (CEST) Received: from [192.168.0.9] (sisko.webonaut.com [212.41.243.28]) by sv02.webonaut.com (Postfix) with ESMTP id E097C76428; Tue, 7 Sep 2004 18:48:16 +0200 (CEST) Message-ID: <413DE656.9000905@webonaut.com> Date: Tue, 07 Sep 2004 18:48:22 +0200 From: Franz Klammer User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040810) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Polstra References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at webonaut.com cc: ports@freebsd.org Subject: Re: Best way to override user's CFLAGS in a port? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2004 16:48:26 -0000 John Polstra wrote: > The ezm3 port has to be built with an optimization level of -O, and > that's not likely to change any time soon. Some users, especially > users of -current where -O2 is officially supported, are getting > burned by that. What is the best way for me to change the ezm3 port's > Makefile so that -O will be used regardless of the user's environment > or /etc/make.conf settings? > you can add something like this to /etc/make.conf to set CFLAGS only for lang/ezm3: .if ${.CURDIR} == "/usr/ports/lang/ezm3" CFLAGS= -O2 -pipe .endif *or* write your CFLAGS into /usr/ports/lang/ezm3/Makefile.local of course you can write CFLAGS+= -O2 if you want only add -O2. franz > Thanks, > John