[Scons-users] Scons-users Digest, Vol 165, Issue 8
于
yjtyzw at 126.com
Sat Jun 7 06:55:53 EDT 2025
could I use ninja to balance building time and dependencies?
---- Replied Message ----
| From | scons-users-request at scons.org |
| Date | 06/07/2025 13:35 |
| To | scons-users at scons.org |
| Cc | |
| Subject | Scons-users Digest, Vol 165, Issue 8 |
Send Scons-users mailing list submissions to
scons-users at scons.org
To subscribe or unsubscribe via the World Wide Web, visit
https://pairlist4.pair.net/mailman/listinfo/scons-users
or, via email, send a message with subject or body 'help' to
scons-users-request at scons.org
You can reach the person managing the list at
scons-users-owner at scons.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Scons-users digest..."
Today's Topics:
1. Re: update dependency and signatures.dblite after biilding
(Bill Deegan)
2. Re: Testing ninja build generator (Bill Deegan)
----------------------------------------------------------------------
Message: 1
Date: Fri, 6 Jun 2025 11:14:00 -0700
From: Bill Deegan <bill at baddogconsulting.com>
To: SCons users mailing list <scons-users at scons.org>
Subject: Re: [Scons-users] update dependency and signatures.dblite
after biilding
Message-ID:
<CAEyG4CGrXp77zp9hwCYOkL8j6TSeKWB3bXXeWArTCu+0ad8Oow at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
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-0001.htm>
------------------------------
Message: 2
Date: Fri, 6 Jun 2025 11:26:28 -0700
From: Bill Deegan <bill at baddogconsulting.com>
To: SCons users mailing list <scons-users at scons.org>
Subject: Re: [Scons-users] Testing ninja build generator
Message-ID:
<CAEyG4CFazPZvuNMSDqDy9QCE7wbTTXNVyUEJuL7145Fi8Ku2dw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
There is some generic filename escaping logic in scons which should likely
be used there.
env['ESCAPE'] should have the current platform's escaping function.
On Fri, Jun 6, 2025 at 9:55?AM Mats Wichmann <mats at wichmann.us> wrote:
> On 6/6/25 10:42, Julien Pommier wrote:
> >
> >
> >> There's another layer of "quoting problem" here, beyond the URL-quoting
> that I'm trying to understand.
> >>
> >> As written, the rule in build.ninja looks like:
> >>
> >> build run$ me.sh: TEMPLATE | .ninja/scons_daemon_dirty
> >>
> >> I'm assuming the '$' is some kind of space-escape syntax for ninja.
> This fails with
> >>
> >> scons: *** Do not know how to make File target `run'
> >>
> >> so we ended up seeing the target back in SCons as being just "run".
> Adding a layer of quotes doesn't work, as those are carefully preserved and
> the target names don't match.
> >>
> >> Not familiar with this code beyond the fiddling I did in Utils.py,
> hopefully someone else has some ideas, else we'll have to dig into it.
> >
> > It seems the quoting need to be applied to the line 234 in
> ninja_scons_daemon.py. Using:
> >
> > input_command = "build \"" + building_node + "\" "
> >
> > instead of
> > input_command = "build " + building_node + " "
> >
> > makes it work for my test-case
>
> yeah, that looks good.
>
>
> _______________________________________________
> 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/69b37031/attachment-0001.htm>
------------------------------
Subject: Digest Footer
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
https://pairlist4.pair.net/mailman/listinfo/scons-users
------------------------------
End of Scons-users Digest, Vol 165, Issue 8
*******************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20250607/768bf76a/attachment-0001.htm>
More information about the Scons-users
mailing list