[Scons-users] C++ header file dependency handling in Scons Vs Makefile

Jonathon Reinhart jonathon.reinhart at gmail.com
Tue Sep 29 11:15:56 EDT 2015


SCons is slightly superior in this case, but not why you would expect.

Let's say you make a change to the header file, and do an incremental
(update) build. Here's what happens:
- The header file changed, and thus its dependencies get re-built.  This is
unavoidable in any make system,
  unless you separate header pre-processing from compilation.
- The default MD5 decider looks at the (recently re-compiled) object files,
and realizes that some of the have
  not actually changed (even though their timestamps have been updated).
- The binaries that depend on those object files *need not be rebuilt*. And
therein lies the advantage.

Basically, where GNU Make allows changes to "trickle" through the entire
project, the default MD5 decider
in SCons "stops" the trickle at the earliest point.

On Tue, Sep 29, 2015 at 8:49 AM, Saurabh Bhatnagar <
saurabh.b.bhatnagar at oracle.com> wrote:

> Hi
>
> We are on scons0.96.
>
>
>
> There is another very large project that uses Makefiles/gmake/NMAKE.
>
> They have a set of header files that impact a bunch of sources.
>
> Hence if that header is changed(even for a redundant change) gmake thinks
> it should build that and off we go!
>
> All of that was built incremental is still redundant.
>
>
>
> Q:
>
> How does the dynamic dependency model of scons handle this scenario?
>
> Is it superior to the make in this case?
>
>
>
> --
> Warm Regards
>
> Saurabh Bhatnagar
>
> Oracle is committed to developing practices and products that help protect
> the environment
>
> [image: cid:image003.gif at 01CE683C.999F3F40]"Please consider your
> environmental responsibility before printing this e-mail"
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>


-- 
Computers are incredibly fast, accurate and stupid. Human beings are
incredibly slow, inaccurate and brilliant. Together they are powerful
beyond imagination.
                                    A. Einstein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150929/5af6116e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 1194 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150929/5af6116e/attachment.gif>


More information about the Scons-users mailing list