[Lazarus] How to pass path of fpc to make command, and some thoughts on Lazarus/FPC Installation.

Frank Church vfclists at gmail.com
Sat Sep 25 22:07:17 CEST 2010

On 25 September 2010 20:33, Sven Barth <pascaldragon at googlemail.com> wrote:

> On 24.09.2010 21:53, Frank Church wrote:
>> On 24 September 2010 16:45, Sven Barth <pascaldragon at googlemail.com
>> <mailto:pascaldragon at googlemail.com>> wrote:
>>    There should be a makeskel or similar binary in fpc240/bin/fpc which
>>    you can call to create a config skeleton (you might call it with -h
>>    to see its help).
>> I think the command in question is 'samplecfg'. It also generates some
>> fp.xxx files under ~/.fp/. I hope they are for the command line version.
>> Could they possibly interfere with other versions of FreePascal I might
>> be using?
> As I'm now on my Linux PC again, I checked that: it is makeskel in
> ~/LazarusInstalls/fpc240/bin/makeskel. The help can be queried by using "-h"
> or "--help" as parameter.
makeskel has a whole lot of options but none of them mention fpc.cfg. Do you
have a sample command? It appears to be some kind of xml generator.

> FPC reads by default the configuration file from ~/.fpc.cfg (and
> /etc/fpc.cfg, but I'm not using that one). So every FPC version will use
> that file if it exists and you didn't tell it to exclude the default file
> with "-n" (I forgot that below).
> But you can use the $fpcversion macros in the config file to "generalize"
> that (might be usable with the "one prefix" configuration below).
>  I am working through you suggestions and I notice that the 2.4.0
>> specific files seem to be in a directory lib/fpc/2.4.0 under
>> ~/LazarusInstalls/fpc240, which contains a 'share' and a 'bin'
>> directory.'share' contains a 'doc/2.4.0' directory.
>> Does that mean that the I could also use  make install
>> INSTALL_PREFIX='~/LazarusInstalls/fpc240' command to install all the fpc
>> versions into the same directory without their executable's clashing?
> >
> > I take it that the 'bin' folder in the INSTALL_PREFIX contains utilities
> > which can be shared among the different installations, and that the
> > 'share' folder will also have different docs for the versions.
> >
> Yes, the utilities in "bin" can be shared, but you need to make sure that
> they are from the newest version you are using, because the compiler might
> rely on them.
> And I just noticed: you can force "fpc" to look in a certain directory for
> the compiler instead of relying on path:
> fpc -Xp~/LazarusInstalls/fpc240/lib/fpc/2.4.0 {other parameters}
> will search for the "ppc*" in the version 2.4.0 directory, while
> fpc -Xp~/LazarusInstalls/fpc240/lib/fpc/2.5.1 {other parameters}

I have tested this and it works but it does not accept the ~ . It needs the
full path name, it also rather odd because it does not allow the use of a
space between the option and the parameter.

Can this be set in the Lazarus environment as well, for all projectsm and
Lazarus IDE rebuilds?

> will search in the 2.5.1 directory
> Regards,
> Sven
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Frank Church

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20100925/4ad64b71/attachment-0004.html>

More information about the Lazarus mailing list