On Wed, 2011-09-07 at 20:07 -0700, Mark Galeck (CW) wrote:
> ln -s dir1/foobar1 dir/foobar
> ln: creating symbolic link `dir/foobar' to `dir1/foobar1': File exists
> make: *** [dir/foobar] Error 1
> 
> 
> and the closer inspection with -d, reveals that make for some reason
> thinks the target does not even exist!

Make is right.  It doesn't exist.  If you try to "cat" it for example
you'll get the same error.

When you run:

        ln -s dir1/foobar1 dir/foobar

that creates a symbolic link "foobar1" in the dir1 directory, and the
link points to "dir/foobar":

        dir/foobar  ->  dir1/foobar1

But that's not right: for this to be correct you'd have to have a file
dir/dir1/foobar1 which you don't.

What you want here is:

        ln -s ../dir1/foobar1 dir/foobar

This would give you:

        dir/foobar  ->  ../dir1/foobar1

which is what you want based on your email.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email protected]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to