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? 

_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to