gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
270 stars 61 forks source link

option to regenerate antlr files with system antlr #45

Open slayoo opened 6 years ago

slayoo commented 6 years ago

As discussed at SF.net:

As pointed out in the SF issues, the solution which was introduced e.g. in:

I believe, we should offer via CMake the option to use system antlr (as in the Gentoo patch) but then trigger a regeneration of all antlr-generated files, i.e.:

$ cd gdl/src
$ for i in *.g; do antlr $i; done;

Another issue is that reportedly the GDL-shipped antlrheaders are modified with respect to the original (https://sourceforge.net/p/gnudatalanguage/patches/100/).

slayoo commented 6 years ago

See also: https://github.com/olebole/gnudatalanguage/pull/4

slayoo commented 6 years ago

For the record, the regeneration is done e.g. in the Gentoo build spec: https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-lang/gdl/gdl-0.9.6-r2.ebuild#n79

slayoo commented 5 years ago

Two points:

GillesDuvert commented 5 years ago

Making GDL compile easier for everybody is incompatible with requiring those same people to install yet another dependency---moreover an old version of, ANTLR, no?

olebole commented 5 years ago

Why an old antlr? On Debian, we always use the latest version (currently 2.7.7). Simple patch is here. Up to now, we didn't receive bug reports referring to this.

GillesDuvert commented 5 years ago

I mean, ANTLR has since evolved to ANTLR4. I was not refering to the (excellent!) work of package maintainers but the need to keep the dependencies as small as possible for people that want to recompile GDL by themselves. But I may be mistaken.

olebole commented 5 years ago

Yeam, I just discovered that we also have an antlr3 and an antlr4 package. It seems to be common to include external packages (f.e. astropy does it as well for cfitsio, wcslib and others); and it is OK. It would just be nice if there is a (CMAKE) option that switches to an external installation (and to regenerate the relevant files); this would remove the need to patch the sources.