[Top][All Lists]

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

Re: how to make symbolic links?

From: Paul Smith
Subject: Re: how to make symbolic links?
Date: Wed, 07 Sep 2011 23:57:17 -0400

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 <address@hidden>          Find some GNU make tips at:            
 "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]