The distribution of the Aldor libraries comes in three variants:
All these variants are not compatible with each other.
ALLPROSE provides a simple mechanism for several variants of the project and testcases library which are built on the corresponding Aldor libraries. The following variable specifies which library variants should be built.
We would rather like to suggest that all variants of libraries come with the same name but are collected in different subdirectories, i. e., all libraries related to the debug version should go into $ALDORROOT/lib/debug, all libraries related to the GMP version should go under $ALDORROOT/lib/gmp. In these directories the libraries should all have the same name. For example, instead of libalgebra.al, libalgebrad.al, and libalgebra-gmp.al in the directory lib, we would have libalgebra.al in the subdirectories lib/ordinary, lib/debug, and lib/gmp. In that way the corresponding file include/algebra.as could be made a bit simpler.
The above value of VARIANTSTOBUILD can be any value xxx as long as there are corresponding variables VARIANTPOSTFIXxxx and VARIANTFLAGSxxx etc.
For each of the variants there are four variables. They are put on the command line for the specific variant as can be seen in the targets libraryvariant.% and executablevariant.% in Makefile.inc.nw.
For example, if
VARIANTPOSTFIXdebug=d
|
is given, then the names of the debug variant would be src/libcombinatd.al and src/libcombinatd.a.
VARIANTASSERTIONdebug=-dDEBUG
|
for the debug variant.
Variables of the form VARIANTEXECUTABLEFLAGSxxx are put on the command line for the compilation of an executable (including the testsuite).
If there is some need to have specific flags for certain executables, it is possible to define them through a variable VARIANTSOMENAMEFLAGSxxx where SOMENAME has to be replaced by the actual name of the specific executable (without any variant postfix). For example if the name of the executable is Foo, and it needs the flags ’-Dbar -Drandom’ for the ordinary variant. Then one would have to define the following variable.
VARIANTFooFLAGSordinary=-Dbar -Drandom
|
Of course this limits the possible names of executables, since their names appear as substrings in a Makefile variable.
The ordinary version takes roughly half the time for completing the test suite, although this may parially be due to the fact that some tests fail earlier. There is hardly any difference between the timings of -q4 and -q1.
Curiously, we hit an error when compiling src/species.as.nw with -q0:
#10 (Fatal Error) Storage allocation error (atempt to free unknown space).
|
The .ao files are currently automatically removed by ALLPROSE. They must be manually recreated via the command.
for f in $(ar t libcombinatax.al); do ar x libcombinatax.al $f; done
|
In an Axiom session one would have to load all the libraries in the correct order. Usually the library itself contains the correct dependency order and thus we can generate the corresponding file.
rm combinat.input
for f in $(ar t libcombinatax.al); do echo ")lib $f" >> combinat.input; done |
Of course, all this should already be done via some MAKE target, but I still have to figure out, how this can be achieved best.