%% "galathaea galathaea" <[EMAIL PROTECTED]> writes:

  >> The ability to use recursive functions with "call" was added in
  >> 3.80 I believe.

  gg> I could more easily convince the powers that be to upgrade to 3.80
  gg> than 3.81, so that is good news.

That's really too bad: there are a number of serious bugs in 3.80 which
have been fixed in 3.81, especially in the area of $(eval ...) etc.

To date I don't know of any critical bugs in 3.81, after 6+ weeks.  Note
that some Linux distributions, such as Debian, have already upgraded to
3.81 and are using it for all their builds.

  gg> I used:

  gg> nothing:=
  gg> space:=$(nothing) $(nothing)

  gg> and performed the calculation in three steps:
  gg> 1) exchange directory separators for spaces (so now we have a list!)
  gg> 2) for each item in the list:
  gg>   2a) add it to a calculation list
  gg>   2b) if the current element is the name I am looking for, store a final
  gg> copy of the calculation list
  gg> 3) substitute the directory separators back in for spaces (and an
  gg>    extra one up front)

  gg> Its a very imperative algorithm that I did not like, but at least got me
  gg> past the hurdle.

Similar thinking, but much simpler, is my original suggestion:

    dir := $(word 1,$(subst /TOP/, ,$(CURDIR)/))

This breaks the pathname into two words split at the "/TOP/" delimiter,
then returns the first word.

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