[asterisk-bugs] [Zaptel 0010764]: Makefile incorrectly uses DESTDIR at times

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Sep 20 12:34:14 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10764 
====================================================================== 
Reported By:                cabal95
Assigned To:                qwell
====================================================================== 
Project:                    Zaptel
Issue ID:                   10764
Category:                   General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Zaptel Version:             1.4.5.1  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             09-19-2007 19:06 CDT
Last Modified:              09-20-2007 12:34 CDT
====================================================================== 
Summary:                    Makefile incorrectly uses DESTDIR at times
Description: 
The makefile for zaptel has (that I found) 2 places where it is using
DESTDIR incorrectly and 1 place where (somewhat unrelated, but I came
across it while fixing the DESTDIR problem) it uses ifneq instead of ifeq.
The attached patch fixes those problems.
====================================================================== 

---------------------------------------------------------------------- 
 cabal95 - 09-20-07 12:34  
---------------------------------------------------------------------- 
The ifneq -> ifeq fixes have been made in SVN, but the other fix for the
$CONFIG_FILE being installed into $DESTDIR/$DESTDIR/etc was made backwards
I believe.  It is now installed in the correct place but ZAPTEL_CONFIG is
defined, at compile time, to be $DESTDIR/etc/zaptel.conf.  I believe the
correct fix is to use the $DESTDIR at install time and take it out of the
$CONFIG_FILE definition.

As is now:
CONFIG_FILE=$(DESTDIR)/etc/zaptel.conf
CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\"
...
ifneq (,$(wildcard $(CONFIG_FILE)))
        $(INSTALL) -D -m 644 zaptel.conf.sample $(CONFIG_FILE)
endif

Should be:
CONFIG_FILE=/etc/zaptel.conf
CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\"
...
ifneq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
        $(INSTALL) -D -m 644 zaptel.conf.sample $(DESTDIR)$(CONFIG_FILE)
endif 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
09-20-07 12:34  cabal95        Note Added: 0070844                          
======================================================================




More information about the asterisk-bugs mailing list