[asterisk-dev] [Code Review] Makefile now specifies whether or not DAHDI hardware was found

Tzafrir Cohen tzafrir.cohen at xorcom.com
Mon Apr 13 23:59:53 CDT 2009



> On 2009-04-09 10:01:12, Russell Bryant wrote:
> > /tools/trunk/Makefile, lines 301-307
> > <http://reviewboard.digium.com/r/216/diff/1/?file=4120#file4120line301>
> >
> >     Nice work, this is an interesting approach.  I have some comments for you.
> >     
> >     First, with the conditional statements, you could make it such that you only check DAHDI_HW once.
> >     
> >     ifeq (,$(DAHDI_HW))
> >     ...
> >     else
> >     ...
> >     endif
> >     
> >     Also, with the way this is written, the xpp/dahdi_hardware script will be executed in a lot of cases where it doesn't need to be.  For example, if you run "make clean", it will be executed, even though the result will not be used.
> >     
> >     What if you just changed the dahdi_hardware tool to print out a message if no hardware was found?
> 
>  wrote:
>     I could be wrong, but from the message printed with 'make config', the user should take note of what hardware he/she has, and edit /etc/dahdi/modules to "load support for only the DAHDI hardware installed in this system". I would take that to mean we should print out what hardware the user has.
> 
>  wrote:
>     1. A patch to implement this is already at the original issue: http://bugs.digium.com/view.php?id=14792
>     
>     2. I think this message has an informative value. If the user wanted a custom modules file, the user could simply run:
>     
>       dahdi_genconf modules
> 
>  wrote:
>     Tzafrir, thank you for the patch! I just now tried it, but I get the following:
>     
>     ...
>     I think that the DAHDI hardware you have on your system is:
>     # No DAHDI devices found
>     pci:0000:02:03.0     wct4xxp-     d161:0405 Wildcard TE405P (3rd Gen)
>     
>     How does (keys %seen) work?

%seen is a hash (dictionary) of values. 'keys' is a function that returns a list of the keys from a dictionary. A list in perl evaluates as true if it is not empty.


- Tzafrir


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/216/#review676
-----------------------------------------------------------


On 2009-04-13 16:24:52, dbrooks wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/216/
> -----------------------------------------------------------
> 
> (Updated 2009-04-13 16:24:52)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This is a patch that allows the DAHDI Makefile to announce to the user whether or not it found DAHDI hardware. Prior to this patch, if DAHDI hardware was not found, "make config" would announce: "I think that the DAHDI hardware you have on your system is: " and stop there.
> 
> 
> This addresses bug 0014792.
>     http://bugs.digium.com/view.php?id=0014792
> 
> 
> Diffs
> -----
> 
>   /tools/trunk/Makefile 6356 
> 
> Diff: http://reviewboard.digium.com/r/216/diff
> 
> 
> Testing
> -------
> 
> This patch was tested on x86_64-linux-gnu, and GNU Make 3.81.
> 
> 
> Thanks,
> 
> dbrooks
> 
>




More information about the asterisk-dev mailing list