%% Boris Kolpackov <[EMAIL PROTECTED]> writes:

  bk> Hi Paul,

  >> GNU make strips trailing slashes, so that "foo/" and "foo" are
  >> considered the same prerequisite.

  bk> Is it because make just does it this way or there is some deep 
  bk> reason for that?

It's done so that if you write:

    foo: bar/

in one place in your makefile, and:

    bar: biz

another place, and:

    boz: $(CURDIR)/bar

in a third place, make realizes they are all the same target and won't
try to build them multiple times (or, say "don't know how to build ..."
for one or more of them).

  bk> For example, $(dir) does not strip the trailing slash. Oh, but $(@D)
  bk> does...

These are user functions.  I'm talking about make's internal
representation of the target name, that it uses to walk the DAG.

-- 
-------------------------------------------------------------------------------
 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://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to