From owner-freebsd-ports@FreeBSD.ORG Tue Sep 7 16:52:53 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 48BEE16A4CE for ; Tue, 7 Sep 2004 16:52:53 +0000 (GMT) Received: from blake.polstra.com (blake.polstra.com [64.81.189.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC9B643D5A for ; Tue, 7 Sep 2004 16:52:50 +0000 (GMT) (envelope-from jdp@polstra.com) Received: from strings.polstra.com (dsl081-189-067.sea1.dsl.speakeasy.net [64.81.189.67]) by blake.polstra.com (8.12.11/8.12.11) with ESMTP id i87Gqolu083111 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 7 Sep 2004 09:52:50 -0700 (PDT) (envelope-from jdp@strings.polstra.com) Received: (from jdp@localhost) by strings.polstra.com (8.12.11/8.12.11/Submit) id i87Gqog5002048; Tue, 7 Sep 2004 09:52:50 -0700 (PDT) (envelope-from jdp) Message-ID: X-Mailer: XFMail 1.5.5 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <413DE656.9000905@webonaut.com> Date: Tue, 07 Sep 2004 09:52:50 -0700 (PDT) From: John Polstra To: Franz Klammer X-Bogosity: No, tests=bogofilter, spamicity=0.333862, version=0.14.5 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:52:53 -0000 On 07-Sep-2004 Franz Klammer wrote: > 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 Sorry, I didn't explain the problem very well. I am the port's maintainer, and I want to commit a change to the port so that -O will be used regardless of what the user has in /etc/make.conf or the environment. John