Re: Unparsable gcc version string? [WAS: lily 1.4.15]
Josip Rodin <firstname.lastname@example.org> writes:
>> Yes, that's what I mean. We just need:
>> gcc --version
> 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
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
expr "$ver" : '.*[^-.0-9]\([0-9][0-9]*\.[^ ]*\)'
Jan Nieuwenhuizen <email@example.com> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
To UNSUBSCRIBE, email to firstname.lastname@example.org
with a subject of "unsubscribe". Trouble? Contact email@example.com