[Lazarus] suggestion for lazbuild

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Mar 17 22:12:53 CET 2015


On Tue, 17 Mar 2015 10:29:11 -0700
Mehmet Erol Sanliturk <m.e.sanliturk at gmail.com> wrote:

>[...]
> There is an important problem in Lazarus compilations :
> 
> Assume some units only include source files in their interface parts having
> record types ( i.e. , there is no any declaration statement within unit
> source and no any entries in their implementation parts ) .
> 
> Other units include source files containing procedures and use type
> declaration units .
> 
> 
> If a modification is performed in one of the procedure sources , Lazarus is
> detecting it and compiling that unit .
> 
> BUT
> 
> If a new record element is added to one of the records , it is NOT
> detecting that change and it is using the old compiled .ppu  and .o for
> this type definition source file included unit with
> a subsequent error message that the newly added element is NOT defined in
> the respective record .

That sounds more like a FPC bug than Lazarus. Lazarus only checks file
dates. If a change is in interface or implementation doesn't matter.
Or maybe I misunderstand?

 
> I am using a batch or shell script file to erase all of the .ppu and .o
> files before starting the compilation .
> 
> Selecting "Build" from Lazarus "Run" menu is starting to build Lazarus
> itself which is NOT possible because Lazarus is owned by the "root" .

I'm not sure what you mean 'build Lazarus itself' and 'Lazarus is owned
by the "root"'.
Can you give more details?

 
> Using -B option seems that it is NOT effective when there are existing .ppu
> and .o files .

Do you mean lazbuild -B or fpc -B?

 
> Then the only way is to "clean" existing .ppu or .o files in a selected way
> .
> 
> I do not know why
> 
> make -s clean

-s Silent operation; do not print the commands as they are executed.

 
> is used , but implication is that deletion of existing  .ppu and .o files
> are required before starting to compilation .

'make clean' in Lazarus source directory deletes .ppu and .o files of
IDE, lazbuild and bigide components. This is useful, when a source file
was removed from a package.

Mattias




More information about the Lazarus mailing list