[fpc-devel] One fpc.cfg per fpc version

Michael Van Canneyt michael at freepascal.org
Mon Feb 17 10:50:02 CET 2014



On Mon, 17 Feb 2014, Marco van de Voort wrote:

> In our previous episode, Mattias Gaertner said:
>>>
>>> I'm not sure if that is really what you need, but I think this is the most
>>> flexible/straightforward method of `running one fpc.cfg per fpc version`.
>>
>> It is the most flexible, I agree with that.
>>
>> Most straightforward:
>> Without the '..' it could be more straightforward, because you would
>> not need the -n @.
>>
>> My point is:
>> The current search <dir>../etc/fpc.cfg does not work with the
>> current defaults of "make install". The following would be better:
>>
>> <dir>/etc/fpc.cfg
>> or /etc/fpc-<version>/fpc.cfg
>> or /etc/fpc.d/<version>.cfg
>>
>> I agree with Marco that the first is not *nix like.
>
> And none of all address the duplication of binaries in the bin directories.

This is getting slightly out of hand.

I don't think there is a problem to begin with.

You can perfectly cater for different FPC versions in 1 config file.
It has support for ifdef, include and whatnot.

See
http://www.freepascal.org/docs-html/user/userse17.html

That means you can simply have a config file

#ifdef ver2_6_0
#include /etc/fpc.d/260.cfg
#endif
#ifdef ver2_6_2
#include /etc/fpc.d/260.cfg
#endif
#ifdef ver2_7_1
#include /etc/fpc.d/260.cfg
#endif

You can probably even have (I would need to check this)

#include /etc/fpc.d/$FPCVERSION$.cfg

and any possible variation of this scheme. It's the problem of the packager to organize this.

What more do you need ?

Michael.



More information about the fpc-devel mailing list