Changeset 8bde727 in rtems-source-builder


Ignore:
Timestamp:
Mar 17, 2016, 11:45:28 PM (4 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.9, master
Children:
a102424
Parents:
52cb466
Message:

sb: Fix %if logical OP parsing.

Updates #2655.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/config.py

    r52cb466 r8bde727  
    782782                    join_op = 'and'
    783783                cls = cls[1:]
     784                log.trace('config: %s: _if: joining: %s' % (self.name, join_op))
    784785            ori = 0
    785786            andi = 0
     
    787788            if '||' in cls:
    788789                ori = cls.index('||')
     790                log.trace('config: %s: _if: OR found at %i' % (self.name, ori))
    789791            if '&&' in cls:
    790792                andi = cls.index('&&')
     793                log.trace('config: %s: _if: AND found at %i' % (self.name, andi))
    791794            if ori > 0 or andi > 0:
    792                 if ori < andi:
     795                if ori == 0:
     796                    i = andii
     797                elif andi == 0:
    793798                    i = ori
    794                 else:
     799                elif ori < andi:
    795800                    i = andi
    796                 if ori == 0:
     801                else:
    797802                    i = andi
     803                log.trace('config: %s: _if: next OP found at %i' % (self.name, i))
    798804            ls = cls[:i]
    799805            if len(ls) == 0:
Note: See TracChangeset for help on using the changeset viewer.