jordansissel / grok

DRY and RAD for regular expressions and then some.
http://code.google.com/p/semicomplete/wiki/Grok
Other
244 stars 53 forks source link

Fixes for #8 - Ubuntu 11.10 Makefile #9

Open gsandie opened 12 years ago

gsandie commented 12 years ago

Attempted fixes for issue #8.

Created a script that will grab the ubuntu version number from the /etc/issue file. Make changes to the Makefile so that if Ubuntu 11.10 is detected then the gcc command string is changed to put the LDFLAGS var at the end of the line.

Have tested on Ubuntu 10.04 and 11.10, unfortunately I have no non-ubuntu or Linux systems to hand to test with.

gsandie commented 12 years ago

The test suite is now passing, and I believe that this issue is resolved.

lstanden commented 12 years ago

Just confirming this has tested successfully for me. Much appreciated :)

mattmcclean commented 12 years ago

Yes, had same problem but now working. Thanks!!

jassik commented 12 years ago

It does'nt work with 12.04. With Precise out, should not the test be against the gcc version used instead of the Distro version.

juanje commented 12 years ago

I got the same problem but I was used an Ubuntu derivated distro which has the /etc/issue changed (which is not so uncommon). I believe it could be better if you test against the /etc/lsb-release (which is meant for that purpose) or its commandline:

ubuntu-version.sh


#!/bin/sh

if [ "$(lsb_release -si)" = "Ubuntu" ]; then
  VERSION=`lsb_release -sr`
fi

echo $VERSION

Anyway, probably is better to check the gcc version instead of the distro one.

Btw, @gsandie thanks for the fix, it saved me a lot of time :smile:

gsandie commented 12 years ago

Yeah you're right. At the time I just went for the simplest thing that worked for me! :)

I'll try and take a look at updating this commit today to something that is more portable.