%% Ken Smith <[EMAIL PROTECTED]> writes:

  ks> I can't justify to myself why this makefile
  ks> define something
  ks>   ifneq (,)
  ks>     $(warning weird)
  ks>   endif
  ks> endef

  ks> $(call something)

  ks> generates the following output

  ks> testcase.mk:6: weird
  ks> testcase.mk:6: *** missing separator.  Stop.

The expansion of every variable and function must result in a single
line.  You cannot expand into multiple lines.

There are two exceptions to this rule: first, you can expand into
multiple lines within a command script, so something like this works:

    define FOO
        @echo hello
        @echo world
    endef

    foo:
            $(FOO)

And second, the argument to the special $(eval ...) function can contain
multiple lines.


No other expansion can result in multiple lines being produced.

-- 
-------------------------------------------------------------------------------
 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


_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to