DESTDIR and PREFIX of make

后端 未结 3 1847
情书的邮戳
情书的邮戳 2020-12-07 06:44

I am trying to make software install to a specific directory. I found several ways, but not sure what are the differences between them.

  1. ./configure --pre
3条回答
  •  隐瞒了意图╮
    2020-12-07 07:42

    This can help illustrating the use of DESTDIR and --prefix (from here):

    Multiple installs using --prefix and DESTDIR:

    Sepcify a different --prefix location/option for each build - at configure time. For eg:

    untar petsc tar ball
    ./configure --prefix=/opt/petsc/petsc-3.9.0-mpich --with-mpi-dir=/opt/mpich
    make
    make install DESTDIR=/tmp/petsc-pkg
    untar petsc tar ball
    ./configure --prefix=/opt/petsc/petsc-3.9.0-openmpi --with-mpi-dir=/opt/openmpi
    make
    make install DESTDIR=/tmp/petsc-pkg
    

提交回复
热议问题