[asterisk-dev] [svn-commits] file: branch 1.2 r2750 - /branches/1.2/Makefile

Tzafrir Cohen tzafrir.cohen at xorcom.com
Thu Jul 19 01:37:14 CDT 2007


Hi

On Wed, Jul 18, 2007 at 04:27:04PM -0000, SVN commits to the Digium repositories wrote:
> Author: file
> Date: Wed Jul 18 11:27:04 2007
> New Revision: 2750
> 
> URL: http://svn.digium.com/view/zaptel?view=rev&rev=2750
> Log:
> 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.

Why do we needto carry multiple copies of the firmware?

Can you please give a practical example of where the current (1.2.19 /
1.4.4) Makefile target misses?

Also:

> 
> Modified:
>     branches/1.2/Makefile
> 
> Modified: branches/1.2/Makefile
> URL: http://svn.digium.com/view/zaptel/branches/1.2/Makefile?view=diff&rev=2750&r1=2749&r2=2750
> ==============================================================================
> --- branches/1.2/Makefile (original)
> +++ branches/1.2/Makefile Wed Jul 18 11:27:04 2007
> @@ -132,10 +132,6 @@
>  
>  # 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)
> @@ -476,9 +472,13 @@
>  
>  # 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)

This keeps the whole logic in the makefile.

make -n firmware will either show nothing or show:

  install -d FIRMWARE_DIR
  install -m 644 wct4xxp/*.ima wctc4xxp/*.bin FIRMWARE_DIR

This makes the target cleaner to look at. So even if you do install to
both directories, try:

> +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

ifneq (,$(wildcard $(DESTDIR)/usr/lib/firmware))
	install -m 644 wct4xxp/*.ima wctc4xxp/*.bin $(DESTDIR)/usr/lib/hotplug/firmware
endif
ifneq (,$(wildcard $(DESTDIR)/usr/lib/hotplug/firmware))
	install -m 644 wct4xxp/*.ima wctc4xxp/*.bin $(DESTDIR)/usr/lib/firmware
endif

>  	@echo "Installed firmware"
>  else
>  	@echo "Not installing firmware because we are not using hotplug firmware"

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-dev mailing list