[fpc-devel] fpc.cfg #INCLUDE directive

Jonas Maebe jonas.maebe at elis.ugent.be
Sun May 31 18:01:08 CEST 2015


On 31/05/15 17:31, patspiper wrote:

> I would like to put my custom cross-compiling switches in an inc file
> which is '#INCLUDed' in my fpc.cfg. The inc file will be in the same
> folder of fpc.cfg wherever that is. However, #INCLUDE will look in the
> current directory if no path is specified and will fail to locate the
> inc file.

You should do it the other way around: include the default fpc.cfg file
(which is in a known location, since it's where FPC is installed) in
your custom configuration file. That way you don't have to modify
fpc.cfg every time a new fpc release (with a new fpc.cfg file) comes out.

You can modify the directories where the compiler looks for included
configuration files using the "#CFGDIR xxx" directive inside
configuration files. There is no way to specify "the directory where the
current configuration file is located" though.


Jonas




More information about the fpc-devel mailing list