Sign in Join

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

Mailing lists / lazarus / 2011-10

compiling lazarus packages with fpc only

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Marc Santhoff

Hi to everyone,

I'd like to know:
Is it possible to have fpc compile a source package that is created only as a lazarus package by using the .lpk-file, or do I have to make a second sort of building configuration e.g. for fpmake or fpcmake?

Secondly, does the generated .pas file corresponding to a package file (.lpk) have to be kept when checking in to a source versioning system or can it be deleted because it is recreated anyways?

TIA,
Marc

Marc Santhoff

Reply by email

Mattias Gaertner
to Marc Santhoff
Show quoted text 6 lines
Hi to everyone, I'd like to know: Is it possible to have fpc compile a source package that is created only as a lazarus package by using the .lpk-file, or do I have to make a second sort of building configuration e.g. for fpmake or fpcmake?

You can compile a lazarus package with the IDE or with lazbuild. They create a .compiled file, which contains the command line parameters for fpc. So, you can use that to compile the package directly with fpc. The package editor allows to create a Makfefile, but this does not support all specials.
There is currently no function to create a fpmake file, so you must create it manually.

Secondly, does the generated .pas file corresponding to a package file (.lpk) have to be kept when checking in to a source versioning system or can it be deleted because it is recreated anyways?

It is recreated by the IDE and lazbuild, not by the Makefile and not if the directory is readonly.
So it is better kept in the VCS.

Mattias

Reply by email

Marc Santhoff
to Mattias Gaertner
Mattias Gaertner wrote 13 lines
On Thu, 06 Oct 2011 07:59:03 +0200 Marc Santhoff wrote: > Hi to everyone, > > I'd like to know: > Is it possible to have fpc compile a source package that is created only > as a lazarus package by using the .lpk-file, or do I have to make a > second sort of building configuration e.g. for fpmake or fpcmake? You can compile a lazarus package with the IDE or with lazbuild. They create a .compiled file, which contains the command line parameters for fpc. So, you can use that to compile the package directly with fpc.

That's pretty nice. :)

The package editor allows to create a Makfefile, but this does not support all specials.

At least it could be used as a template, if I have to write it anyways, fine.

There is currently no function to create a fpmake file, so you must create it manually.

What is the current state of fpmake usage, I think for fpc itself it may have become used as a standard tool? I'm not sure yet if I prefer Makefiles or writing pascal code ...

Same question for fppkg, testing it lately only showed four packages or so but in CCR there are some packages for lazarus that are only pascal library bindings and stuff. Has fppkg become the preferred standard tool yet?

Show quoted text 7 lines
> Secondly, does the generated .pas file corresponding to a package file > (.lpk) have to be kept when checking in to a source versioning system or > can it be deleted because it is recreated anyways? It is recreated by the IDE and lazbuild, not by the Makefile and not if the directory is readonly. So it is better kept in the VCS.

OK, like I've done it already for safety.

Thank you very much, that information and goodies will get me started. :)

Marc

Marc Santhoff

Reply by email