Changeset 977063c in freewrt for scripts


Ignore:
Timestamp:
Jul 8, 2006, 5:54:38 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
9282773
Parents:
dfb8263
Message:

a real fix for beta versions of GNU make

note to Ubuntu users: if your 3.81beta4 is known to
work properly, we can insert a check similar to the
Debian (scan for existence of a file in /etc) to a-
void having to use the prereq-noerror target.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@179 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/scan-tools.sh

    rdfb8263 r977063c  
    8080rm test*
    8181
    82 X=$(gmake --version 2>&1 | grep '^GNU Make' | sed 's/.*\([0-9]\.[0-9]*\).*/\1/')
    83 if [[ $X != +([0-9]).+([0-9]) ]]; then
     82X=$(gmake --version 2>&1 | grep '^GNU Make' | sed 's/GNU Make //')
     83if [[ $X = +([0-9]).+([0-9]) ]]; then
     84        let major=${X%.*}
     85        let minor=${X#*.}
     86elif [[ $X = +([0-9]).+([0-9])beta* ]]; then
     87        # Beta version is not "the real thing"
     88        let major=${X%.*}
     89        X=${X%beta*}
     90        let minor=${X#*.}-1
     91else
    8492        echo Cannot determine GNU make version number.
    8593        exit 1
    8694fi
    87 let major=${X%.*}
    88 let minor=${X#*.}
    8995if (( (major < 3) || ((major == 3) && (minor < 81)) )); then
    9096        echo GNU make too old.
Note: See TracChangeset for help on using the changeset viewer.