Reputation: 1308
Following the answeres to how to use multiple inline assertions in Frege I learned how to compile two Frege modules A and B where B depends on A: you have to compile B. If given the -make option, the compiler will figure out that B depends on A, will find A on the sourcepath (-sp flag), and will compile A first and then B.
However, I cannot just give all files I care about to the compiler. Giving both A and B to the compiler failed with a "cyclic dependency" error for me. And I also found no way to give a directory to the compiler (it just did nothing).
This looks like I had to know the root of the dependency graph to do a proper compilation of all need-to-be-compiled files. But
Is there a combination of compiler options where I can just let the compiler compile all files in a source tree?
Upvotes: 4
Views: 250
Reputation: 36349
EDIT: With more recent compiler releases, you can indeed compile whole trees:
java -jar fregec.jar -d classes/ -make directory1/ directory2/
Insofar, the answer below is obsolete.
The short answer is "no".
The long answer:
main
functions. One can compile all of them at once with the -make option, as long as they do not depend on each other.It would seem that such functionality is needed also for the command line compiler.
By the way, I couldn't retrace your "cyclic dependency" error. I used the following command:
java -jar ~/frege/fregec.jar -d bin -make -sp Real_World_Frege-master/ $(find . -type f -name '*.fr' -print)
In fact, this error should only be flagged in the case that A imports B while B (or something that B imports) imports A.
Upvotes: 2
Reputation: 1308
This issue has now been addressed by the frege-maven-plugin:
https://github.com/Frege/frege-maven-plugin
which is available in maven central.
Upvotes: 2