%% Will Partain <[EMAIL PROTECTED]> writes:

  wp> Hi; I don't know if the little Makefile below *ought* to
  wp> work or not; it seems it should.

No.  define/endef is not supported directly in kernel-specific
variables.  The entire definition must fit onto one logical line.

You can always do this:

  define _foo
  @echo This is a multi-line definition
  @echo of myvar with foo in it.
  endef

  define _bar
  @echo This is a multi-line definition
  @echo of myvar with bar in it.
  endef


  foo : myvar = $(_foo)

  bar : myvar = $(_bar)

  foo :
          $(myvar)

  bar :
          $(myvar)


Of course in this simple example there are much less complex ways to
manage this; just using $@ would be enough:

  define myvar
  @echo This is a multi-line definition
  @echo of myvar with $@ in it.
  endef

  foo :
          $(myvar)

  bar :
          $(myvar)


-- 
-------------------------------------------------------------------------------
 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-make mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to