mhulden / foma

Automatically exported from code.google.com/p/foma
117 stars 90 forks source link

added Makefile #147

Closed arademaker closed 1 year ago

arademaker commented 1 year ago

Copied from the https://github.com/Homebrew/homebrew-core/blob/5e7068e8044316c8345d06a23565ae3818625308/Formula/foma.rb#L4

Related to #146

arademaker commented 1 year ago

This PR is not ready to be merged. I got the following compilation error:

flex -8 --prefix=lexc lexc.l
gcc -O3 -Wall -D_GNU_SOURCE -std=c99 -fvisibility=hidden -fPIC -c lex.lexc.c -o lex.lexc.o
bison -v --defines=regex.h --output=regex.c regex.y
regex.y:204.9-16: syntax error, unexpected identifier, expecting string
make: *** [regex.h] Error 1

So it seems that the code from https://bitbucket.org/mhulden/foma/downloads/foma-0.9.18.tar.gz that was the reference to compile the Homebrew formula is different from the source code in this repository although it has the same version number.

Any idea?

arademaker commented 1 year ago

Can we just replace the code here with the code from the tar.gz file in the bitbucket? But most files in the current repository have an updated copyright Copyright © 2008-2014 Mans Hulden compared to its version in the bitbucket tar.gz

mhulden commented 1 year ago

The project moved to cmake some time ago and the standard Makefile was removed. You can see the Makefile here as it was before deletion.

arademaker commented 1 year ago

Oh. Sorry, I missed that. So maybe it would be nice to update the README file with the instructions to compile and install with cmake?

The README still says

To compile foma (and flookup) as well as the foma static and dynamic library, "make; make install" should work on most UNIX systems. The default installation target /usr/local can be changed in the Makefile.