[fpc-devel] fpmake listsources

Darius Blaszijk dhkblaszyk at zeelandnet.nl
Thu Aug 16 22:57:59 CEST 2007



Michael Van Canneyt wrote:
> 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.
>>     
So what is the function of archive then? This command already lists all 
source files in the package. Only thing to do is to implement zipfile 
creation.

>> 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.
>
> AddSources('*.pp')
> AddSource('somesource.pas');
> AddSource('somefile.ini');
>   
Cannot agree more.
>> 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 :-)
>   
Great! I have a lot of questions :)

Darius



More information about the fpc-devel mailing list