[asterisk-dev] DESTDIR vs INSTALL_PATH ?

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sun Dec 9 08:43:57 CST 2007


On Sun, Dec 09, 2007 at 06:16:18AM -0800, Luigi Rizzo wrote:
> hi,
> there is some confusion (in trunk at least) on the role of DESTDIR
> and INSTALL_PATH.
> 
> DESTDIR is widely used in the top level Makefile (and below) to determine
> where things get installed. There are two noticeable exceptions:
> 
> 1. in creating asterisk.conf (which is part of the 'samples' target),
>    DESTDIR is ignored, so the entries in [directories] are wrong if you
>    install to a non-standard place.
> 
>    PROPOSED FIX: prepend ${DESTDIR} to all the entries in [directories]
>    in the code that creates asterisk.conf . This should not break anything.

Why would you need that? DESTDIR is normally not a path that is used in
real life. Consider installing to a subtree for the purpose of
packaging. 

Currently the following has funny results:

  make install DESTDIR=relative/path

As it is interepted differently by subdirectories.

Hence I use:

  make install $PWD/subdir

And this works well.


As for asterisk.conf: this is pure duplication. The compiled defualts
are already there. 

Maybe what you need is:

  http://svn.digium.com/svn/asterisk/team/group/zapata_conf/contrib/scripts/live_ast

(Note: I actively append DESTDIR because I need to run Asterisk in the
real system from it)

> 
> 2. in defining the compiled-in defaults, build_tools/make_defaults_h
>    uses INSTALL_PATH instead of DESTDIR. According to grep, this is the
>    only file (in addition to doc/osp.txt) where INSTALL_PATH, and i don't
>    see much of a reason for using two different variables to mean the
>    same thing.

I think it stands there for $prefix.

But then again: '#define AST_CONFIG_DIR "${INSTALL_PATH}${ASTETCDIR}"' ?

> 
>    PROPOSED FIX: replace INSTALL_PATH with DESTDIR in
>    build_tools/make_defaults_h . For some amount of time we could
>    put a warning the Makefile to detect the setting of INSTALL_PATH,
>    and inform the user that the variable is deprecated.

I'm not yet sure what it is actually used for.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-dev mailing list