[Lazarus] Lazbuild: calling of ExecuteBefore command with up-to-date project

Martok listbox at martoks-place.de
Mon Feb 29 23:06:18 CET 2016


Hi list,

(this is a repost from the forums, on suggestion of GetMem)

As I've recently worked to automate more of my project builds/release cycles,
I've found a few inconsistencies between building via Lazbuild and Lazarus.
Version increment handling is already being discussed on the forums. However,
the most annoying for my build process is the handling of
CompilerOptions.ExecuteBefore commands in projects that have no unmodified files.
If building via the IDE, the "before" command is always executed, even if no
source is modified. Building via lazbuild exits without executing the command:

>Hint: (lazarus) Build Project: nothing to do.
>Hint: (lazarus) [TLazBuildApplication.BuildProject]
MainBuildBoss.DoCheckIfProjectNeedsCompilation nothing to do

This is a problem if the Pre-Build command modifies a file that would trigger
compilation of just that file and relinking of the binary. My usecase here is an
auto-generated git revision include file.

Lazbuild checking starts at ide/lazbuild.lpr:848, Lazarus is in
ide/main.pp:6570. The only real difference I can see is that Lazarus has a
pbfOnlyIfNeeded flag, and Lazbuild has the opposite as the BuildAll parameter,
but the result is very different. Can someone explain where this difference
comes from?

Regards,
Martok




More information about the Lazarus mailing list