diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-09 16:47:25 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-09 16:47:25 +0000 |
commit | 992c109dc43c08999a1d1bda5a73bcb6768e9eb1 (patch) | |
tree | 302633e903c876a4b6bed28596dd720ab04e8acb /Makefile | |
parent | 3f42ded149faaac0faefa29d0e0ba90dc1605686 (diff) |
Implement the outcome of a discussion on the -dev list re. the use
of DESTDIR and INSTALL_PATH - many thanks to Tzafrir Cohen and
Simon Perreault for extremely useful feedback:
1. comment out the [directories] section the created asterisk.conf ;
you can set the correct defaults at build time using INSTALL_PATH,
so the repetition here is redundant and often wrong.
(The next step now is move asterisk.conf outside the Makefile to
asterisk.conf.sample, because there is little if anything here
that needs to be constructed at build/install time).
2. use DESTDIR?=$(INSTALL_PATH) so you only need to specify a path
once if the two coincide. This should have no ill side effects,
because if you don't specify DESTDIR, you really need
INSTALL_PATH="" to set the correct defaults, and if you specify
DESTDIR the value is not overridden.
The second part required moving the 'export DESTDIR' right after
the assignment to prevent DESTDIR getting set by the export
(this is documented in the Makefile).o hopefully avoid the mistake)$
With this change you can now do something like this from your source tree:
make INSTALL_PATH=/some/place install samples
and then
main/asterisk -vdc
which will pick up the correct config files and libraries from
/some/place - i.e. great for developers!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92002 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -53,7 +53,6 @@ export RANLIB export HOST_CC export STATIC_BUILD export INSTALL -export DESTDIR export PROC export SOLINK export STRIP @@ -88,12 +87,13 @@ OVERWRITE=y # Include debug and macro symbols in the executables (-g) and profiling info (-pg) DEBUG=-g3 -# Staging directory +# DESTDIR is the staging directory. # Files are copied here temporarily during the install process -# For example, make DESTDIR=/tmp/asterisk woud put things in -# /tmp/asterisk/etc/asterisk -# !!! Watch out, put no spaces or comments after the value !!! -#DESTDIR?=/tmp/asterisk +# WARNING: do not put spaces or comments after the value. +# Also, do not export it before this point or the 'export' will +# assign it to the empty string so ?= fails. +DESTDIR?=$(INSTALL_PATH) +export DESTDIR # Define standard directories for various platforms # These apply if they are not redefined in asterisk.conf @@ -578,7 +578,7 @@ samples: adsi @if [ "$(OVERWRITE)" = "y" ] || [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \ echo "Creating asterisk.conf"; \ ( \ - echo "[directories]" ; \ + echo "[directories](!) ; remove the (!) to enable this" ; \ echo "astetcdir => $(ASTETCDIR)" ; \ echo "astmoddir => $(MODULES_DIR)" ; \ echo "astvarlibdir => $(ASTVARLIBDIR)" ; \ |