[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #44742] Double-dep with double-colon rule not built

From: Joe Crayne
Subject: [bug #44742] Double-dep with double-colon rule not built
Date: Sun, 22 May 2016 19:24:42 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

Follow-up Comment #11, bug #44742 (project make):

The patch is attached to the ticket separate from my


For the first change, it makes no sense to me to propagate a
timestamp on a remade rule to an unremade rule.  Which the
f_mtime() function is doing (verified in debugger) when
called from remake.c:179 (of git tree 4c9e10f).  We could
try to ensure that f_time is never called when it is not
safe to propagate a timestamp to all the double colon rules,
but it is more robust to make f_mtime() itself do the check
so that f_mtime() can be used more freely.

For the second change, notice that the problematic timestamp
propagation was happening at remake.c:179 but, in the
non-parallel case, a loop forcing all the double colon
targets to be remade before that happens at remake.c:358.
But for the parallel case, that loop only queues jobs and
all of the rules will be considered later after the next
reap_children() after the timestamp mistake occurs.

The loop is referenced in the changelog:

1999-12-02  Paul D. Smith  <address@hidden>

       * remake.c (update_file): Move the considered test outside the
       double-colon loop, _but_ make sure we test the double_colon target
       not the "current" target.  If we stop early because one
       double-colon target is running, mark all the rest considered and
       try to start their prerequisites (so they're marked considered).
       Fix for PR/1476 suggested by Tim Magill <address@hidden>.

I don't know what bug 1476 was and don't know how to find it
on the internet, but I suspect it was to fix an issue
regarding an insufficient number of double-colon rules being
run due to the timestamp propagation in f_mtime.  I could be
wrong, but I'll believe this loop is unnecessary until
somebody explains to me why we need it.  I left it in only
to make my change more conservative in that it only impacts
parallel builds with double colons.

Disclosure: I do not understand why other, earlier, calls to
f_mtime() have not been an issue.

Now, supposing I'm wrong about something or that I
misunderstand something, it does not matter much, because it
is easy to prove that my change does not affect any of
make's behavior unless it is running parallel and it
includes double-colons.  A situation that is currently badly
broken and a situation, which, empirically, my change fixes.
So I feel justified in submitting the patch even with an
incomplete understanding.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]