Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 May 2007 14:24:52 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-current@FreeBSD.ORG, c47g@gmx.at
Subject:   Re: problems with make.conf, c47g@gmx.at
Message-ID:  <200705301224.l4UCOqBS030682@lurza.secnetix.de>
In-Reply-To: <200705291934.12668.c47g@gmx.at>

next in thread | previous in thread | raw e-mail | index | archive | help
Christian Gusenbauer wrote:
 > Pieter de Goeje wrote:
 > > Christian Gusenbauer wrote:
 > > > I've a problem compiling the port graphics/libGLw. The port's Makefile
 > > > contains the line
 > > > 
 > > > CFLAGS+=-D__GLX_MOTIF=1
 > > > 
 > > > As long as I don't set my own CFLAGS in /etc/make.conf, the port compiles
 > > > fine. But if I set my own CFLAGS in /etc/make.conf, the CFLAGS+= line in
 > > > the Makefile seems to be ignored (or overwritten by my settings).
 > > > 
 > > > How do I correctly use the /etc/make.conf file? How can I use my own
 > > > settings?
 > > 
 > > Have you tried putting CFLAGS+= .... (note the +) in make.conf? Otherwise
 > > you could try setting the correct cflags in the environment before
 > > executing make, for example: setenv CFLAGS -Os.
 > 
 > Thanks for this tip! I didn't know, that it's possible to use environment 
 > variables for this. But the question remains: how to correctly use these 
 > settings in make.conf. Because even in the /usr/share/examples/etc/make.conf 
 > it's documented to use CFLAGS= (without the +). But doing it that way, these 
 > settings break port builds.

As Pieter pointed out, using CFLAGS+=... in /etc/make.conf
should work (i.e. ``+='' instead of ``='').  Did you try
that?

Just out of curiosity, I'm wondering why you want to set
the CFLAGS globally in /etc/rc.conf?  There aren't many
good reasons to do so, at least on i386 and amd64.  Most
of the time people change their CFLAGS they make things
worse.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"Perl will consistently give you what you want,
unless what you want is consistency."
        -- Larry Wall



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