bug-bash
[Top][All Lists]
Advanced

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

How to call a new bash function within a makefile


From: OnMyWayHome
Subject: How to call a new bash function within a makefile
Date: Fri, 11 Nov 2005 21:55:40 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915

I don't have gnu.bash on my newsgroup server, so I'm posting this here.

Here is an example GNU makefile:

function DoThis()
{
    echo $0
}

all :
    DoThis "Test"


I've seen this done before where a bash function is defined within a
makefile, and can be subsequently called when a target is matched.

However, when I run 'make' I get the following error:

makefile:3: *** missing separator.  Stop.

Line 3 corresponds to "function DoThis()".

Does anyone know how to embed a bash function inside a GNU makefile?

Any help appreciated,
Chris




reply via email to

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