<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body style="font-family:"><div style="font-family: 微软雅黑;"><div><br></div><div> Well, this is why Bill advised trying the C Conditional Scanner, which <br>*does* know how to handle preprocessor instructions of this sort. It's <br>still a bit of a work in progress (there are some questions about <br>recursion, in particular), which is why it's not the default. Were you <br>able to try that out? </div><div style="text-indent: 2em;"><br></div><div style="text-indent: 2em;">I have try it, as Bill and Mats said, CConditionalScanner can resolve my problem.</div><div style="text-indent: 2em;">And I find that after set CConditionalScanner, the building time change from 5min to 8min.</div><div spellcheck="false" id="ntes-pcmac-signature" style="font-family:微软雅黑" data-ntes-signature="true"><div style="font-size:14px;padding:0;margin:0"></div></div></div><div class="J-reply ntes-mailmaster-quote" style="padding-top: 1px; padding-bottom: 1px; font-family: 微软雅黑;"><div style="margin:2em 0 1em;font-size:14px;line-height:1.25;color:#78787a">---- Replied Message ----</div><div style="margin-bottom:1em;font-size:12px;line-height:1.25;color:#232324;padding:0.5em 0.25em;border-radius:0.67em;background-color:#f0f0f0"><table width="100%" cellpadding="0" cellspacing="9" border="0" id="ntes_editor_table_10010" class="ntes_editor_table ntes_editor_ext_table "><tbody><tr><td valign="top" style="width:4.25em;font-size:12px;line-height:1.25;color:#78787a">From</td><td class="" valign="top" style="font-size:12px;line-height:1.25;color:#232324;word-break:break-all"><a class="mail-from" style="color:#3061f2;text-decoration:none" href="mailto:undefined">Mats Wichmann<mats@wichmann.us></a></td></tr><tr><td valign="top" style="width:4.25em;font-size:12px;line-height:1.25;color:#78787a">Date</td><td class="mail-date" valign="top" style="font-size:12px;line-height:1.25;color:#232324;word-break:break-all">6/6/2025 23:54</td></tr><tr><td valign="top" style="width:4.25em;font-size:12px;line-height:1.25;color:#78787a">To</td><td class="" valign="top" style="font-size:12px;line-height:1.25;color:#232324;word-break:break-all"><a class="mail-to" style="color:#3061f2;text-decoration:none" href="mailto:yjtyzw@126.com">于<yjtyzw@126.com></a></td></tr><tr><td valign="top" style="width:4.25em;font-size:12px;line-height:1.25;color:#78787a">Cc</td><td class="" valign="top" style="font-size:12px;line-height:1.25;color:#232324;word-break:break-all"><a class="mail-cc" style="color:#3061f2;text-decoration:none" href="mailto:scons-users@scons.org">SCons users mailing list<scons-users@scons.org></a></td></tr><tr><td valign="top" style="width:4.25em;font-size:12px;line-height:1.25;color:#78787a">Subject</td><td class="" valign="top" style="font-size:12px;line-height:1.25;color:#232324;word-break:break-all">Re: [Scons-users] update dependency and signatures.dblite after biilding</td></tr></tbody></table></div>On 6/6/25 09:46, 于 wrote:<br><blockquote class="mmbqc1"><br> My problem:<br> <br> <br> In my project, there are those code in some source files,<br> <br> #defineFOO_HEADER "foo.h"<br> #includeFOO_HEADER<br> <br> <br> <br> and the files are independent module, I can't modify them.<br> <br> the scons-user.pdf said, scons the built-in C scanner is unable to<br> extract the implicit dependency on a header file.<br> So I create .d file for every source file, and parse dependencies<br> from .d, and then add dependency by Depends function.<br> <br> And then, there is a new problem, when there are no .d, (for<br> example the first building or dependencies are changed), I need to<br> build project with two times, and then I can push all the<br> dependencies into signature.<br></blockquote><br>yes, this isn't ideal - if the dependencies can't be automatically <br>determined, you have both a first-run problem and no detection of changes.<br><br><blockquote class="mmbqc1"><br> <br> So I consider that whether could I update all the dependencies into<br> signature with just one building.<br> that is my problem.<br> <br></blockquote>Well, this is why Bill advised trying the C Conditional Scanner, which <br>*does* know how to handle preprocessor instructions of this sort. It's <br>still a bit of a work in progress (there are some questions about <br>recursion, in particular), which is why it's not the default. Were you <br>able to try that out?<br><br></div><!--😀--></body></html>