From f04d4763e0539c62364abcb084e9cd6a4b7a8b82 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Tue, 17 Jun 2008 21:59:45 +0000 Subject: file does not need to be executable, Makefile will make it that way when creating usable version of it git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4382 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/firmware/Makefile | 123 ++++++++++++++++++++-------------------- 1 file changed, 63 insertions(+), 60 deletions(-) (limited to 'drivers/dahdi/firmware') diff --git a/drivers/dahdi/firmware/Makefile b/drivers/dahdi/firmware/Makefile index 54ce709..e3f99b7 100644 --- a/drivers/dahdi/firmware/Makefile +++ b/drivers/dahdi/firmware/Makefile @@ -63,26 +63,12 @@ have_download: # Download and extract firmware tarballs dahdi-fw-oct6114-064-%.tar.gz: have_download + echo "FOO" ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes) @echo "Attempting to download $@" @if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi; @if test ! -f $@; then exit 1; fi; \ (cat $@ | gzip -d | tar -xf -) -ifeq ($(HOTPLUG_FIRMWARE),yes) - @echo "Installing dahdi-fw-oct6114-064.bin to hotplug firmware directories" - if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ - $(INSTALL) -m 644 dahdi-fw-oct6114-064.bin $(DESTDIR)/usr/lib/hotplug/firmware; \ - rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-064-*; \ - touch $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION); \ - fi - if [ -d $(DESTDIR)/lib/firmware ]; then \ - $(INSTALL) -m 644 dahdi-fw-oct6114-064.bin $(DESTDIR)/lib/firmware; \ - rm -rf $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-064-*; \ - touch $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION); \ - fi -endif -else - @echo "Firmware dahdi-fw-oct6114-064.bin is already installed with required version $(OCT6114_064_VERSION)" endif dahdi-fw-oct6114-128-%.tar.gz: have_download @@ -91,21 +77,6 @@ ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/usr/l @if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi; @if test ! -f $@; then exit 1; fi; \ (cat $@ | gzip -d | tar -xf -) -ifeq ($(HOTPLUG_FIRMWARE),yes) - @echo "Installing dahdi-fw-oct6114-128.bin to hotplug firmware directories" - if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ - $(INSTALL) -m 644 dahdi-fw-oct6114-128.bin $(DESTDIR)/usr/lib/hotplug/firmware; \ - rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-128-*; \ - touch $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION); \ - fi - if [ -d $(DESTDIR)/lib/firmware ]; then \ - $(INSTALL) -m 644 dahdi-fw-oct6114-128.bin $(DESTDIR)/lib/firmware; \ - rm -rf $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-128-*; \ - touch $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION); \ - fi -endif -else - @echo "Firmware dahdi-fw-oct6114-128.bin is already installed with required version $(OCT6114_128_VERSION)" endif dahdi-fw-tc400m-%.tar.gz: have_download @@ -114,21 +85,6 @@ ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/usr/l @if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi; @if test ! -f $@; then exit 1; fi; \ (cat $@ | gzip -d | tar -xf -) -ifeq ($(HOTPLUG_FIRMWARE),yes) - @echo "Installing dahdi-fw-tc400m.bin to hotplug firmware directories" - if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ - $(INSTALL) -m 644 dahdi-fw-tc400m.bin $(DESTDIR)/usr/lib/hotplug/firmware; \ - rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-tc400m-*; \ - touch $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION); \ - fi - if [ -d $(DESTDIR)/lib/firmware ]; then \ - $(INSTALL) -m 644 dahdi-fw-tc400m.bin $(DESTDIR)/lib/firmware; \ - rm -rf $(DESTDIR)/lib/firmware/.dahdi-fw-tc400m-*; \ - touch $(DESTDIR)/lib/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION); \ - fi -endif -else - @echo "Firmware dahdi-fw-tc400m.bin is already installed with required version $(TC400M_VERSION)" endif dahdi-fw-vpmadt032-%.tar.gz: have_download @@ -137,21 +93,6 @@ ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/usr/l @if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi; @if test ! -f $@; then exit 1; fi; \ (cat $@ | gzip -d | tar -xf -) -ifeq ($(HOTPLUG_FIRMWARE),yes) - @echo "Installing dahdi-fw-vpmadt032.bin to hotplug firmware directories" - if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ - $(INSTALL) -m 644 dahdi-fw-vpmadt032.bin $(DESTDIR)/usr/lib/hotplug/firmware; \ - rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-vpmadt032-*; \ - touch $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION); \ - fi - if [ -d $(DESTDIR)/lib/firmware ]; then \ - $(INSTALL) -m 644 dahdi-fw-vpmadt032.bin $(DESTDIR)/lib/firmware; \ - rm -rf $(DESTDIR)/lib/firmware/.dahdi-fw-vpmadt032-*; \ - touch $(DESTDIR)/lib/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION); \ - fi -endif -else - @echo "Firmware dahdi-fw-vpmadt032.bin is already installed with required version $(VPMADT032_VERSION)" endif # Clean up any downloaded/extracted firmware packages @@ -169,6 +110,68 @@ object-build: $(FIRMWARE) $(OBJECT_FILES) # Install all downloaded firmware images for hotplug usage and build headers for inclusion hotplug-install: $(FIRMWARE) +ifeq ($(HOTPLUG_FIRMWARE),yes) +ifeq ($(shell if ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes) + @echo "Installing dahdi-fw-oct6114-064.bin to hotplug firmware directories" + if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ + $(INSTALL) -m 644 dahdi-fw-oct6114-064.bin $(DESTDIR)/usr/lib/hotplug/firmware && \ + (rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-064-*; \ + touch $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION)); \ + fi + if [ -d $(DESTDIR)/lib/firmware ]; then \ + $(INSTALL) -m 644 dahdi-fw-oct6114-064.bin $(DESTDIR)/lib/firmware && \ + (rm -rf $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-064-*; \ + touch $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION)); \ + fi +else + @echo "Firmware dahdi-fw-oct6114-064.bin is already installed with required version $(OCT6114_064_VERSION)" +endif +ifeq ($(shell if ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes) + @echo "Installing dahdi-fw-oct6114-128.bin to hotplug firmware directories" + if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ + $(INSTALL) -m 644 dahdi-fw-oct6114-128.bin $(DESTDIR)/usr/lib/hotplug/firmware && \ + (rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-128-*; \ + touch $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION)); \ + fi + if [ -d $(DESTDIR)/lib/firmware ]; then \ + $(INSTALL) -m 644 dahdi-fw-oct6114-128.bin $(DESTDIR)/lib/firmware && \ + (rm -rf $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-128-*; \ + touch $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION)); \ + fi +else + @echo "Firmware dahdi-fw-oct6114-128.bin is already installed with required version $(OCT6114_128_VERSION)" +endif +ifeq ($(shell if ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes) + @echo "Installing dahdi-fw-tc400m.bin to hotplug firmware directories" + if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ + $(INSTALL) -m 644 dahdi-fw-tc400m.bin $(DESTDIR)/usr/lib/hotplug/firmware && \ + (rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-tc400m-*; \ + touch $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION)); \ + fi + if [ -d $(DESTDIR)/lib/firmware ]; then \ + $(INSTALL) -m 644 dahdi-fw-tc400m.bin $(DESTDIR)/lib/firmware && \ + (rm -rf $(DESTDIR)/lib/firmware/.dahdi-fw-tc400m-*; \ + touch $(DESTDIR)/lib/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION)); \ + fi +else + @echo "Firmware dahdi-fw-tc400m.bin is already installed with required version $(TC400M_VERSION)" +endif +ifeq ($(shell if ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes) + @echo "Installing dahdi-fw-vpmadt032.bin to hotplug firmware directories" + if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ + $(INSTALL) -m 644 dahdi-fw-vpmadt032.bin $(DESTDIR)/usr/lib/hotplug/firmware && \ + (rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-vpmadt032-*; \ + touch $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION)); \ + fi + if [ -d $(DESTDIR)/lib/firmware ]; then \ + $(INSTALL) -m 644 dahdi-fw-vpmadt032.bin $(DESTDIR)/lib/firmware && \ + (rm -rf $(DESTDIR)/lib/firmware/.dahdi-fw-vpmadt032-*; \ + touch $(DESTDIR)/lib/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION)); \ + fi +else + @echo "Firmware dahdi-fw-vpmadt032.bin is already installed with required version $(VPMADT032_VERSION)" +endif +endif # Uninstall any installed dahdi firmware images from hotplug firmware directories hotplug-uninstall: -- cgit v1.2.3