Boost C++ Libraries: Ticket #4934: Please support DESTDIR/--destdir for installation into a virtual root https://svn.boost.org/trac10/ticket/4934 <p> If you've read the GNU coding standards or used GNU automake, as examples, these (and other) tools and standards specify a DESTDIR (destination directory) for "make install". The purpose is to separate the installation prefix/exec-prefix/libdir/includedir locations from the root where they actually get installed. </p> <p> As an example, if I configure with --prefix=/usr and libdir is ${prefix}/lib, "make install" will install into ${prefix}/lib. </p> <p> However, if I do "make DESTDIR=/tmp/tmpdir install", then installation will be into "/tmp/tmpdir/${prefix}/lib". It's actually installing into ${DESTDIR}${libdir}, where DESTDIR is empty by default. </p> <p> Why is this needed? It's mainly used for packaging purposes, because if I want to make .deb or .rpm packages, or even just a .tar.gz of the built files, I don't want to install onto the base system, I want to install into a temporary directory location (virtual root) so I can then package up the files. </p> <p> Now, I could use "--prefix=/tmp/tmpdir/usr", and this is in fact what Debian is currently doing. However, if I want to actually use the value of ${prefix}, it should be "/usr" and it's actually set to "/tmp/tmpdir/usr", which is obviously wrong. </p> <p> I would like to suggest that an additional bjam option --destdir would allow one to do this: </p> <pre class="wiki"> bjam --prefix=/usr --destdir=/tmp/tmpdir install </pre><p> rather than the incorrect </p> <pre class="wiki"> bjam --prefix=/tmp/tmpdir/usr install </pre><p> which is currently the only possible method to use. </p> <p> This is related to bug <a class="assigned ticket" href="https://svn.boost.org/trac10/ticket/1094" title="#1094: Feature Requests: Finding the correct library to link (feature request for pkg-config ... (assigned)">#1094</a> because this will insert the directory locations into the generated .pc file. If you bootstrap with the DESTDIR included in the --prefix, you'll end up with buggy .pc files containing the wrong locations. Using --destdir means the configured locations are always correct. </p> <p> Many thanks, Roger </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4934 Trac 1.4.3 Roger Leigh <rleigh@…> Sun, 05 Dec 2010 19:30:55 GMT <link>https://svn.boost.org/trac10/ticket/4934#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4934#comment:1</guid> <description> <p> Sorry, this is a duplicate of <a class="new ticket" href="https://svn.boost.org/trac10/ticket/1811" title="#1811: Patches: Help packaging by supporting DESTDIR (new)">#1811</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Mon, 06 Dec 2010 14:09:51 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4934#comment:2 https://svn.boost.org/trac10/ticket/4934#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> Ticket