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.

Diff revision 2 (Latest)

1 2
1 2

  1. /branches/13/Makefile: Loading...
  2. /branches/13/makeopts.in: Loading...
/branches/13/Makefile
Revision 422582 New Change
[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 install directory for DAHDI hooks.

    
   
155
DAHDI_UDEV_HOOK_DIR = /usr/share/dahdi/span_config.d

    
   
156

   
154
# 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
155
# 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
156
# 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.
157
# 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
158
# by the file in your home directory.
161
# by the file in your home directory.
159

    
   
162

   
160
DAHDI_UDEV_HOOK_DIR = /usr/share/dahdi/span_config.d

   
161

    
   

   
162
GLOBAL_MAKEOPTS=$(wildcard /etc/asterisk.makeopts)
163
GLOBAL_MAKEOPTS=$(wildcard /etc/asterisk.makeopts)
163
USER_MAKEOPTS=$(wildcard ~/.asterisk.makeopts)
164
USER_MAKEOPTS=$(wildcard ~/.asterisk.makeopts)
164

    
   
165

   
165
MOD_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
166
MOD_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
166
OTHER_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
167
OTHER_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
[+20] [20] 422 lines
[+20]
589
	$(INSTALL) -m 644 contrib/scripts/autosupport.8 "$(DESTDIR)$(ASTMANDIR)/man8"
590
	$(INSTALL) -m 644 contrib/scripts/autosupport.8 "$(DESTDIR)$(ASTMANDIR)/man8"
590
	$(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
591
	$(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
591
	if [ -f contrib/firmware/iax/iaxy.bin ] ; then \
592
	if [ -f contrib/firmware/iax/iaxy.bin ] ; then \
592
		$(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"; \
593
	fi
594
	fi

    
   
595
ifeq ($(HAVE_DAHDI),1)
594
	$(INSTALL) -d $(DESTDIR)/$(DAHDI_UDEV_HOOK_DIR)
596
	$(INSTALL) -d $(DESTDIR)/$(DAHDI_UDEV_HOOK_DIR)
595
	$(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
596

    
   
599

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

    
   
602

   
600
NEWMODS:=$(foreach d,$(MOD_SUBDIRS),$(notdir $(wildcard $(d)/*.so)))
603
NEWMODS:=$(foreach d,$(MOD_SUBDIRS),$(notdir $(wildcard $(d)/*.so)))
[+20] [20] 267 lines
[+20]
868
	rm -rf "$(DESTDIR)$(ASTDATADIR)/firmware"
871
	rm -rf "$(DESTDIR)$(ASTDATADIR)/firmware"
869
	rm -f "$(DESTDIR)$(ASTMANDIR)/man8/asterisk.8"
872
	rm -f "$(DESTDIR)$(ASTMANDIR)/man8/asterisk.8"
870
	rm -f "$(DESTDIR)$(ASTMANDIR)/man8/astgenkey.8"
873
	rm -f "$(DESTDIR)$(ASTMANDIR)/man8/astgenkey.8"
871
	rm -f "$(DESTDIR)$(ASTMANDIR)/man8/autosupport.8"
874
	rm -f "$(DESTDIR)$(ASTMANDIR)/man8/autosupport.8"
872
	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
873
	$(MAKE) -C sounds uninstall
879
	$(MAKE) -C sounds uninstall
874

    
   
880

   
875
uninstall: _uninstall
881
uninstall: _uninstall
876
	@echo " +--------- Asterisk Uninstall Complete -----+"
882
	@echo " +--------- Asterisk Uninstall Complete -----+"
877
	@echo " + Asterisk binaries, sounds, man pages,     +"
883
	@echo " + Asterisk binaries, sounds, man pages,     +"
[+20] [20] 130 lines
/branches/13/makeopts.in
Revision 422582 New Change
 
  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.