[Aldor-l] libaxiom.al: dependencies
Ralf Hemmecke
ralf at hemmecke.de
Sat May 31 08:54:34 EDT 2008
On 05/31/2008 01:57 PM, Stephen Watt wrote:
> It should be enough for "a" to mention just "b".
Hmm, after Peter send me:
> Yes, but c.ao should be available (ie. in the library search path,
> or in a library).
> c will be needed if any types from there are implicitly used.
I modified the a.ao target of my Makefile to
a.ao: a.as libbbb.al
rm c.ao
cp libbbb.al liblibrary.al
aldor -llibrary $<
then I get
>make
aldor c.as
ar r libccc.al c.ao
ar: creating libccc.al
cp libccc.al liblibrary.al
aldor -llibrary b.as
ar r libbbb.al b.ao
ar: creating libbbb.al
rm c.ao
cp libbbb.al liblibrary.al
aldor -llibrary a.as
#1 (Fatal Error) Could not open file `c.ao'.
make: *** [a.ao] Error 1
Is that OK?
> If "b" was created using a version of the compiler that circumvents
> the "inline from" declaration (thereby allowing inlining from everything),
> then if "c" changes, "a" may need to be recompiled.
Well, I don't know if any inlining happens here. I am using v1.1.0.
Ralf
> On Thu, May 29, 2008 at 01:08:10PM +0200, Ralf Hemmecke wrote:
>> Dear Peter, and all who know about the Aldor compiler internals...
>>
>> I've checked now what dependencies you have calculated in src_aldor2.
>> That seemingly differs by a few domain.
>>
>> Maybe it is important, but maybe not. Therefore my question. Do you know
>> enough about the aldor compiler internals to be able to say something
>> about the following?
>>
>> Suppose I have 3 files a.ap b.ap, c.ap where a depends directly on b but
>> not directly on c. And where b depends directly on c.
>>
>> Now I want to create the corresponding .ao file.
>>
>> Is it enough if while compiling a.ap that only b.ao is mentioned as a
>> library?
>>
>> The current compiler 1.1.0 compiles the stuff below without problem. If
>> it really is enough to list direct dependencies why should one bother to
>> figure out dependencies recursively?
>>
>> It might be different if I try to compile to .a files, but I am speaking
>> here only of the .ao files which are necessary for the libaxiom.al
>> construction.
>>
>> Ralf
>>
>> ---BEGIN a.as
>> #include "aldor"
>> #library LLL "library"
>> import from LLL;
>> AAA: with {
>> afoo: % -> %
>> } == add {
>> Rep == BBB;
>> import from Rep;
>> afoo(x: %): % == per bfoo rep x;
>> }
>> ---END a.as
>>
>>
>> ---BEGIN b.as
>> #include "aldor"
>> #library LLL "library"
>> import from LLL;
>> BBB: with {
>> bfoo: % -> %
>> } == add {
>> Rep == CCC;
>> import from Rep;
>> bfoo(x: %): % == per cfoo rep x;
>> }
>> ---END b.as
>>
>> ---BEGIN c.as
>> #include "aldor"
>> CCC: with {
>> cfoo: % -> %
>> } == add {
>> cfoo(x: %): % == x;
>> }
>> ---END c.as
>>
>> ---BEGIN Makefile
>> a.ao: a.as libbbb.al
>> cp libbbb.al liblibrary.al
>> aldor -llibrary $<
>>
>> libbbb.al: b.ao
>> ar r libbbb.al $<
>>
>> b.ao: b.as libccc.al
>> cp libccc.al liblibrary.al
>> aldor -llibrary b.as
>>
>> libccc.al: c.ao
>> ar r libccc.al $<
>>
>> c.ao: c.as
>> aldor c.as
>> ---END Makefile
More information about the Aldor-l
mailing list