%% OnMyWayHome <[EMAIL PROTECTED]> 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.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to