Overview
| Artifact ID: | 866a699858a0b6314a2dafc79bf095ff75afcd8c |
|---|---|
| Ticket: | 3598282fffffffffffffffffffffffffffffffff
unix: make install fails when DESTDIR is used |
| User & Date: | roflz on 2012-12-28 15:16:05 |
Changes
- icomment:
DESTDIR != prefix DESTDIR is a way for packagers to install stuff into a different location than where it will be used finally, so it doesn't clutter their build machine, and so that the can see which files are getting installed. in my specific case, my distribution uses prefix=/ and DESTDIR=/opt/packagename for any package that gets built. then a filelist of /opt/packagename is created, and all files in /opt/packagename get symlinked into / (prefix). this way, installing a binary package is as easy as untarring it into /opt (or some alternative location), and then call a script which creates the filelist and symlinks it into place. if i would use prefix for this, internal dependencies in the generated libraries and binaries would point to /opt/packagename instead of the intended prefix. packages using autoconf (approx 95-98% of all packages on debian) automatically provide the distinct prefix and DESTDIR functionality, which makes them very easy to handle for packagers. a proper Makefile which adheres to these widely accepted and used standard just install its files into $(DESTDIR)$(prefix) (note that there are no slashes) so the combination prefix="" (empty) and DESTDIR=/opt/tcl would install tclsh into /opt/tcl/bin and the line in the makefile would look like: install -D -m 755 tclsh $(DESTDIR)$(prefix)/bin/
- login: "roflz"
- mimetype: "text/plain"
- username: "roflz"