From 7aedb1abb4eeb7b9b0f9891ce31073249b5a892c Mon Sep 17 00:00:00 2001 From: file Date: Wed, 18 Jul 2007 16:27:04 +0000 Subject: A distribution may have multiple directories for firmware and without knowing the proper one we have to copy the firmware into each. We can't just copy it into the first one found. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2750 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8c9d3d0..edd01e1 100644 --- a/Makefile +++ b/Makefile @@ -133,10 +133,6 @@ endif # sample makefile "trace print" #tracedummy=$(shell echo ====== GOT HERE ===== >&2; echo >&2) -ifeq ($(HOTPLUG_FIRMWARE),yes) -FIRMWARE_DIR := $(firstword $(wildcard /usr/lib/hotplug/firmware /lib/firmware )) -endif - CHKCONFIG := $(wildcard /sbin/chkconfig) UPDATE_RCD := $(wildcard /usr/sbin/update-rc.d) ifneq (,$(DESTDIR)) @@ -476,9 +472,13 @@ install-udev: devices # FIRMWARE_DIR also implies HOTPLUG_FIRMWARE, unless set manually. firmware: -ifneq (,$(FIRMWARE_DIR)) - install -d $(DESTDIR)$(FIRMWARE_DIR) - install -m 644 wct4xxp/*.ima wctc4xxp/*.bin $(DESTDIR)$(FIRMWARE_DIR) +ifeq ($(HOTPLUG_FIRMWARE),yes) + if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ + install -m 644 wct4xxp/*.ima wctc4xxp/*.bin $(DESTDIR)/usr/lib/hotplug/firmware; \ + fi + if [ -d $(DESTDIR)/lib/firmware ]; then \ + install -m 644 wct4xxp/*.ima wctc4xxp/*.bin $(DESTDIR)/lib/firmware; \ + fi @echo "Installed firmware" else @echo "Not installing firmware because we are not using hotplug firmware" -- cgit v1.2.3