On Mon, 2024-01-01 at 04:20 +0800, lijh8 wrote: > libtool creates both symlinks to the real library file. > But CMake creates one symlink to the real file and another symlink to > the first symlink. > > I'm sticking with manual Makefile but which way should I follow?
First, I don't think this is a useful place to look for answers since it doesn't really matter to make which way you choose. There's no difference between the two options except that if you use a "chained link" model then conceivably you could avoid replacing the "outer" link and just replace the "inner" link if the major so version doesn't change. With the libtool method you would always replace both links. But in reality your makefile will always replace both links anyway; it doesn't seem useful to add the complexity needed to avoid it. So, there's no difference. Remember that symlinks are expanded by the _kernel_ when you open the file; it's not possible to tell the difference unless you go out of your way to do so by checking for symlinks using a special system call. -- Paul D. Smith <psm...@gnu.org> Find some GNU make tips at: https://www.gnu.org http://make.mad-scientist.net "Please remain calm...I may be mad, but I am a professional." --Mad Scientist