aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/compile-rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-06-24 09:47:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-06-24 09:47:52 +0200
commit57a8dbd7fe63b2ed8618bde71a779102f0ab6ca9 (patch)
treeec5d152ff13a678b6e16fbc5d9f6eab9aaf59e05 /libbuild2/cc/compile-rule.cxx
parentd590c966dbcd6faef64e87ba0fc9b105a310f7df (diff)
Fix trace and clarify comments
Diffstat (limited to 'libbuild2/cc/compile-rule.cxx')
-rw-r--r--libbuild2/cc/compile-rule.cxx21
1 files changed, 12 insertions, 9 deletions
diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx
index 1758749..55bfc2c 100644
--- a/libbuild2/cc/compile-rule.cxx
+++ b/libbuild2/cc/compile-rule.cxx
@@ -935,8 +935,11 @@ namespace build2
u = dd.mtime > mt;
}
+ // If updating for any of the above reasons, treat it as if doesn't
+ // exist.
+ //
if (u)
- mt = timestamp_nonexistent; // Treat as if it doesn't exist.
+ mt = timestamp_nonexistent;
// Update prerequisite targets (normally just the source file).
//
@@ -1026,14 +1029,14 @@ namespace build2
dd.write (p.second);
}
//
- // Don't clear if it was forced or the checksum should not be
- // relied upon.
+ // Don't clear the update flag if it was forced or the checksum
+ // should not be relied upon.
//
else if (first && !p.second.empty ())
{
// Clear the update flag and set the touch flag. Unless there
- // is no object file, of course. See also the md.mt logic
- // below.
+ // is no (usable) object file, of course. See also the md.mt
+ // logic below.
//
if (mt != timestamp_nonexistent)
{
@@ -1108,7 +1111,7 @@ namespace build2
// Note: trace is used in a test.
//
- l5 ([&]{trace << "extracting modules from " << t;});
+ l5 ([&]{trace << "extracting modules from " << src;});
// Extract the module dependency information in addition to header
// dependencies.
@@ -1191,11 +1194,11 @@ namespace build2
// somehow need to remember two timestamps: one for checking
// "preprocessor prerequisites" above and one for checking other
// prerequisites (like modules) below. So what we are going to do is
- // store the first in the target file (so we do touch it) and the
+ // "store" the first in the target file (so we do touch it) and the
// second in depdb (which is never newer that the target).
//
- // Perhaps when we start keeping the partially preprocessed this will
- // fall away? Yes, please.
+ // Perhaps when we start keeping the partially preprocessed output
+ // this will fall away? Yes, please.
//
md.mt = u ? timestamp_nonexistent : dd.mtime;
}