[Lazarus] Compiling LCL units via commandline
Mattias Gaertner
nc-gaertnma at netcologne.de
Wed Jul 25 16:16:58 CEST 2012
On Wed, 25 Jul 2012 11:04:58 -0300
luciano de souza <luchyanus at gmail.com> wrote:
> After reading your message, Mattias, I was persuaded the best solution
> is to use Lazbuild. We will do a tool to write a lpi. I don't know if
> I need to write also a lpk file. I suppose these files already exist.
If you want to share some units across several projects, you can put
them into one directory and add a lpk file.
This will speed up the compilation and avoids accidental double
creation of ppu files.
For the Lazarus sources all packages already have a lpk file and
lazbuild knows where to find them.
> Would All the work be to develop the tool to write lpis? Units wsould
> be compiled in the correct order. Lazbuild can determine which order
> is that or I need to fill up my lpi with instructions about the order
> of compilation.
Well, that is the easy part:
The order of units is already figured out by fpc, the order of packages
is automatically solved by lazbuild.
Normally it is enough to pass to fpc only the main source file, for
instance the lpr file, and some search paths. The compiler will then
automatically search and compile all needed units recursively.
> If all the knowledge needed to create this tool is read and write xml,
> OK, the tool can be done. But if I need to know deeply the flags
> passed to enqueue units in the correct order, also, the study needs to
> be much more detailed.
Mattias
More information about the Lazarus
mailing list