bug-make
[Top][All Lists]
Advanced

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

Re: define strangeness


From: Paul D. Smith
Subject: Re: define strangeness
Date: Fri, 16 Apr 2004 15:52:33 -0400

%% Boris Kolpackov <address@hidden> writes:

  bk> Consider this makefile:

  bk> foobar := world

  bk> define name
  bk> \
  bk> foobar
  bk> endef

  bk> .PHONY: hello
  bk> hello: ; @echo hello $(value $(name))

  bk> It prints just "hello". I would guess it is because define assigns
  bk> the value verbatim

Correct.

It's not clear to me how you expect this to behave.  By the time make
starts to expand variables it has already resolved all the
backslash/newline pairs: it has to do this first or nothing works
properly.

Are you saying that it should perform _ANOTHER_ round of
backslash/newline resolution at some point during the parsing or
expansion of variables?  Exactly when?  How will this impact backward
compatibility?  Or are some functions going to do it and others not?

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          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




reply via email to

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