From owner-freebsd-ports@FreeBSD.ORG Thu Apr 3 20:06:32 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 A6F45106566C for ; Thu, 3 Apr 2008 20:06:32 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.174]) by mx1.freebsd.org (Postfix) with ESMTP id 376808FC17 for ; Thu, 3 Apr 2008 20:06:32 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-067-239-059.pools.arcor-ip.net [88.67.239.59]) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis) id 0ML31I-1JhVhf0O3r-0003Y4; Thu, 03 Apr 2008 22:06:31 +0200 Received: (qmail 158 invoked from network); 3 Apr 2008 20:05:32 -0000 Received: from myhost.laiers.local (192.168.4.151) by router.laiers.local with SMTP; 3 Apr 2008 20:05:32 -0000 From: Max Laier Organization: FreeBSD To: freebsd-ports@freebsd.org Date: Thu, 3 Apr 2008 22:04:16 +0200 User-Agent: KMail/1.9.9 References: <200804021834.43014.max@love2party.net> In-Reply-To: <200804021834.43014.max@love2party.net> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_AhT9HiMrjlk9idg" Message-Id: <200804032204.16975.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1+juqEteylihh34Gk2WRNAl3odzbbqvYNKFuTs Jwzv07bLyxl0q8g/Wjg3u4yDdKrm2+R85Y8uxVI7WZJQo2A5hQ 6k8fTL8ZhmY+XVnu85jag== 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: Thu, 03 Apr 2008 20:06:32 -0000 --Boundary-00=_AhT9HiMrjlk9idg Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wednesday 02 April 2008 18:34:42 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? Nothing helpful yet - so maybe I wasn't clear about the problem. Attached is a small test port Makefile to demonstrate the problem. The objective is to change the CFLAGS setting in there in a way that will result in "-addme" being part of the final output of: make MCONF=empty clean all make MCONF=test1 clean all make MCONF=test2 clean all make MCONF=test3 clean all This currently works for empty and test{1,2}, but fails for test3. This test3 uses a make.conf (passed via MAKE_ARGS= __MAKE_CONF=...) that has a CFLAGS= -test line. Any help appreciated! -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --Boundary-00=_AhT9HiMrjlk9idg Content-Type: text/plain; charset="iso-8859-1"; name="Makefile" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Makefile" PORTNAME= cflags-test PORTVERSION= 0.1 CATEGORIES= sysutils MAINTAINER= mlaier@freebsd.org COMMENT= Test if CFLAGS are properly propagated to the build step .include .if defined(MCONF) MAKE_ARGS= __MAKE_CONF=${WRKSRC}/${MCONF} .endif # CHANGE HERE CFLAGS+= -addme # CHANGE HERE do-fetch: echo "Nothing to do" do-extract: @mkdir -p ${WRKSRC} @touch ${WRKSRC}/empty @echo "CFLAGS?= -test" > ${WRKSRC}/test1 @echo "CFLAGS+= -test" > ${WRKSRC}/test2 @echo "CFLAGS= -test" > ${WRKSRC}/test3 @echo "all:" > ${WRKSRC}/Makefile @echo " @echo \"'\$${CFLAGS}'\"" >> ${WRKSRC}/Makefile @echo ".include " >> ${WRKSRC}/Makefile .include --Boundary-00=_AhT9HiMrjlk9idg--