%% OnMyWayHome <blank@blank.org> writes:
o> I don't have gnu.bash on my newsgroup server, so I'm posting this here.
o> Here is an example GNU makefile:
o> function DoThis()
o> {
o> echo $0
o> }
o> all :
o> DoThis "Test"
o> I've seen this done before where a bash function is defined within a
o> makefile, and can be subsequently called when a target is matched.
You must have been imagining things :-)
This is not, and never has been supported. At least, not in GNU make.
Makefiles must contain make syntax. They cannot contain shell
functions.
I mean, I guess you could do something like this:
defineDoThis = function DoThis() { echo $0; }
all:
$(defineDoThis); DoThis "Test"
but I doubt that's what you're looking for.