Summary:ASTERISK-10491: make config does not honor DESTDIR
Reporter:Daniel Hazelbaker (cabal95)Labels:
Date Opened:2007-10-10 15:03:36Date Closed:2007-10-15 14:56:06
Versions:Frequency of
Environment:Attachments:( 0) asterisk-1.4.13-makeconfig.patch
( 1) asterisk-1.4.13-makeconfig-r2.patch
Description:When doing a make DESTDIR=xxx config, the config rule does not honor the DESTDIR variable.  Attached patch file to fix.  Patched against 1.4.13 (Cannot select that version yet).
Comments:By: Daniel Hazelbaker (cabal95) 2007-10-10 16:59:07

Accidently forgot a portion of the patch when I extracted it from another patch file.

By: Tzafrir Cohen (tzafrir) 2007-10-11 16:16:05

Is it reproducable even if DESTDIR is a full path?

If DESTDIR is a relative path funny things happen. I normally run 'make install DESTDIR=$PWD/target' to install into the subdirectory 'target' .

By: Daniel Hazelbaker (cabal95) 2007-10-11 16:51:02

Do you mean does it work correctly if DESTDIR is an absolute path?  No, it doesn't.  This patch is essentially two things.

1) the $(INSTALL) command is run without $(DESTDIR) so anytime you 'make config' it always goes into the system /etc path instead of $(DESTDIR).  This part shouldn't matter wether DESTDIR is absolute or relative.

2) The chkconfig / rc-update command is always run. For sure when we build an RPM we don't want that to happen.  I would think if $(DESTDIR) is set then we don't want to run those commands as they will probably error out since the files are not in the correct place.

Neither of these issues should be determined by $(DESTDIR) being absolute or relative.

By: Digium Subversion (svnbot) 2007-10-15 14:56:05

Repository: asterisk
Revision: 85685

_U  trunk/
U   trunk/Makefile

r85685 | qwell | 2007-10-15 14:56:05 -0500 (Mon, 15 Oct 2007) | 14 lines

Merged revisions 85684 via svnmerge from

(closes issue ASTERISK-10491)
r85684 | qwell | 2007-10-15 15:15:51 -0500 (Mon, 15 Oct 2007) | 5 lines

Properly use DESTDIR in 'config' target.
Do not try to run chkconfig or similar if using DESTDIR.

Issue 10938, patch by cabal95.