[asterisk-dev] [Code Review] 3707: asterisk.pc file contains a spacing error in CFlags

wdoekes reviewboard at asterisk.org
Thu Jul 3 07:33:03 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3707/#review12462
-----------------------------------------------------------



/trunk/build_tools/mkpkgconfig
<https://reviewboard.asterisk.org/r/3707/#comment22728>

    Hm. That test doesn't even test the extended regex.
    
    Suggest:
    
      if echo "x x" | sed -r -e 's/(x|\s)/y/g' 2>/dev/null | ${GREP} -q "yyy"; then
    



/trunk/build_tools/mkpkgconfig
<https://reviewboard.asterisk.org/r/3707/#comment22729>

    's/\s+/\ /g'
    
    space doesn't need escaping
    
    's/^[ \t]*//;s/[ \t]*$//'
    
    combining multiple s/ may be allowed by both perl and sed, but if we allow that, we might as well shorten the whole block and use a single ${EXTREGEX}.
    
    's/^\s+|\s+$//'
    
    should be equivalent without resorting to semi-colons
    
    
    In addition, this is still open to mangling of things like this:
    
      -DSOME_OPTION=-Iinclude
      gets turned into
      -DSOME_OPTION=
    
    I'd rather see something like this:
    
      echo " $CFLAGS " ...
      ...
      ${EXTREGEX} 's/\s+-I(include|\.\.\/include)\s+/ /g'
    
    whereby you're making sure that the option you're stripping is actually delimited by a space on both sides.


- wdoekes


On July 3, 2014, 12:12 p.m., Diederik de Groot wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3707/
> -----------------------------------------------------------
> 
> (Updated July 3, 2014, 12:12 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-23991
>     https://issues.asterisk.org/jira/browse/ASTERISK-23991
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> ASTERISK-23991
> 
> After installation the asterisk.pc file contains:
> Cflags: -I/usr/include/libxml2-g3
> 
> Which should have been:
> Cflags: -I/usr/include/libxml2 -g3
> 
> 
> Diffs
> -----
> 
>   /trunk/build_tools/mkpkgconfig 417800 
> 
> Diff: https://reviewboard.asterisk.org/r/3707/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Diederik de Groot
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140703/cc690460/attachment.html>


More information about the asterisk-dev mailing list