rebuilderd icon indicating copy to clipboard operation
rebuilderd copied to clipboard

'make DESTDIR=/usr/local install' does it wrong

Open h01ger opened this issue 4 months ago • 3 comments

I did an install using 'make DESTDIR=/usr/local install' and the result is that stuff gets installed to eg /usr/local/usr/bin/rebuilderd which is wrong. This happens to all the installed artifacts...

Happy to explain more if needed.

h01ger avatar Aug 21 '25 20:08 h01ger

to make things clear: DESTDIR=/usr/local should install binaries into /usr/local/bin and DESTDIR=/opt should install binaries into /opt/bin while currently they get installed to /usr/local/usr/bin or /opt/usr/bin respectively and so forth...

h01ger avatar Aug 21 '25 21:08 h01ger

According to the documentation this is correct behavior: https://www.gnu.org/prep/standards/html_node/DESTDIR.html

make DESTDIR=/tmp/stage install

[...]

If your installation step would normally install /usr/local/bin/foo and /usr/local/lib/libfoo.a, then an installation invoked as in the example above would install /tmp/stage/usr/local/bin/foo and /tmp/stage/usr/local/lib/libfoo.a instead.

So setting DESTDIR=/usr/local would result in /usr/local/usr/local/lib/libfoo.a

kpcyrd avatar Aug 21 '25 23:08 kpcyrd

@h01ger I think you mean PREFIX: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html#index-prefix

jspricke avatar Aug 22 '25 06:08 jspricke