[Scons-users] update dependency and signatures.dblite after biilding
Bill Deegan
bill at baddogconsulting.com
Fri Jun 6 14:14:00 EDT 2025
Of course a better scanner is slower.. as would generating the .d files
from the compiler..
That said, the scanner I pointed you at may have room for improvement in
terms of performance.
Honestly.. IMHO using #define HEADER "xyz.h" and then #include HEADER is
not great practice.
For your code how many instances of a header file defined by a macro are
there?
Is it one, which is used all over the place?
Or many, used many places?
On Fri, Jun 6, 2025 at 10:20 AM 于 <yjtyzw at 126.com> wrote:
>
> 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> <undefined>
> Date 6/6/2025 23:54
> To 于<yjtyzw at 126.com> <yjtyzw at 126.com>
> Cc SCons users mailing list<scons-users at scons.org> <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?
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20250606/18590e02/attachment.htm>
More information about the Scons-users
mailing list