Changeset 79

Show
Ignore:
Timestamp:
06/18/06 12:18:32 (3 years ago)
Author:
tg
Message:

check for flex and GNU Bison
issue a warning (well, more of a suggestion) if bison is too old

ok wbx@

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/scripts/scan-tools.sh

    r78 r79  
    9797fi 
    9898 
     99if ! which flex >/dev/null 2>&1; then 
     100        echo You must install flex to continue. 
     101        exit 1 
     102fi 
     103 
     104if ! which bison >/dev/null 2>&1; then 
     105        echo You must install GNU Bison to continue. 
     106        echo While you can install any version, it is '*STRONGLY*' suggested 
     107        echo to install GNU Bison version 2.3 because of its bug fixes. 
     108        exit 1 
     109fi 
     110X=$(bison --version 2>&1 | fgrep 'GNU Bison' | sed 's/^[^0-9]*//') 
     111V=old 
     112if [[ $X = +([0-9]).+([0-9]) ]]; then 
     113        let major=${X%.*} 
     114        let minor=${X#*.} 
     115        if (( (major > 2) || ((major == 2) && (minor >= 3)) )); then 
     116                V=new 
     117        fi 
     118fi 
     119if [[ $V = old ]]; then 
     120        echo It is suggested to upgrade your copy of bison to 
     121        echo GNU Bison 2.3 because of its bug fixes. 
     122fi 
     123 
    99124cd $topdir 
    100125rm -rf lbin/tmp