<img style="width:1px;height:1px" src="https://count.mail.163.com/beacon/webmail.gif?type=webmail_mailtrace&guid=862ddcaaf3374d7c9846761a945e296b"><div><br></div><div>Honestly.. IMHO using #define HEADER "xyz.h" and then #include HEADER is</div><div>not great practice.</div><div><br></div><div>        Yes, I agree with you, that is not a good practice. But the code is generated by tool, and many marcos and places. Haha God. the benefit is that logic and configuration can be seprected. so tools like to use it.</div><div>         </div><div>         does ninja have a balance proformance?.</div><div>         And maybe I could generate .i firstly, and then generate .o. is it a good ideal?  Haha.</div><div><br></div><div id="imail_signature" class="ntes-signature"></div><div class="ntes-mailmaster-quote" style="padding-top: 1px; padding-bottom: 1px">
    <div style=" margin-top: 20px; margin-bottom: 12px; font-size: 14px; line-height: 1.25; color: #89898c; ">---- Replied Message ----</div>
    <div style=" margin-bottom: 12px; font-size: 13px; line-height: 1.25; color: #2c2c2e; padding: 2px; border-radius: 8px; background-color: #f0f0f0; ">
        <table width="100%" cellpadding="0" cellspacing="10" border="0">
            <tbody><tr>
                <td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; white-space: nowrap; ">From</td>
                <td valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; "><a class="mail-from" style="color: #1c83eb; text-decoration: none" href="mailto:scons-users-request@scons.org">scons-users-request@scons.org</a></td>
            </tr>
            <tr>
                <td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; white-space: nowrap; ">Date</td>
                <td class="mail-date" valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; ">06/07/2025 13:35</td>
            </tr>
            <tr style="">
                <td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; ">To</td>
                <td valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; "><a class="mail-to" style="color: #1c83eb; text-decoration: none" href="mailto:scons-users@scons.org">scons-users@scons.org</a></td>
            </tr>
            <tr style="display:none;">
                <td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; ">Cc</td>
                <td valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; "></td>
            </tr>
            <tr>
                <td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; ">Subject</td>
                <td class="mail-subject" valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; ">Scons-users Digest, Vol 165, Issue 8</td>
            </tr>
        </tbody></table>
    </div>
    <div>Send Scons-users mailing list submissions to
<br>     scons-users@scons.org
<br>
<br>To subscribe or unsubscribe via the World Wide Web, visit
<br>     <a href="https://pairlist4.pair.net/mailman/listinfo/scons-users">https://pairlist4.pair.net/mailman/listinfo/scons-users</a>
<br>or, via email, send a message with subject or body 'help' to
<br>     scons-users-request@scons.org
<br>
<br>You can reach the person managing the list at
<br>     scons-users-owner@scons.org
<br>
<br>When replying, please edit your Subject line so it is more specific
<br>than "Re: Contents of Scons-users digest..."
<br>
<br>
<br>Today's Topics:
<br>
<br>   1. Re: update dependency and signatures.dblite after biilding
<br>      (Bill Deegan)
<br>   2. Re: Testing ninja build generator (Bill Deegan)
<br>
<br>
<br>----------------------------------------------------------------------
<br>
<br>Message: 1
<br>Date: Fri, 6 Jun 2025 11:14:00 -0700
<br>From: Bill Deegan <bill@baddogconsulting.com>
<br>To: SCons users mailing list <scons-users@scons.org>
<br>Subject: Re: [Scons-users] update dependency and signatures.dblite
<br>     after biilding
<br>Message-ID:
<br>     <CAEyG4CGrXp77zp9hwCYOkL8j6TSeKWB3bXXeWArTCu+0ad8Oow@mail.gmail.com>
<br>Content-Type: text/plain; charset="utf-8"
<br>
<br>Of course a better scanner is slower.. as would generating the .d files
<br>from the compiler..
<br>
<br>That said, the scanner I pointed you at may have room for improvement in
<br>terms of performance.
<br>
<br>Honestly.. IMHO using #define HEADER "xyz.h" and then #include HEADER is
<br>not great practice.
<br>
<br>For your code how many instances of a header file defined by a macro are
<br>there?
<br>Is it one, which is used all over the place?
<br>Or many, used many places?
<br>
<br>On Fri, Jun 6, 2025 at 10:20?AM ? <yjtyzw@126.com> wrote:
<br>
<br>>
<br>>  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>> I have try it, as Bill and Mats said, CConditionalScanner can resolve my
<br>> problem.
<br>> And I find that after set CConditionalScanner, the building time change
<br>> from 5min to 8min.
<br>> ---- Replied Message ----
<br>> From Mats Wichmann<mats@wichmann.us> <undefined>
<br>> Date 6/6/2025 23:54
<br>> To ?<yjtyzw@126.com> <yjtyzw@126.com>
<br>> Cc SCons users mailing list<scons-users@scons.org> <scons-users@scons.org>
<br>> Subject Re: [Scons-users] update dependency and signatures.dblite after
<br>> biilding
<br>> On 6/6/25 09:46, ? wrote:
<br>>
<br>>
<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>>
<br>>
<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>>
<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>> 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>> _______________________________________________
<br>> Scons-users mailing list
<br>> Scons-users@scons.org
<br>> <a href="https://pairlist4.pair.net/mailman/listinfo/scons-users">https://pairlist4.pair.net/mailman/listinfo/scons-users</a>
<br>>
<br>-------------- next part --------------
<br>An HTML attachment was scrubbed...
<br>URL: <<a href="https://pairlist4.pair.net/pipermail/scons-users/attachments/20250606/18590e02/attachment-0001.htm>">https://pairlist4.pair.net/pipermail/scons-users/attachments/20250606/18590e02/attachment-0001.htm></a>
<br>
<br>------------------------------
<br>
<br>Message: 2
<br>Date: Fri, 6 Jun 2025 11:26:28 -0700
<br>From: Bill Deegan <bill@baddogconsulting.com>
<br>To: SCons users mailing list <scons-users@scons.org>
<br>Subject: Re: [Scons-users] Testing ninja build generator
<br>Message-ID:
<br>     <CAEyG4CFazPZvuNMSDqDy9QCE7wbTTXNVyUEJuL7145Fi8Ku2dw@mail.gmail.com>
<br>Content-Type: text/plain; charset="utf-8"
<br>
<br>There is some generic filename escaping logic in scons which should likely
<br>be used there.
<br>
<br>env['ESCAPE'] should have the current platform's escaping function.
<br>
<br>On Fri, Jun 6, 2025 at 9:55?AM Mats Wichmann <mats@wichmann.us> wrote:
<br>
<br>> On 6/6/25 10:42, Julien Pommier wrote:
<br>> >
<br>> >
<br>> >> There's another layer of "quoting problem" here, beyond the URL-quoting
<br>> that I'm trying to understand.
<br>> >>
<br>> >> As written, the rule in build.ninja looks like:
<br>> >>
<br>> >> build run$ me.sh: TEMPLATE | .ninja/scons_daemon_dirty
<br>> >>
<br>> >> I'm assuming the '$' is some kind of space-escape syntax for ninja.
<br>> This fails with
<br>> >>
<br>> >> scons: *** Do not know how to make File target `run'
<br>> >>
<br>> >> so we ended up seeing the target back in SCons as being just "run".
<br>> Adding a layer of quotes doesn't work, as those are carefully preserved and
<br>> the target names don't match.
<br>> >>
<br>> >> Not familiar with this code beyond the fiddling I did in Utils.py,
<br>> hopefully someone else has some ideas, else we'll have to dig into it.
<br>> >
<br>> > It seems the quoting need to be applied to the line 234 in
<br>> ninja_scons_daemon.py. Using:
<br>> >
<br>> >                      input_command = "build \"" + building_node + "\"
"
<br>> >
<br>> > instead of
<br>> >                     input_command = "build " + building_node + "
"
<br>> >
<br>> > makes it work for my test-case
<br>>
<br>> yeah, that looks good.
<br>>
<br>>
<br>> _______________________________________________
<br>> Scons-users mailing list
<br>> Scons-users@scons.org
<br>> <a href="https://pairlist4.pair.net/mailman/listinfo/scons-users">https://pairlist4.pair.net/mailman/listinfo/scons-users</a>
<br>>
<br>-------------- next part --------------
<br>An HTML attachment was scrubbed...
<br>URL: <<a href="https://pairlist4.pair.net/pipermail/scons-users/attachments/20250606/69b37031/attachment-0001.htm>">https://pairlist4.pair.net/pipermail/scons-users/attachments/20250606/69b37031/attachment-0001.htm></a>
<br>
<br>------------------------------
<br>
<br>Subject: Digest Footer
<br>
<br>_______________________________________________
<br>Scons-users mailing list
<br>Scons-users@scons.org
<br><a href="https://pairlist4.pair.net/mailman/listinfo/scons-users">https://pairlist4.pair.net/mailman/listinfo/scons-users</a>
<br>
<br>
<br>------------------------------
<br>
<br>End of Scons-users Digest, Vol 165, Issue 8
<br>*******************************************
<br></div>
</div>