help-make
[Top][All Lists]
Advanced

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

Re: Make using a function defined in my .bashrc


From: Stephan Beal
Subject: Re: Make using a function defined in my .bashrc
Date: Thu, 7 Feb 2008 16:55:46 +0100

On Feb 7, 2008 4:05 PM, sclemow <address@hidden> wrote:

Hi,

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.

There are a couple problems with that:

a) ~/.bashrc is not read if bash is called with the name "sh", which it is (if i'm not mistaken) by default. That means you need this line at the top of your makefile:

SHELL := /path/to/bash

Also, read 'man bash':

       ~/.bashrc
              The individual per-interactive-shell startup file

per INTERACTIVE shell. Make shells are non-interactive.

--
----- stephan beal
http://wanderinghorse.net/home/stephan/
reply via email to

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