dependency analysis for makefile construction

Basile B. via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Sep 6 00:35:04 PDT 2016


On Monday, 5 September 2016 at 18:49:25 UTC, Basile B. wrote:
> On Monday, 5 September 2016 at 18:22:08 UTC, ag0aep6g wrote:
>> On 09/04/2016 12:07 AM, dan wrote:
>>> Are there any FOSS tools for doing dependency analysis of 
>>> [...]
>> [...]
>> I'm not aware of a standalone tool that does something like 
>> this. If you want to write one, you could do like rdmd and use 
>> `dmd -deps`/`dmd -v`, or you could use a standalone D parser 
>> like libdparse.
>>
>> http://code.dlang.org/packages/libdparse
>
> I have one in dastworx, based on dparse:
>
> https://github.com/BBasile/Coedit/blob/master/dastworx/src/imports.d#L64
>
> It would be very easy to make it a standalone tool (dastworx is 
> a standalone tool but its main() is specific to Coedit) or to 
> add such an anlayzer to Dscanner.
>
> about 200 SLOCs not more.

Oops, big mouth syndrome here, it would be actually more complex 
because a persistent associative array is needed to link 
filenames to modules, projects to filename, date stamps to 
filename, etc...Otherwise at each execution there are a lot of 
stuff to parse. dastworx does not implement these features 
because they are done in an IDE module (the "libman").


More information about the Digitalmars-d-learn mailing list