Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Apr 2008 15:07:45 +0200
From:      Max Laier <max@love2party.net>
To:        freebsd-ports@freebsd.org
Cc:        Dirk Meyer <dirk.meyer@dinoex.sub.org>
Subject:   Re: How to set CFLAGS for the build step?
Message-ID:  <200804041507.45334.max@love2party.net>
In-Reply-To: <P2%2BdDBph%2Bg@dmeyer.dinoex.sub.org>
References:  <iiDdMhph%2Bg@dmeyer.dinoex.sub.org> <200804041321.25472.max@love2party.net> <P2%2BdDBph%2Bg@dmeyer.dinoex.sub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Boundary-00=_hgi9HbyTOAEGnR3
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Friday 04 April 2008 14:21:23 Dirk Meyer wrote:
> Max Laier schrieb:,
>
> > Okay, this doesn't help one bit - sorry.  Or are you suggesting that
> > I simply disregard user-set CFLAGS in make.conf by using /dev/null as
> > make.conf?  This seems to contradict
> > http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/dad
> >s-cflags.html
>
> Only on first glance.
>
> the modified CFLAGS should conatin the definition in /etc/make.conf
> from the run of the port Makefile.
> Then it is passed down in enviroment to bsdmake and the makefile
> of the distribution.
>
> Example: mail/spamilter
>
> $ make -V CFLAGS -f /dev/null
> -O -pipe -march=pentiumpro
> $ make -V MAKE_ENV
> [...] __MAKE_CONF=/dev/null [...] CFLAGS="-O -pipe -march=pentiumpro "
> [...] $ make -V MAKE_ENV WITH_SENDMAIL_PORT=1
> [...] __MAKE_CONF=/dev/null [...] CFLAGS="-O -pipe -march=pentiumpro 
> -I/usr/local/include" [...]
>
> The makefile of the distribution don't have to include make.conf.
> To honor CC/CFLAGS/LDFLAGS ...., they have to be passed in the
> enviroment.

Okay ... so the attached should fix my problem, right?  But it seems that 
I'd have to anticipate what kind of settings a user wants in their 
make.conf, wouldn't I?  While CFLAGS seems to be passed magically, CC or 
LDFLAGS are not.  I don't care all that much as long as it works for me, 
but it seems broken.

> Either unmodified or modified.

-- 
/"\  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=_hgi9HbyTOAEGnR3
Content-Type: text/plain;
  charset="utf-8";
  name="pftop.cflags.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="pftop.cflags.diff"

Index: Makefile
===================================================================
RCS file: /home/mlaier/fcvs/ports/sysutils/pftop/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile	1 Apr 2008 15:10:34 -0000	1.10
+++ Makefile	4 Apr 2008 13:02:17 -0000
@@ -40,6 +40,8 @@
 CFLAGS+=	-DHAVE_ALTQ=1
 .endif
 
+MAKE_ENV+=	__MAKE_CONF=/dev/null
+
 PLIST_FILES=	sbin/pftop
 
 post-patch:

--Boundary-00=_hgi9HbyTOAEGnR3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804041507.45334.max>