diff options
-rw-r--r-- | Makefile | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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" |