aboutsummaryrefslogtreecommitdiff
path: root/build/cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build/cxx')
-rw-r--r--build/cxx/compile.cxx11
-rw-r--r--build/cxx/link.cxx2
-rw-r--r--build/cxx/module.cxx9
3 files changed, 16 insertions, 6 deletions
diff --git a/build/cxx/compile.cxx b/build/cxx/compile.cxx
index bb42c30..514c57a 100644
--- a/build/cxx/compile.cxx
+++ b/build/cxx/compile.cxx
@@ -129,11 +129,12 @@ namespace build
t.prerequisite_targets.push_back (&pt);
}
- // Inject additional prerequisites. We only do it for update
- // since chances are we will have to update some of our
- // prerequisites in the process (auto-generated source code).
+ // Inject additional prerequisites. We only do it when
+ // performing update since chances are we will have to
+ // update some of our prerequisites in the process (auto-
+ // generated source code).
//
- if (a.operation () == update_id)
+ if (a == perform_update_id)
{
// The cached prerequisite target should be the same as what
// is in t.prerequisite_targets since we used standard
@@ -151,7 +152,7 @@ namespace build
{
case perform_update_id: return &perform_update;
case perform_clean_id: return &perform_clean;
- default: assert (false); return default_recipe;
+ default: return noop_recipe; // Configure update.
}
}
diff --git a/build/cxx/link.cxx b/build/cxx/link.cxx
index 9602e75..3b628b5 100644
--- a/build/cxx/link.cxx
+++ b/build/cxx/link.cxx
@@ -722,7 +722,7 @@ namespace build
{
case perform_update_id: return &perform_update;
case perform_clean_id: return &perform_clean;
- default: assert (false); return default_recipe;
+ default: return noop_recipe; // Configure update.
}
}
diff --git a/build/cxx/module.cxx b/build/cxx/module.cxx
index c2469d9..7171738 100644
--- a/build/cxx/module.cxx
+++ b/build/cxx/module.cxx
@@ -79,6 +79,15 @@ namespace build
rs.insert<libso> (perform_id, update_id, "cxx", link::instance);
rs.insert<libso> (perform_id, clean_id, "cxx", link::instance);
+ // Register for configure so that we detect unresolved imports
+ // during configuration rather that later, e.g., during update.
+ //
+ rs.insert<obja> (configure_id, update_id, "cxx", compile::instance);
+ rs.insert<objso> (configure_id, update_id, "cxx", compile::instance);
+ rs.insert<exe> (configure_id, update_id, "cxx", link::instance);
+ rs.insert<liba> (configure_id, update_id, "cxx", link::instance);
+ rs.insert<libso> (configure_id, update_id, "cxx", link::instance);
+
//@@ Should we check if install module was loaded (see bin)?
//
rs.insert<exe> (perform_id, install_id, "cxx", install::instance);