[LLVMdev] llvm build not respecting DESTDIR?

Ralph Corderoy ralph at inputplus.co.uk
Fri Dec 8 07:05:49 PST 2006


Hi Reid,

> On Thu, 2006-12-07 at 23:31 -0800, Erick Tryzelaar wrote:
> > The only reference I saw to the standard gnu DESTDIR was in the
> > llvm.spec file, but none of the generated Makefiles have that value.
> 
> LLVM isn't strictly a GNU project. It has similarities, but this
> obviously isn't one of them :)

It would be nice to support the common conventions as it means
installation tools like GNU stow would work.

    http://www.gnu.org/software/stow/

> >  Is there another way to do this? 
> 
> Probably.

The stow recipe for building package foo is

    ./configure &&
    make all check &&
    make install prefix=/some/place/else

That is, the desired end installation location is used during
configuration, in this case the default, and building.  It's only during
installation that the makefile puts foo somewhere else.  (GNU stow comes
along later and sets up symlinks from the default location to
/some/place/else allowing easy switching between different versions of
foo.)

> The variables that control this are all defined in the Makefile.config
> file. The variables are:
> 
> PROJ_prefix     := /proj/llvm/install-1
> PROJ_bindir     := /proj/llvm/install-1/bin
> PROJ_libdir     := /proj/llvm/install-1/lib
> PROJ_datadir    := /proj/llvm/install-1/share
> PROJ_docsdir    := /proj/llvm/install-1/docs/llvm
> PROJ_etcdir     := /proj/llvm/install-1/etc/llvm
> PROJ_includedir := /proj/llvm/install-1/include
> PROJ_infodir    := /proj/llvm/install-1/info
> PROJ_mandir     := /proj/llvm/install-1/man

Again, it's `normal' to have `prefix = ...' in the Makefile and then use
`$(prefix)' as a prefix when defining all the others.  Then just one
needs changing on the command line.

Cheers,


Ralph.





More information about the llvm-dev mailing list