On Sun, 22 May 2011 14:37:34 +0200 Bart <[email protected]> wrote:
> Every time I update Lazarus, I rebuild it from commandline: > > make clean all OPT='-gl' > > Then when I open the start Lazarus and want to build the last project > I was working on, it immediately rebuilds the enitre LCL > (I thought I had just done so by using make clean all) The IDE writes to stdout why it compiles a package. Watch for lines beginning with TLazPackageGraph. > Free Pascal Compiler version 2.4.2 [2010/11/08] for i386 > Copyright (c) 1993-2010 by Florian Klaempfl > Target OS: Linux for i386 > ... > "Compiling package LCLBase 1.0.1" completed > ... > Compiling lcl.pas > ... > "Compiling package LCL 1.0.1" completed > Options changed, recompiling clean with -B Some options changed. The "..." lines should contain more details. >[...] > On numerous occasions Lazarus tends to repeat this process of > rebuilding LCL base, even when I did not update and did not change any > file of the LCL myself. > > Why does Lazarus do this. > It seems unnecessary to me and it's driving me insane. > (Rebuilding LCL takes > 1,5 min. on my ancient system) Using "make clean all" compiles with standard options. Using the IDE (or lazbuild) to compile might use different options (i.e. the options in the configure build Lazarus dialog). When the IDE spots a difference between the options used last time and the current options the IDE automatically rebuilds a package. The options are stored in the packagename.compiled files. The Makefiles creates them as well. But there is one issue: The Makefiles do not store the OPT parameters in the .compiled files. This means if you compile with "make" the IDE does not know this and assumes the package was compiled with standard options. The result is that if you pass any extra option in the "configure build Lazarus dialog" the IDE will always recompile a package after you compiled it with make. It does that only once, because then the .compiled file is correct. Mattias -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
