Date: Fri, 30 Jan 2015 15:24:22 +0100 From: Dominic Fandrey <kamikaze@bsdforen.de> To: Don Lewis <truckman@FreeBSD.org>, elizabeth@interlinked.me Cc: ports@FreeBSD.org Subject: Re: testing the value of ${CXX} in ports Makefile Message-ID: <54CB9416.5020802@bsdforen.de> In-Reply-To: <201501300628.t0U6Sf5B008970@gw.catspoiler.org> References: <201501300628.t0U6Sf5B008970@gw.catspoiler.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 30/01/2015 07:28, Don Lewis wrote: > On 29 Jan, Elizabeth Myers wrote: >> On 01/29/15 21:43, Don Lewis wrote: >>> I need to test the value of ${CXX} in the Makefile for a port and am >>> getting unexpected results. Here is a simplified version of the >>> Makefile: >>> >>> ... >>> USE_GCC= 4.9+ >>> >>> .include <bsd.port.pre.mk> >>> >>> post-patch: >>> echo CXX=${CXX} >>> .if ${CXX} == g++49 >>> echo detected g++49 >>> .else >>> echo did not detect g++49 >>> .endif >>> >>> .include <bsd.port.post.mk> >>> >>> ... > >> Why do you need to detect it? Shouldn't USE_GCC ensure it's there? In >> any case, browsing through the ports tree, you could try .if >> !empty(CXX:M*g++49*) > > With USE_GCC=yes, CXX will currently get set to g++48, but at some point > the default version will get upgraded to 4.9. Unfortunately, that > breaks the port build unless I apply an extra patch to the source. I > could set USE_GCC=4.8, but once the default version of gcc gets updated, > anyone who uses the port will need both gcc 4.8 for this port and 4.9 > for the majority of parts that just use USE_GCC=yes to get the default. Just check against: ${GCC_DEFAULT:M4.9} -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54CB9416.5020802>