Sign in Join

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

Mailing lists / lazarus / 2010-12

Clean Up + Build all

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Kjow

Hi all,

what is the equivalent on command line of the "Clean Up + Build all" in the IDE?

With:
make bigideclean bigide OPT="-Xg"
lazbuild --build-ide=
I don't have the same result.

Thank you,
Kjow

Reply by email

Max Vlasov
to Kjow
Kjow wrote 14 lines
Hi all, what is the equivalent on command line of the "Clean Up + Build all" in the IDE? With: make bigideclean bigide OPT="-Xg" lazbuild --build-ide= I don't have the same result. Thank you, Kjow

I also wanted to know, but I suppose the situation is a little complex. As long as I understand this, there are no strict way to do this in the IDE. I'm sure the core developers will correct me, I just describe as I understand this.

Theoretically sometimes the IDE (automatically) and you (in the custom option) can append -B switch that forces fpc to rebuild all the units of the project unconditionally, but the problem lays in the packages your project depends upon. When Lazarus prepares the parameters for fpc, it basically appends the paths containing compiled units of the packages, so if it gets -B switch, fpc can not reach the unit sources, so builds the project with the compiled version. And I don't know whether the problem is solvable since packages is a special entity in Lazarus treated in special way but maybe I'm wrong.

Personally when I use Delphi 'Build' that actually rebuild every reachable source file, I do this for two reasons
1. I have a global define for some profile/debug work so I have to be sure that the code is reverted to non-debug state after
2. For psychological reasons, I feel safer this way before release :)

Surprisingly Lazarus correctly tracks the first case, when you manually change global define (-d) (but as I said without sources that reside in other packages). As for second reason, in my case it's unbeatable :)

Max Vlasov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20101206/c886c4f3/attachment.html>

Reply by email

Mattias Gaertner
to Max Vlasov
Show quoted text 11 lines
On Mon, Dec 6, 2010 at 12:12 PM, Kjow wrote: > Hi all, > > what is the equivalent on command line of the "Clean Up + Build all" in the > IDE? > With: > make bigideclean bigide OPT="-Xg" > lazbuild --build-ide= > I don't have the same result.

Do you want to emulate how the IDE builds or do you want to get the same output?

First: you can not exactly do the same easily
Second:
make clean all
make clean all -w examples
lazbuild -B --build-ide=

Show quoted text 10 lines
[...] Theoretically sometimes the IDE (automatically) and you (in the custom option) can append -B switch that forces fpc to rebuild all the units of the project unconditionally, but the problem lays in the packages your project depends upon. When Lazarus prepares the parameters for fpc, it basically appends the paths containing compiled units of the packages, so if it gets -B switch, fpc can not reach the unit sources, so builds the project with the compiled version. And I don't know whether the problem is solvable since packages is a special entity in Lazarus treated in special way but maybe I'm wrong.

The same logic applies to packages: If the options change for a package the package is compiled with -B.

Show quoted text 9 lines
Personally when I use Delphi 'Build' that actually rebuild every reachable source file, I do this for two reasons 1. I have a global define for some profile/debug work so I have to be sure that the code is reverted to non-debug state after 2. For psychological reasons, I feel safer this way before release :) Surprisingly Lazarus correctly tracks the first case, when you manually change global define (-d) (but as I said without sources that reside in other packages). As for second reason, in my case it's unbeatable :)

Lazarus packages are independent entities. The package developer has tested the sources with some flags and these are stored in the lpk and used when a user compiles the package. This has several advantages. Here are some of them:
- it allows to share the package ppu files with various projects
- if you spot a bug in the package you can give the package maintainer reproducable bug reports.
- making it harder to compile a package accidentally with untested/unsupported flags
- you don't need the notorious include
files of Delphi packages with many compiler defines
- avoiding name clashes with IFDEF flags.

Since 0.9.29 a package can have optional flags.

Mattias

Reply by email

Kjow
to Mattias Gaertner

2010/12/6 Mattias Gaertner :

Show quoted text 10 lines
> > what is the equivalent on command line of the "Clean Up + Build all" in the > > IDE? Do you want to emulate how the IDE builds or do you want to get the same output? First: you can not exactly do the same easily Second: make clean all make clean all -w examples lazbuild -B --build-ide=

Yes, I want the same result.
Thank you!

I tried, but I have a problem with official GLScene:

Compiling projectwizarddlg.pas
Compiling idecmdline.pas
PPU Loading C:\Develop\lazarus\components\GLScene\Lazarus\lib\i386-win32\GLConte xt.ppu
PPU Source: GLContext.pas not found
PPU Source: GLScene.inc not found
PPU Loading C:\Develop\lazarus\components\GLScene\Lazarus\lib\i386-win32\GLConte xt.ppu
PPU Source: GLContext.pas not found
PPU Source: GLScene.inc not found
PPU Loading C:\Develop\lazarus\components\GLScene\Lazarus\lib\i386-win32\GLConte xt.ppu
PPU Source: GLContext.pas not found
PPU Source: GLScene.inc not found
Recompiling GLContext, checksum changed for GLPipelineTransformation GLContext.pas(75,12) Fatal: Can't find unit GLContext used by GLPipelineTransfor mation
TExternalToolList.Run Exception: GLContext.pas(75,12) Fatal: Can't find unit GLC ontext used by GLPipelineTransformation
ERROR: tool reported error

If I do "Clean Up + Build all" from IDE there aren't problems. Is it a GLScene bug?

Thanks,
Kjow

Reply by email

Mattias Gaertner
to Kjow
Show quoted text 21 lines
2010/12/6 Mattias Gaertner : >> > what is the equivalent on command line of the "Clean Up + Build all" in the >> > IDE? > Do you want to emulate how the IDE builds or do you want to get the > same output? > > First: you can not exactly do the same easily > Second: > make clean all > make clean all -w examples > lazbuild -B --build-ide= Yes, I want the same result. Thank you! I tried, but I have a problem with official GLScene: Compiling projectwizarddlg.pas Compiling idecmdline.pas PPU Loading C:\Develop\lazarus\components\GLScene\Lazarus\lib\i386-win32\GLConte xt.ppu

Has the above lazbuild call recompiled the glscene package?

Mattias

Reply by email

Kjow
to Mattias Gaertner

2010/12/7 Mattias Gaertner :

Show quoted text 11 lines
On Tue, 7 Dec 2010 09:42:38 +0100 > I tried, but I have a problem with official GLScene: > > Compiling projectwizarddlg.pas > Compiling idecmdline.pas > PPU Loading C:\Develop\lazarus\components\GLScene\Lazarus\lib\i386-win32\GLConte > xt.ppu Has the above lazbuild call recompiled the glscene package? Mattias

At lazarus restart there wasn't any "extra" packages, but calling "Clean Up Build all" from IDE, all packages recompiled and at Lazarus restart there was everything (GLScene and "extra").

Kjow

Reply by email