[Scons-users] update dependency and signatures.dblite after biilding

yjtyzw at 126.com
Fri Jun 6 13:19:49 EDT 2025



 Well, this is why Bill advised trying the C Conditional Scanner, which
*does* know how to handle preprocessor instructions of this sort.  It's
still a bit of a work in progress (there are some questions about
recursion, in particular), which is why it's not the default.  Were you
able to try that out? 


I have try it, as Bill and Mats said, CConditionalScanner can resolve my problem.
And I find that after set CConditionalScanner, the building time change from 5min to 8min.
---- Replied Message ----
| From | Mats Wichmann<mats at wichmann.us> |
| Date | 6/6/2025 23:54 |
| To | 于<yjtyzw at 126.com> |
| Cc | SCons users mailing list<scons-users at scons.org> |
| Subject | Re: [Scons-users] update dependency and signatures.dblite after biilding |
On 6/6/25 09:46, 于 wrote:

‍‍My problem:
‍

In my project, there are those code in some source files,

#defineFOO_HEADER "foo.h"
#includeFOO_HEADER

‍‍

and the files are independent module, I can't modify them.

the scons-user.pdf said, scons the built-in C scanner is unable to
extract the implicit dependency on a header file.
So I create .d file for every source file, and parse dependencies
from .d, and then add dependency by Depends function.

‍‍And then, there is a new problem, when there are no .d, (for
example the first building or dependencies are changed), I need to
build project with two times, and then I can push all the
dependencies into signature.

yes, this isn't ideal - if the dependencies can't be automatically
determined, you have both a first-run problem and no detection of changes.


‍‍
So I consider that whether could I update all the dependencies into
signature with just one building.
that is my problem.

Well, this is why Bill advised trying the C Conditional Scanner, which
*does* know how to handle preprocessor instructions of this sort.  It's
still a bit of a work in progress (there are some questions about
recursion, in particular), which is why it's not the default.  Were you
able to try that out?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20250607/9d2ba460/attachment-0001.htm>


More information about the Scons-users mailing list