Actually, the answer depends on whether the app you're compiling supports DESTDIR in the first place (most modern apps made by competent programmers will).
The
./configure and
make are to be done as "normal"... eg.:
Code:
./configure --prefix=/usr
make
The
make install bit would depends on whether the app you're compiling (actually it's Makefile) supports DESTDIR... Here's a method to test:
If it returns something (or most likely some things), that resemble Makefile entries... then, most likely the app supports DESTDIR... So to install to a temp dir, you can safely do this:
Code:
make DESTDIR=/tmp/temp_dir install
No DESTDIR support? Don't despair... do this instead:
Code:
make prefix=/tmp/temp_dir install
Hope this helps