[fpc-devel] fpmake listsources

Michael Van Canneyt michael at freepascal.org
Thu Aug 16 22:06:16 CEST 2007

On Thu, 16 Aug 2007, Peter Vreman wrote:

> At 19:35 16-8-2007, you wrote:
> >While looking at the listsources command I found something peculiar (i
> >think).
> >
> >The method TPackage.GetSourceFiles lists all sources stored in TSources. This
> >seems to be strange for two reasons
> >
> >1) all sources are stored in TTarget
> >2) the sources variable in TPackage is never filled automatically when you
> >add units or programs from fpmake.pp, which would indicate the user has to
> >fill the variable himself, but this defies the listsources command.
> >
> >This leads me to believe TSources is an artifact from the past. Is that
> >correct?
> >
> >I would propose to change the implementation in TPackage.GetSourceFiles so it
> >retrieves sources from TTarget instead and then remove TSources altogether.
> >
> >Oh yes, what is the actual planned purpose of listsources ;) ? Is it
> >something similar to maven verify? In that case I would like to propose to
> >additionally list the results of all commands plus some checks. I will give a
> >more detailed example if needed.
> This is exactly the point were development of fppkg/fpmake stalled.

Proving my statement that sources was added at a later point, since I 
didn't include it initially :-)

> There needs to be a xml file generated either in sources.xml or manifest.xml
> that can be used by fppkg to create an archive out of it.
> Using TTarget for sources is a bit complex because you can have include files
> and also implicitly build units that also depend on include files and
> depending on the target different source directories. Also  how to handle
> additional input data files that are convert to typedconstant-includefiles.
> Therefor i had the idea to add a TSources that can list complete directories.

That seems a bit overkill. I would add some commands that can be used to fill
up sources.


> There is no final decision made yet. Ideas how to implement it nicely are
> welcome.
> I'll be on holiday the next week so i won't be able to comment on ideas.

I am not on holiday, so I am available for comments :-)


More information about the fpc-devel mailing list