Creating a new port, overriding a Makefile variable
utisoft at gmail.com
Tue Mar 8 17:27:37 UTC 2011
On 8 March 2011 17:11, Chris Rees <utisoft at gmail.com> wrote:
> On 8 Mar 2011 17:04, "David Demelier" <demelier.david at gmail.com> wrote:
>> 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?
>> David Demelier
> If It's hard set in the Makefile, I'd use REINPLACE_CMD.
I tested this with:
[crees at zeus]~% cat Makefile
HELLO= "hello, world"
[crees at zeus]~% make
[crees at zeus]~% env HELLO=hello make
[crees at zeus]~% env HELLO=hello make -EHELLO
[crees at zeus]~%
Try it out!
Though I still think the usual response is to use REINPLACE_CMD on the Makefile.
NB gmake doesn't have the -E flag, but the -e flag sets environment
precedence on all variables. Sounds risky!
More information about the freebsd-ports