Am Thu, 27. Aug 2009 um 22:10:59 +0200 schrieb Fons Adriaensen:
Hi Fons,
There are also apps that will install into different
places, e.g.
jkmeters installs a binary in $(PREFIX)/bin and some png files in
$(PREFIX)/share/jkmeters.
And to complicate things, the next release of TetraProc will use
$(PREFIX)/share/jkmeters as well, as it installs a subset of the
same png files, and I want them to be shared between all apps that
use them (and that number is bound to increase).
How would you handle this ?
this is quite easy, the install target goes always to
$DESTDIR$PREFIX/somepath
where $PREFIX is commonly "/usr" or "/usr/local" or sometimes
"/opt".
The need for "$DESTDIR" is common to all kind of packaging tools,
because during package build they will install the complete file set to
a temporary path (=DESTDIR) and then wrap it all up.
If you would have a look to a Makefile written by automake/autoconf you
could see (and understand) in detail how it is used (even in a much more
complex setup).
Guido
--
http://www.bayernline.de/~gscholz/
http://www.lug-burghausen.org/