I am working on CBC library and C++. I got an example of make-file along with the library. In the file, there are lines (like the following) having "double dot" inside file path, like 'cat /xxx/yyy/../zzz'.
What does this "double dots" mean? Also, what does the word "cat" do in this case?
".." denotes the parent directory. Like a "go back one directory" indicator.
Therefore: build/lib/../share/
is the same as: build/share/
"cat" usually means "concatenate" -- which means to append one string onto the end of another. What is means in this context I have no idea, I never understood makefiles.
I went to look on those files "cgl_addlibs.txt", "osi_addlibs.txt", "clp_addlibs.txt" and "coinutils_addlibs.txt". They all have only one command option "-lm".
So, in this case, there will be 4 -lm as part of LIBS variable?
The grave accent-delimited string is a bash command idiom to replace the line with the result of the command.
Hence, that line uses a cheap trick to place the contents of those various .txt files into the LIBS variable. If you look at those files, they all contain just a single line with more -llibrary specifications, like
-lCgl_extra
--anything extra that the compile process may need to link the files. As already noted, they only contain a link to the C math library (-lm), which is fine... (repeating libs shouldn't cause problem with a good linker)
However, the idea of adding libraries into the link process that way personally bothers me...