Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2000-09

New Makefiles

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author
Show quoted text 9 lines
At 23:16 10-09-2000 +0200, Peter Vreman wrote: >It's because the compiler depends also on the implementation of the units, >because the changed amount of used registers can be different. ?? I don't understand. IMO if you compile a unit once and don't change anything a second compile shouldn't recompile any unit. Try to compile the attached example

It'll start compiling unitdep1. THen it sees it requires unitdep2 which is then compiled, that one needs unitdep1, but from the implementation. Then the interface of unitdep2 is already parsed and the used registers is set to "all registers used". THen unitdep1 is compiled again which has now the knowledge about unitdep2 interface section. And finally the unitdep2 implementation is compiled.

If you want to fix the problems you can also compile with the -Ca flag. Which sets the used registers to all always.

Reply by email

Marc Weustink
to Unknown author

+ From:
+
+ It'll start compiling unitdep1. THen it sees it requires
+ unitdep2 which is then compiled, that one needs unitdep1,
+ but from the implementation. Then the interface of unitdep2
+ is already parsed and the used registers is set to "all
+ registers used". THen unitdep1 is compiled again which has
+ now the knowledge about unitdep2 interface section. And
+ finally the unitdep2 implementation is compiled.

That I understand, but what I don't understand is that when you compile unitdep1 for a second time (ie, issue ppc386 unitdep1 for the second time) it parses unitdep2 which parses unitdep1 and at that moment it decides that unitdep 1 needs to be recompiled since unitdep2 has changed ???

When you compile it a third (and more) time, it's ok and only unitdep1 is compiled once.

First I thought this was because I manually recompile unitdep1 but it also happens if for instance tou use unitdep in in MyProgram.

+ If you want to fix the problems you can also compile with the
+ -Ca flag. Which sets the used registers to all always.

Ah, I'll

Reply by email

Marc Weustink

Hi,
I made some changes to the Makefiles:

* Updated makefiles for FPC release 1.0 binary units Some makefiles still pointed to the FPC sources. This is no longer needed

* Changed creation, now LCL unit distributions are possible I let the idea go that the interface can be created as a separate unit. The interfaces (TGTKObject) is to much involved with the LCL that you can't compile it without LCL and you cant compile the LCL without interfaces. It is one piece, so the makefiles for interfaces and GTK are removed.

* Moved interfaces.pp from LCL to interface dirs
In interfaces.pp the InterfaceObject was declared based upon defines. Since we separated the interface dirs, interfaces.pp is declared in each interface dir without the need for defines

Using the compiled units:
In your ppc386.cfg (as you got it from the binary FPC installation) add the following line

-Fu/usr/src/lazarus/lcl/units

Or wherever you have placed your lazarus files.

Known problems:
The compiler still has a unit dependency problem. To get LCL units which doesn't need to recompile, the LCL has to be made 6 times. This is (as a temp hack) handled by the makefiles.

Marc

Reply by email

Marc Weustink
to Marc Weustink
Peter Vreman wrote
It's because the compiler depends also on the implementation of the units, because the changed amount of used registers can be different.

?? I don't understand.
IMO if you compile a unit once and don't change anything a second compile shouldn't recompile any unit.
Try to compile the attached example

Marc

----------------------------------------------
unit unitdep1;
interface
uses
   unitdep2;
procedure Test1;
implementation
procedure Test1;
begin
end;
end.
----------------------------------------------
unit unitdep2;
interface
procedure Test2;
implementation
uses
   unitdep1;
procedure Test2;
begin
   Test1;
end;
end.
----------------------------------------------

Reply by email