Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Mar 2013 18:28:27 +0000
From:      "Gary J. Hayers" <gary@hayers.org>
To:        olli hauer <ohauer@gmx.de>, ports@freebsd.org
Subject:   Re: Makefile for different ARCH
Message-ID:  <5149FFCB.90207@hayers.org>
In-Reply-To: <5149FA51.9040603@hayers.org>
References:  <5149EDD8.6010005@hayers.org> <5149F9C3.506@gmx.de> <5149FA51.9040603@hayers.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@hayers.org

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



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