[Scons-users] how to use env.ParseDepends() to parse *.d files with different format style

yjtyzw at 126.com
Sun Nov 10 01:36:20 EST 2024


Hello guys,


‍I want to use env.ParseDepends() add *.o dependencies. But different compilers can generate different style *.d.
Add SCons version is 4.8.1.
I generate *.d files, like makefile style (multiple rules). Such as below,
D:/workspace/LCfg.o: D:/workspace/inc/Std_Types.h  ‍

There is a string ': ' between *.o and *.d and there is a ':' after 'D'.
The env.ParseDepends() separate *.o and *.d, so the first 'D' was detected as target file.
And then, I modify the env.ParseDepends(), I add a space ' ' in target, depends = line.split(': ', 1)
Then *.d file can be parsed successfully.
But I think that is improper to modify source code.


My question is that how could I parse different style *.d with a better method.



















-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20241110/bbf62aa5/attachment.htm>


More information about the Scons-users mailing list