Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Mar 2011 17:26:50 +0000
From:      Chris Rees <utisoft@gmail.com>
To:        David Demelier <demelier.david@gmail.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Creating a new port, overriding a Makefile variable
Message-ID:  <AANLkTinknxKQK99_9pjxesXnRw%2BuL9bqTZqWeFQ3pxX=@mail.gmail.com>
In-Reply-To: <AANLkTimwMq2XmBsK8_g9pCEnkEZLZRQoxLwC4nzBp-7%2B@mail.gmail.com>
References:  <4D766181.6020809@gmail.com> <AANLkTimwMq2XmBsK8_g9pCEnkEZLZRQoxLwC4nzBp-7%2B@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8 March 2011 17:11, Chris Rees <utisoft@gmail.com> wrote:
>
> On 8 Mar 2011 17:04, "David Demelier" <demelier.david@gmail.com> wrote:
>>
>> Hello,
>>
>> I'm writing a port for a game, I setup a MANPREFIX= /share/man for almost
>> all the systems to install in the correct place.
>>
>> In the port Makefile I've tried to use MAKE_ENV= MANPREFIX=/man to
>> override it, but it seems it's ignored.
>>
>> Can I solve this without creating a files/patch-Makefile?
>>
>> Cheers,
>>
>> --
>> David Demelier
>>
>
> If It's hard set in the Makefile, I'd use REINPLACE_CMD.
>
> Chris
>

or

MAKE_ARGS= -EMANPREFIX
MAKE_ENV= MANPREFIX=/man

I tested this with:

[crees@zeus]~% cat Makefile
HELLO=  "hello, world"
all:
        @echo ${HELLO}
[crees@zeus]~% make
hello, world
[crees@zeus]~% env HELLO=hello make
hello, world
[crees@zeus]~% env HELLO=hello make -EHELLO
hello
[crees@zeus]~%

Try it out!

Though I still think the usual response is to use REINPLACE_CMD on the Makefile.

Chris

NB gmake doesn't have the -E flag, but the -e flag sets environment
precedence on all variables. Sounds risky!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinknxKQK99_9pjxesXnRw%2BuL9bqTZqWeFQ3pxX=>