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

Ewald ewald at yellowcouch.org
Mon Feb 17 00:02:11 CET 2014


On Sun, 16 Feb 2014 19:14:33 +0100, Mattias
Gaertner<nc-gaertnma at netcologne.de> wrote:
> 
> Yes, for example make install INSTALL_PREFIX=~/2.6.2 installs to
> ~/2.6.2/lib/fpc/2.6.2
> Which looks odd.
> 
> Maybe fpc should search for <dir of ppcxxx>/fpc.cfg.
> 
> Then maybe the current search for <dir of ppcxxx>/../etc/fpc.cfg can be
> removed. Only a few people use it and they will probably be happy to
> have more flexibility where to install fpc.

This layout is actually quite convenient, just change your path and you
have a different version:

The trick is basically to run fpc with two switches, and a modified $PATH:
    - [-n]:   One that disables the default config file
    - [@XXX]: One that specifies where to look for the config file. (as
the quoted text states this should not be required, yet somehow it was for
my setup -- I'll need to look into this)

So than you have something like (for revision 26651, obviously):
===== fpc-26651 =====
#!/bin/sh
PATH="/compilers/fpc/26651/bin":$PATH" fpc -n
@/compilers/fpc/26651/etc/fpc.cfg "$@"
===== ========= =====

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`.

-- 
Ewald



More information about the fpc-devel mailing list