[fpc-devel] (Re)compiling FPC or is there something like fpc.bpg?
Joost van der Sluis
joost at cnoc.nl
Tue Jul 27 12:10:52 CEST 2010
On Fri, 2010-07-23 at 19:32 +0300, Adem wrote:
> On 2010-07-23 4:41 PM, Marco van de Voort wrote:
> > In our previous episode, Joost van der Sluis said:
> >> I think that fpmake.pp is exactly what you want. Only it doesn't work
> >> fully yet.
> >>
> >> If fpmake works, we don't need make anymore.
> > It is not, since it requires an installed RTL + fpmkunit to create the first
> > fpmake. This is the bit handled by the still to be created bootstrap
> > scripts.
> What I am aiming is to, first, get the information in each 'fpmake.pp'
> file into one single 'Installer' object.
>
> Then, from that object, I'll try to generate a project file to be
> compiled under Lazarus.
>
> It looks doable, except that, each 'fpmake.pp' file is a project with
> information such as below.
>
> program fpmake;
> uses fpmkunit;
> Var
> P: TPackage;
> T: TTarget;
> begin
> With Installerdo
> begin
> P := AddPackage('my-nice-program');
> P.OSes :=[win32,openbsd,netbsd,freebsd,darwin,linux];
> T := P.Targets.AddUnit('myunit');
> T.ResourceStrings :=True;
> T := P.Targets.AddUnit('myprogram');
> T.Dependencies.Add('myunit');
> Run;
> end;
>
> end.
>
> This is, unfortunately, less than usable for my purposes.
>
> What I would like is something like this:
>
> With Installerdo
> begin
> P := AddPackage('my-nice-program');
> P.OSes :=[win32,openbsd,netbsd,freebsd,darwin,linux];
> T := P.Targets.AddUnit('myunit');
> T.ResourceStrings :=True;
> T := P.Targets.AddUnit('myprogram');
> T.Dependencies.Add('myunit');
> Run;
> end;
>
> in a file called, say, 'fpmake.pp.inc'.
>
> Then, I could simply combine them into a single unit.
>
> Obviously, a little more work is involved but this is the gist of it.
>
> Now, what I'd like to know is what generates those 'fpmake.pp' files, so
> that I might take a shot altering it to generate 'fpmake.pp.inc' files
> the way I wanted.
I don't know what you want, but fpmake *is* an installer. Run ./fpmake
--install. (Or better fppkg --install) If you want to use the fpmake
files as an include-file, look how the same thing is done in the
packages-directory of fpc.
Joost
More information about the fpc-devel
mailing list