diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-09-15 12:35:45 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-09-15 12:35:45 +0000 |
commit | db5c3ea4e107fbc935fa11245894617d8a43f41c (patch) | |
tree | c99afc77e3e191ffd924bd333a4c5edd03ca4d86 /firmware | |
parent | 509911c594492006a7a0514a44bfa199235dd241 (diff) |
s/INSTALL_PREFIX/DESTDIR/ in firmware/Makefile .
The install target now won't fail in DESTDIR install, but will probably
do nothing.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3029 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/Makefile | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/firmware/Makefile b/firmware/Makefile index 3899dcb..15d88bd 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -63,22 +63,22 @@ have_download: # Download and extract firmware tarballs zaptel-fw-oct6114-064-%.tar.gz: have_download -ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" == "no" ] ) || ( [ -d $(INSTALL_PREFIX)/usr/lib/hotplug/firmware ] && ! [ -f $(INSTALL_PREFIX)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION) ] ) || ( [ -d $(INSTALL_PREFIX)/lib/firmware ] && ! [ -f $(INSTALL_PREFIX)/lib/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes) +ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" == "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.zaptel-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 zaptel-fw-oct6114-064.bin to hotplug firmware directories" - if [ -d $(INSTALL_PREFIX)/usr/lib/hotplug/firmware ]; then \ - $(INSTALL) -m 644 zaptel-fw-oct6114-064.bin $(INSTALL_PREFIX)/usr/lib/hotplug/firmware; \ - rm -rf $(INSTALL_PREFIX)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-064-*; \ - touch $(INSTALL_PREFIX)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION); \ + if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ + $(INSTALL) -m 644 zaptel-fw-oct6114-064.bin $(DESTDIR)/usr/lib/hotplug/firmware; \ + rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-064-*; \ + touch $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION); \ fi - if [ -d $(INSTALL_PREFIX)/lib/firmware ]; then \ - $(INSTALL) -m 644 zaptel-fw-oct6114-064.bin $(INSTALL_PREFIX)/lib/firmware; \ - rm -rf $(INSTALL_PREFIX)/lib/firmware/.zaptel-fw-oct6114-064-*; \ - touch $(INSTALL_PREFIX)/lib/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION); \ + if [ -d $(DESTDIR)/lib/firmware ]; then \ + $(INSTALL) -m 644 zaptel-fw-oct6114-064.bin $(DESTDIR)/lib/firmware; \ + rm -rf $(DESTDIR)/lib/firmware/.zaptel-fw-oct6114-064-*; \ + touch $(DESTDIR)/lib/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION); \ fi endif else @@ -86,22 +86,22 @@ else endif zaptel-fw-oct6114-128-%.tar.gz: have_download -ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" == "no" ] ) || ( [ -d $(INSTALL_PREFIX)/usr/lib/hotplug/firmware ] && ! [ -f $(INSTALL_PREFIX)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-128-$(OCT6114_128_VERSION) ] ) || ( [ -d $(INSTALL_PREFIX)/lib/firmware ] && ! [ -f $(INSTALL_PREFIX)/lib/firmware/.zaptel-fw-oct6114-128-$(OCT6114_128_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes) +ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" == "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-128-$(OCT6114_128_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.zaptel-fw-oct6114-128-$(OCT6114_128_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 zaptel-fw-oct6114-128.bin to hotplug firmware directories" - if [ -d $(INSTALL_PREFIX)/usr/lib/hotplug/firmware ]; then \ - $(INSTALL) -m 644 zaptel-fw-oct6114-128.bin $(INSTALL_PREFIX)/usr/lib/hotplug/firmware; \ - rm -rf $(INSTALL_PREFIX)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-128-*; \ - touch $(INSTALL_PREFIX)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-128-$(OCT6114_128_VERSION); \ + if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ + $(INSTALL) -m 644 zaptel-fw-oct6114-128.bin $(DESTDIR)/usr/lib/hotplug/firmware; \ + rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-128-*; \ + touch $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-128-$(OCT6114_128_VERSION); \ fi - if [ -d $(INSTALL_PREFIX)/lib/firmware ]; then \ - $(INSTALL) -m 644 zaptel-fw-oct6114-128.bin $(INSTALL_PREFIX)/lib/firmware; \ - rm -rf $(INSTALL_PREFIX)/lib/firmware/.zaptel-fw-oct6114-128-*; \ - touch $(INSTALL_PREFIX)/lib/firmware/.zaptel-fw-oct6114-128-$(OCT6114_128_VERSION); \ + if [ -d $(DESTDIR)/lib/firmware ]; then \ + $(INSTALL) -m 644 zaptel-fw-oct6114-128.bin $(DESTDIR)/lib/firmware; \ + rm -rf $(DESTDIR)/lib/firmware/.zaptel-fw-oct6114-128-*; \ + touch $(DESTDIR)/lib/firmware/.zaptel-fw-oct6114-128-$(OCT6114_128_VERSION); \ fi endif else @@ -109,22 +109,22 @@ else endif zaptel-fw-tc400m-%.tar.gz: have_download -ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" == "no" ] ) || ( [ -d $(INSTALL_PREFIX)/usr/lib/hotplug/firmware ] && ! [ -f $(INSTALL_PREFIX)/usr/lib/hotplug/firmware/.zaptel-fw-tc400m-$(TC400M_VERSION) ] ) || ( [ -d $(INSTALL_PREFIX)/lib/firmware ] && ! [ -f $(INSTALL_PREFIX)/lib/firmware/.zaptel-fw-tc400m-$(TC400M_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes) +ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" == "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-tc400m-$(TC400M_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.zaptel-fw-tc400m-$(TC400M_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 zaptel-fw-tc400m.bin to hotplug firmware directories" - if [ -d $(INSTALL_PREFIX)/usr/lib/hotplug/firmware ]; then \ - $(INSTALL) -m 644 zaptel-fw-tc400m.bin $(INSTALL_PREFIX)/usr/lib/hotplug/firmware; \ - rm -rf $(INSTALL_PREFIX)/usr/lib/hotplug/firmware/.zaptel-fw-tc400m-*; \ - touch $(INSTALL_PREFIX)/usr/lib/hotplug/firmware/.zaptel-fw-tc400m-$(TC400M_VERSION); \ + if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ + $(INSTALL) -m 644 zaptel-fw-tc400m.bin $(DESTDIR)/usr/lib/hotplug/firmware; \ + rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-tc400m-*; \ + touch $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-tc400m-$(TC400M_VERSION); \ fi - if [ -d $(INSTALL_PREFIX)/lib/firmware ]; then \ - $(INSTALL) -m 644 zaptel-fw-tc400m.bin $(INSTALL_PREFIX)/lib/firmware; \ - rm -rf $(INSTALL_PREFIX)/lib/firmware/.zaptel-fw-tc400m-*; \ - touch $(INSTALL_PREFIX)/lib/firmware/.zaptel-fw-tc400m-$(TC400M_VERSION); \ + if [ -d $(DESTDIR)/lib/firmware ]; then \ + $(INSTALL) -m 644 zaptel-fw-tc400m.bin $(DESTDIR)/lib/firmware; \ + rm -rf $(DESTDIR)/lib/firmware/.zaptel-fw-tc400m-*; \ + touch $(DESTDIR)/lib/firmware/.zaptel-fw-tc400m-$(TC400M_VERSION); \ fi endif else @@ -132,22 +132,22 @@ else endif zaptel-fw-vpmadt032-%.tar.gz: have_download -ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" == "no" ] ) || ( [ -d $(INSTALL_PREFIX)/usr/lib/hotplug/firmware ] && ! [ -f $(INSTALL_PREFIX)/usr/lib/hotplug/firmware/.zaptel-fw-vpmadt032-$(VPMADT032_VERSION) ] ) || ( [ -d $(INSTALL_PREFIX)/lib/firmware ] && ! [ -f $(INSTALL_PREFIX)/lib/firmware/.zaptel-fw-vpmadt032-$(VPMADT032_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes) +ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" == "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-vpmadt032-$(VPMADT032_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.zaptel-fw-vpmadt032-$(VPMADT032_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 zaptel-fw-vpmadt032.bin to hotplug firmware directories" - if [ -d $(INSTALL_PREFIX)/usr/lib/hotplug/firmware ]; then \ - $(INSTALL) -m 644 zaptel-fw-vpmadt032.bin $(INSTALL_PREFIX)/usr/lib/hotplug/firmware; \ - rm -rf $(INSTALL_PREFIX)/usr/lib/hotplug/firmware/.zaptel-fw-vpmadt032-*; \ - touch $(INSTALL_PREFIX)/usr/lib/hotplug/firmware/.zaptel-fw-vpmadt032-$(VPMADT032_VERSION); \ + if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ + $(INSTALL) -m 644 zaptel-fw-vpmadt032.bin $(DESTDIR)/usr/lib/hotplug/firmware; \ + rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-vpmadt032-*; \ + touch $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-vpmadt032-$(VPMADT032_VERSION); \ fi - if [ -d $(INSTALL_PREFIX)/lib/firmware ]; then \ - $(INSTALL) -m 644 zaptel-fw-vpmadt032.bin $(INSTALL_PREFIX)/lib/firmware; \ - rm -rf $(INSTALL_PREFIX)/lib/firmware/.zaptel-fw-vpmadt032-*; \ - touch $(INSTALL_PREFIX)/lib/firmware/.zaptel-fw-vpmadt032-$(VPMADT032_VERSION); \ + if [ -d $(DESTDIR)/lib/firmware ]; then \ + $(INSTALL) -m 644 zaptel-fw-vpmadt032.bin $(DESTDIR)/lib/firmware; \ + rm -rf $(DESTDIR)/lib/firmware/.zaptel-fw-vpmadt032-*; \ + touch $(DESTDIR)/lib/firmware/.zaptel-fw-vpmadt032-$(VPMADT032_VERSION); \ fi endif else @@ -171,13 +171,13 @@ hotplug-install: $(FIRMWARE) # Uninstall any installed zaptel firmware images from hotplug firmware directories hotplug-uninstall: - if [ -d $(INSTALL_PREFIX)/usr/lib/hotplug/firmware ]; then \ - rm -f $(INSTALL_PREFIX)/usr/lib/hotplug/firmware/zaptel-fw-*.bin; \ - rm -f $(INSTALL_PREFIX)/usr/lib/hotplug/firmware/.zaptel-fw*; \ + if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ + rm -f $(DESTDIR)/usr/lib/hotplug/firmware/zaptel-fw-*.bin; \ + rm -f $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw*; \ fi - if [ -d $(INSTALL_PREFIX)/lib/firmware ]; then \ - rm -f $(INSTALL_PREFIX)/lib/firmware/zaptel-fw-*.bin; \ - rm -f $(INSTALL_PREFIX)/lib/firmware/.zaptel-fw*; \ + if [ -d $(DESTDIR)/lib/firmware ]; then \ + rm -f $(DESTDIR)/lib/firmware/zaptel-fw-*.bin; \ + rm -f $(DESTDIR)/lib/firmware/.zaptel-fw*; \ fi # Build object file of an oct6114 064 firmware image for linking |