[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make using a function defined in my .bashrc

From: Greg Chicares
Subject: Re: Make using a function defined in my .bashrc
Date: Thu, 07 Feb 2008 15:47:32 +0000
User-agent: Thunderbird (Windows/20071031)

On 2008-02-07 15:05Z, sclemow wrote:
> I have defined a function in my .bashrc file that I would like to use within
> a step in my Makefile, however Make doesn't seem to recognise the function
> exists. Is there a way that I can make it do this?
> I have tried it with an alias too, for some reason Make doesn't pick up
> these from my environment.

'make' uses /bin/sh unless you set SHELL in the makefile itself.
If 'bash' is invoked as 'sh', then it uses '--norc' by default,
so '~/.bashrc' is skipped.

I'd try setting SHELL to '/bin/bash' in the makefile. It becomes
less portable because it depends on 'bash', but that sounds like
what you want.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]