Asfand Yar Qazi wrote:
Actually, I'm writing an installation script that automatically
downloads/compiles/installs gcc-4.1 from SVN. And the same location
(/usr/local/gcc) is also holding or is going to hold other versions of gcc
(4.0.2, 2.95.3) and I want them all to co-exist as gcc-2.95.3, g++-4.1.0, etc.
I rename the files from the DESTDIR/bin/XXX to /usr/local/gcc/bin/XXX-4.1.0
etc., and do the same with the man pages so they can co-exist with other
versions (so I know which compiler takes which flags, etc.) I'd rather not do
a straight make install and then rename/delete in the target directory - too
messy. I'd rather just copy across the files I need.
If that is your goal then you should set --prefix to the same for all of
them, forget DESTDIR, and use --program-suffix or
--program-transform-name in concert with
--enable-version-specific-runtime-libs. Work with the grain of the
build system instead of against it.