Makefile for different ARCH

Gary J. Hayers gary at hayers.org
Wed Mar 20 18:28:40 UTC 2013


Olli this is the perfect solution many thanks.

On 20/03/2013 18:05, Gary J. Hayers wrote:
> Thanks Olli,
>
> That could very well be exactly what I need, I did try something along
> those lines but was loosing my way with syntax.
>
> On 20/03/2013 18:02, olli hauer wrote:
>> On 2013-03-20 18:11, Gary J. Hayers wrote:
>>> Hi,
>>>
>>> So I have a port I'm working on that has different distfiles for
>>> different ARCH ie:
>>>
>>> i386 = foo.tar.Z
>>> amd64 = foo.amd64.tar.Z
>>>
>>> What is the best way for my makefile to choose the right distfile
>>> dependant on what ARCH the port is being install on? Hope I have
>>> conveyed that clearly.
>>>
>>
>>
>> You can check ARCH, see example.
>> portlint will spot the DISTINFO is to late, but you need at last
>> <bsd.port.pre.mk> to get the ARCH value.
>> Do not forget to include both checksums in distinfo
>>
>> // olli
>>
>> PORTNAME=       foo
>> PORTVERSION=    1.0
>> CATEGORIES=     misc
>> MASTER_SITES=   http://localhost/distfiles/
>> EXTRACT_SUFX=   .tar.Z
>>
>> MAINTAINER=     gary at hayers.org
>> COMMENT=        The foo arch test port
>>
>> ONLY_FOR_ARCHS= i386 amd64
>>
>> .include <bsd.port.pre.mk>
>>
>> .if ${ARCH} == amd64
>> DISTNAME=       foo.amd64.tar.Z
>> .else
>> DISTNAME=       foo.tar.Z
>> .endif
>>
>
>


-- 
Regards,
Gary J. Hayers
gary at hayers.org

PGP Signature
http://www.hayers.org/pgp


More information about the freebsd-ports mailing list