Review Board 1.7.16


Only install dahdi_span_config_hook if DAHDI is enabled

Review Request #3972 - Created Sept. 3, 2014 and submitted

David Lee
/branches/13
Reviewers
asterisk-dev
Asterisk
I'm a bit weird, and I configure asterisk with --prefix=/opt/asterisk,
so that I can install it without running as root. The install script
for the DAHDI hook scripts were hard coded to install into /usr/share,
which foils my weirdness.

This patch changes the install to only install the hook script if
DAHDI is enabled. It also adds the script to the uninstall task, and
moves the DAHDI_UDEV_HOOK_DIR variable so that it's not between the
_MAKEOPTS variables and their comment.
Ran ./configure && make all install both with and without DAHDI,
confirming that it worked as expected.

Changes between revision 1 and 2

1 2
1 2

  1. /branches/13/Makefile: Loading...
  2. /branches/13/makeopts.in: Loading...
/branches/13/Makefile
Diff Revision 1 Diff Revision 2
[20] 148 lines
[+20]
149
LINKER_SYMBOL_PREFIX=
149
LINKER_SYMBOL_PREFIX=
150

    
   
150

   
151
# Uncomment this to use the older DSP routines
151
# Uncomment this to use the older DSP routines
152
#_ASTCFLAGS+=-DOLD_DSP_ROUTINES
152
#_ASTCFLAGS+=-DOLD_DSP_ROUTINES
153

    
   
153

   
154
# Default location for DAHDI hook scripts. If you install with a PREFIX other
154
# Default install directory for DAHDI hooks.
155
# than /usr, you may have to change this.
155
DAHDI_UDEV_HOOK_DIR = /usr/share/dahdi/span_config.d
156
DAHDI_UDEV_HOOK_DIR = $(datarootdir)/dahdi/span_config.d

   
157

    
   
156

   
158
# If the file .asterisk.makeopts is present in your home directory, you can
157
# If the file .asterisk.makeopts is present in your home directory, you can
159
# include all of your favorite menuselect options so that every time you download
158
# include all of your favorite menuselect options so that every time you download
160
# a new version of Asterisk, you don't have to run menuselect to set them.
159
# a new version of Asterisk, you don't have to run menuselect to set them.
161
# The file /etc/asterisk.makeopts will also be included but can be overridden
160
# The file /etc/asterisk.makeopts will also be included but can be overridden
[+20] [20] 429 lines
[+20]
591
	$(INSTALL) -m 644 contrib/scripts/autosupport.8 "$(DESTDIR)$(ASTMANDIR)/man8"
590
	$(INSTALL) -m 644 contrib/scripts/autosupport.8 "$(DESTDIR)$(ASTMANDIR)/man8"
592
	$(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
591
	$(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
593
	if [ -f contrib/firmware/iax/iaxy.bin ] ; then \
592
	if [ -f contrib/firmware/iax/iaxy.bin ] ; then \
594
		$(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin "$(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin"; \
593
		$(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin "$(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin"; \
595
	fi
594
	fi

    
   
595
ifeq ($(HAVE_DAHDI),1)
596
	$(INSTALL) -d $(DESTDIR)/$(DAHDI_UDEV_HOOK_DIR)
596
	$(INSTALL) -d $(DESTDIR)/$(DAHDI_UDEV_HOOK_DIR)
597
	$(INSTALL) -m 644 contrib/scripts/dahdi_span_config_hook $(DESTDIR)$(DAHDI_UDEV_HOOK_DIR)/40-asterisk
597
	$(INSTALL) -m 644 contrib/scripts/dahdi_span_config_hook $(DESTDIR)$(DAHDI_UDEV_HOOK_DIR)/40-asterisk

    
   
598
endif
598

    
   
599

   
599
$(SUBDIRS_INSTALL):
600
$(SUBDIRS_INSTALL):
600
	+@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE) -C $(@:-install=) install
601
	+@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE) -C $(@:-install=) install
601

    
   
602

   
602
NEWMODS:=$(foreach d,$(MOD_SUBDIRS),$(notdir $(wildcard $(d)/*.so)))
603
NEWMODS:=$(foreach d,$(MOD_SUBDIRS),$(notdir $(wildcard $(d)/*.so)))
[+20] [20] 267 lines
[+20]
870
	rm -rf "$(DESTDIR)$(ASTDATADIR)/firmware"
871
	rm -rf "$(DESTDIR)$(ASTDATADIR)/firmware"
871
	rm -f "$(DESTDIR)$(ASTMANDIR)/man8/asterisk.8"
872
	rm -f "$(DESTDIR)$(ASTMANDIR)/man8/asterisk.8"
872
	rm -f "$(DESTDIR)$(ASTMANDIR)/man8/astgenkey.8"
873
	rm -f "$(DESTDIR)$(ASTMANDIR)/man8/astgenkey.8"
873
	rm -f "$(DESTDIR)$(ASTMANDIR)/man8/autosupport.8"
874
	rm -f "$(DESTDIR)$(ASTMANDIR)/man8/autosupport.8"
874
	rm -f "$(DESTDIR)$(ASTMANDIR)/man8/safe_asterisk.8"
875
	rm -f "$(DESTDIR)$(ASTMANDIR)/man8/safe_asterisk.8"

    
   
876
ifeq ($(HAVE_DAHDI),1)

    
   
877
	rm -f $(DESTDIR)$(DAHDI_UDEV_HOOK_DIR)/40-asterisk

    
   
878
endif
875
	$(MAKE) -C sounds uninstall
879
	$(MAKE) -C sounds uninstall
876

    
   
880

   
877
uninstall: _uninstall
881
uninstall: _uninstall
878
	@echo " +--------- Asterisk Uninstall Complete -----+"
882
	@echo " +--------- Asterisk Uninstall Complete -----+"
879
	@echo " + Asterisk binaries, sounds, man pages,     +"
883
	@echo " + Asterisk binaries, sounds, man pages,     +"
[+20] [20] 130 lines
/branches/13/makeopts.in
Diff Revision 1 Diff Revision 2
 
  1. /branches/13/Makefile: Loading...
  2. /branches/13/makeopts.in: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.