[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Unparsable gcc version string? [WAS: lily 1.4.15]



Josip Rodin <joy@gkvk.hr> writes:

>> Yes, that's what I mean.  We just need:
>> 
>>    gcc --version
>>    3.1.1
>
> Well, if gcc upstream switched to printing both "gcc " and the version
> afterwards, you can just use $2.

That would not work with (see my 1st email):

$ bison --version
bison (GNU Bison) 1.35
$ flex --version
flex version 2.5.4

Great fun, if everyone would think they've grown so big and important,
it would warrant a diversion from a resonable standardised version
string.

Currently, we just use $NF, which has worked for all tools up till now,
but I can imagine inserting something like:

    | sed 's/[^0-9]*$//'

However, with the current:

   gcc (GCC) 3.1.1 20020606 (Debian prerelease)

this would yield '20020606'.  I don't like the idea having to go the
way of

   expr "$ver" : '.*[^-.0-9]\([0-9][0-9]*\.[^ ]*\)'

Jan.

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org


-- 
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: