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

Sven Barth pascaldragon at googlemail.com
Sat Sep 25 21:33:27 CEST 2010


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.

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}

will search in the 2.5.1 directory

Regards,
Sven




More information about the Lazarus mailing list