help-make
[Top][All Lists]
Advanced

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

RE: why does make strip / at the end of a directory prerequisite??


From: Mark Galeck (CW)
Subject: RE: why does make strip / at the end of a directory prerequisite??
Date: Thu, 8 Sep 2011 06:28:50 -0700

I see, thank you.

Well, in my case, I want to use this for directories, not symlinks, and I want 
to use it so it is easy to see what is a directory, and it is easy for make to 
make a directory, without having to specify it all-the-time:

%/:
        mkdir -p $@


So this is just "syntactic sugar" for me.  I use syntactic sugar all the time.  
In this case, I found out that I could put more sugar to make it work:

%/.:
        mkdir -p $@

but unfortunately, that's too much sugar for other purposes...


>Just FYI:

if foobar is a symlink to a dir then 'ls foobar' and 'ls foobar/' will give
you different results.

That is only to point out that the two are not 100% semantically equivalent
in all contexts:

>Another example of when they're not 100% equivalent is when copying/moving
multiple files and the final target is a directory which does not exist:




reply via email to

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