[fpc-pascal] Re: How to use fpcmake

Guillermo Martínez Jiménez gmjimen at burdjia.com
Sun Apr 26 19:44:00 CEST 2009


> From: Graeme Geldenhuys <graemeg.lists at g...>
> Subject: Re: [fpc-pascal] How to use fpcmake
>
> Hi Guillermo,
>
> I struggled with it as well. Henry Vermaak then created an example for
> me and showed how to use it. The example he did was for the fpGUI
> Toolkit project.

I did read Vermaak's example and I've found some documentation at the
wiki (http://wiki.lazarus.freepascal.org/FPMake) but I can't
understand it. That's the program I wrote:
________________________

PROGRAM fpmake;
USES
  fpmkunit;
VAR
  I: TCustomInstaller;
  P: TPackage;
  T: TTarget;
  UnitsList: ARRAY [0..8] OF STRING = (
    'albase', 'alblend', 'alfile', 'alfixed', 'alflic', 'algl', 'allegro',
    'alvga', 'alvtable'
  );
  IncList: ARRAY [0..1] OF STRING = (
    'alkeyid'. 'alsysdrv'
  );
  Cnt: INTEGER;
BEGIN
  I := Installer;
  P := I.AddPackage ('allegro.pas');
  P.Version := '4.3.0-SVN';
  P.UnitPath.Add ('lib');
  FOR Cnt := 0 TO 8 DO
  BEGIN
    T := P.Targets.AddUnit (UnitsList[Cnt]+'.pas');
  END;
{ How do I do to add included files?
  FOR Cnt := 0 TO 1 DO
  BEGIN
    T := P.Targets.AddUnit (IncList[Cnt]+'.inc');
  END;
}
  I.Run;
END.
________________________

It compiles but when I run "./fpmake archive" it returns a lot of
"Warning: source file * not found for *" but they actually exists(!).

The idea is to install all files from "UnitsList" and "IncList" in the
FPC's unit directory so they're accessible to any project. Optionally
there's also documentation (build from sources using "pasdoc"), some
examples, a complex demonstration (with data) and two tools.

Can somebody help me to understand it?

Guillermo "Ñuño" Martínez



More information about the fpc-pascal mailing list