From owner-freebsd-ports@FreeBSD.ORG Wed Apr 2 17:48:38 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6146C1065673 for ; Wed, 2 Apr 2008 17:48:38 +0000 (UTC) (envelope-from fbsd06+UT=6da76847@mlists.homeunix.com) Received: from turtle-out.mxes.net (turtle-out.mxes.net [216.86.168.191]) by mx1.freebsd.org (Postfix) with ESMTP id 33B148FC22 for ; Wed, 2 Apr 2008 17:48:38 +0000 (UTC) (envelope-from fbsd06+UT=6da76847@mlists.homeunix.com) Received: from mxout-04.mxes.net (mxout-04.mxes.net [216.86.168.179]) by turtle-in.mxes.net (Postfix) with ESMTP id C841B163DF9 for ; Wed, 2 Apr 2008 13:16:59 -0400 (EDT) Received: from gumby.homeunix.com. (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id 928D9D05C4 for ; Wed, 2 Apr 2008 13:16:56 -0400 (EDT) Date: Wed, 2 Apr 2008 18:16:54 +0100 From: RW To: freebsd-ports@freebsd.org Message-ID: <20080402181654.3c1ab978@gumby.homeunix.com.> In-Reply-To: <200804021834.43014.max@love2party.net> References: <200804021834.43014.max@love2party.net> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: How to set CFLAGS for the build step? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2008 17:48:38 -0000 On Wed, 2 Apr 2008 18:34:42 +0200 Max Laier wrote: > Hi, > > I have some trouble with sysutils/pftop. It seems that if a user > sets CFLAGS in make.conf the additional "CFLAGS+= -DHAVE_ALTQ=1" I > have in the port's Makefile doesn't get through to the build step's > environment. This might be due to the fact that this port uses the > bsd.*.mk scripts, but I'm puzzled as to how to do this right. Any > insight? > It's handled in the pftop Makefile: .if ${OSVERSION} < 502116 MAKE_ARGS= LOCALBASE="${PREFIX}" OSLEVEL=34 .if defined(WITH_ALTQ) && (${WITH_ALTQ} == "yes") CFLAGS+= -DHAVE_ALTQ=1 .endif .elif ${OSVERSION} < 600025 MAKE_ARGS= LOCALBASE="${PREFIX}" OSLEVEL=35 CFLAGS+= -DHAVE_ALTQ=1 -DHAVE_RULE_ANCHOR=1 .elif ${OSVERSION} < 700049 MAKE_ARGS= LOCALBASE="${PREFIX}" OSLEVEL=37 CFLAGS+= -DHAVE_ALTQ=1 .else MAKE_ARGS= LOCALBASE="${PREFIX}" OSLEVEL=41 CFLAGS+= -DHAVE_ALTQ=1 .endif