bug-make
[Top][All Lists]
Advanced

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

Re: creation of a directory


From: Paul D. Smith
Subject: Re: creation of a directory
Date: Fri, 30 Jan 2004 13:01:15 -0500

%% Boris Kolpackov <address@hidden> 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 <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]