Note: This page needs to be updated to the most recent version of SICECAS. If you are really that interested in browsing source code, just mail :-)
Download the sources:
Or browse them on-line!Or change your mind and just download the binaries.
javac gve.calc.Mainwill compile a lot of files, but not all of them. This is because the program uses reflection to load other classes and the compiler will not (and cannot) spot this. UNIX users can use a compile script. The script will search for all .java files in the current directory and its sub(sub...)directories that have not yet been compiled and will compile them in one javac command. This is more efficient than running javac lots of times with a single argument.
Note: generally, this script will fail to compile the stuff in the test/ directory, since it needs JUnit to be in the classpath. Either ignore the errors, remove the test/ directory (you don't need it to run the program, it's just a bunch of regression tests) or first type something like
javac -classpath ~/junit3.5/junit.jar:. test/*.javabefore you run the make script.
If you just downloaded the sources and only want to get this stuff compiled, then an incremental make script like this one is off course a bit overkill since you just could have said
javac `find . -name \*.java -printf "%p "`or something along those lines, but then again, I suppose you rather like to play with the source when you took all this trouble :-)
find . -name \*.java -printf "%p " >/tmp/$PPID
Creates a temp file containing a long line with all names of java files separated by spaces
echo -en "%.class: %.java\n\t@echo -n \"\$< \" >> /tmp/$PPID\n\nall: " > /tmp/$PPID.2
Creates a second temp file (a makefile) containing:
%.class: %.java
@echo -n "$< " >> /tmp/$PPID
all:
sed "s/[.]java /.class /g" </tmp/$PPID >>/tmp/$PPID.2
Make the last line of the second temp file look like
all: gve/calc/Main.class gve/calc/AboutWindow.class ...
echo >>/tmp/$PPID.2
Add an end-of-line to the temporary makefile
rm /tmp/$PPID
Cleanup
make -f /tmp/$PPID.2;
Run the temporary makefile we just generated. This causes the line
@echo -n "$< " >> /tmp/$PPIDto be executed for each .class file that has to be rebuilt ($< is make-speak for ``the file you need to be able to compile'', which is in our case ``blabla.java'').
rm /tmp/$PPID.2
Clean up the temporary makefile. Now, the file /tmp/$PPID should contain something
like
gve/calc/Main.java gve/calc/logic/ProofView.java(supposing these two files are to be recompiled). The file does not contain the name of files that are already compiled.
if test -s /tmp/$PPID; then
If the list of files to be compiled is empty, we do nothing at all off course.
echo "javac `cat /tmp/$PPID`";
Be nice and tell what we are about to do
javac `cat /tmp/$PPID`
At least, compile those files!
rm /tmp/$PPID
Cleanup
fi