[fpc-pascal] fpmake: output directories

Peter Vreman peter at freepascal.org
Tue Jun 2 18:16:08 CEST 2009

Mattias Gärtner wrote:
> Zitat von Michael Van Canneyt <michael at freepascal.org>:
>> On Tue, 2 Jun 2009, Michael Van Canneyt wrote:
>>> On Tue, 2 Jun 2009, Vincent Snijders wrote:
>>>> Michael Van Canneyt schreef:
>>>>> On Mon, 1 Jun 2009, Mattias Gaertner wrote:
>>>>>> Hi fpmake devels,
>>>>>> fpmake uses as ppu output directory for example:
>>>>>> units/i386-linux/
>>>>>> And there is no way to change this. Right?
>>>>>> Some LCL packages have different PPUs per widgetset, so they need an
>>>>>> output directory per widgetset. At the moment they use for example:
>>>>>> units/i386-linux-gtk2/
>>>>>> Another example is to distinguish between release and debug version.
>>>>>> What is the best/recommended way to solve this with fpmake?
>>>>> You can't in this way.
>>>> So, no debug and release version on one computer?
>>> Not in this way, at least.
>> Hi,
>> Peter Vreman reminded me that we had this discussion on core about a year
>> ago. The solution we came up with was a 'subtarget' or 'configuration'.
>> This was simply an option to fpmake, which would alter the output path 
>> and
>> search paths. It was needed to discern between debug and non-debug, 
>> PIC and non-PIC code etc.
>> So there would be
>> fpmake --subtarget=debug
>> Which would send output in
>> units/i386-linux-debug
>> So maybe this can be used for the widgetsets, debug-non debug etc.
>> Beware: AFAIK it has not yet been implemented, but that was the initial
>> idea.
> Thanks.
> Maybe this can be used for debug/release.
> I don't see how this can be used for the widgetsets.
> My dream is this:
> User opens a project and/or package and the IDE uses fppkg to download 
> and install automatically the missing packages.
> Some packages like the LCL are already installed via lazarus. So somehow 
> fppkg needs to know, that some packages don't need be downloaded from 
> the repositories. Maybe lazarus can register a local repository?

fppkg works with different compiler configuration files stored in 
~/.fppkg/config/. The default file for the current target is called 
'default'. This file is implicitly created at first start. Additional 
configuration files can be created manually. These configuration files 
can contain cross-compile settings, e.g. a file 'win32' can be created 
having 'os=win32'. fppkg can then be called with 'fppkg --config=win32' 
to cross compile and install for i386-win32.

What still has to be done is extending this small configuration file 
with 2 new settings: 'CompilerOptions' and 'DirectorySuffix'. These can 
then be used to create release and debug configurations:

CompilerOptions=-O3 -CX -XX

CompilerOptions=-O- -gwl

For i386-linux then the release will then output in 
'units/i386-linux-release/<packagename>/' and the debug will goto 

The same can be done for lazarus widgetsets:

CompilerOptions=-O3 -CX -XX -dGTK2

There is currently another limitation in fppkg: There is only one single 
LocalUnitDir and GlobalUnitDir. This might to be enhanced to support 
multiple directories at least for searching installed packages in a 
dedicated lazarus repository. Also to support multiple configuration 
suffixes so that the units/i386-linux/rtl can be used together with 


More information about the fpc-pascal mailing list