<div dir="ltr">The usual way to handle this is:<div><br></div><div>The "--prefix" argument or PREFIX env variable is used to specify the location in which the final program/libraries etc will be stored.</div><div><br></div><div>The "--destdir" argument or DESTDIR env variable is used to specify the location in which the build products will be placed when you do "make install". It will probably not be possible to run the program from this location, because it will look for libraries at the "PREFIX" location.</div><div><br></div><div>This makes it easy to simply tar up the entire contents of DESTDIR and then untar them in PREFIX on the same or other machines. Untarring does not affect existing files in the tree you are untarring into.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 23, 2015 at 9:00 AM, Tyler Hardin via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You could just tar up the files that will be installed and write a script to put them in their respective subdirs in /usr/local. (You could probably even steal their install script from the "install" target in their makefile.) If you look in the build directory (or it might be some subdir thereof*), there's usually a 1-1 correspondence between the folder names and the names of the folders where the files go in /usr or /usr/local. (Of course, you should check for conflicts/overwrites.)<div><br></div><div>*: It's been a while since I've compiled LLVM. I just follow the list out of interest in their progress.</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Oct 20, 2015 at 4:26 PM, David Lobron via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">Hey All,<br>
<br>
I'm working on packaging the current version of llvm for use by other people at my company. As part of this, I'd like to make a tarball of my build, so that other users do not have to rebuild from source in order to use llvm for their builds. Ideally, I'd like my makefile to un-tar my build output, and then do a "make install" to install anything that has been updated - we have a standard install root called "common" that lives one directory up from the build directory on our build machines.<br>
<br>
The tricky thing I'm running into is that all of the makefiles generated by cmake contain absolute paths, e.g.,<br>
<br>
"/home/dlobron/build/clangport/akamai/llvm/llvm-3.7/llvm/include/llvm"<br>
<br>
I was wondering if it's possible to build llvm in such a way that all of these files contain relative paths. It would be perfect for me if the above line, and all other generated makefile paths, would read like this:<br>
<br>
"../common/include/llvm"<br>
<br>
I tried setting -DCMAKE_INSTALL_PREFIX, but it picked up the full path- I wasn't sure how to tell it to keep the path relative.<br>
<br>
Thanks for any help you can give!<br>
<span><font color="#888888"><br>
--David</font></span><br></div></div><span class="">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></span></blockquote></div><br></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>