aboutsummaryrefslogtreecommitdiff
path: root/build/cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-03 17:20:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-03 17:20:15 +0200
commit6298f309bddaf3f279a724034e2d1d3ce58e0e1a (patch)
treec41d46641fbc8789cb851a9f08649b0381c96b64 /build/cxx
parente6126827072270ab41efd91741f4c22f3eac4bc8 (diff)
Clean up rule names
Diffstat (limited to 'build/cxx')
-rw-r--r--build/cxx/module.cxx131
1 files changed, 68 insertions, 63 deletions
diff --git a/build/cxx/module.cxx b/build/cxx/module.cxx
index 4c0e493..c704ab0 100644
--- a/build/cxx/module.cxx
+++ b/build/cxx/module.cxx
@@ -48,18 +48,57 @@ namespace build
load_module (false, "bin", r, b, loc);
}
+ // Enter module variables.
+ //
+ // @@ Probably should only be done on load; make sure reset() unloads
+ // modules.
+ //
+ // @@ Should probably cache the variable pointers so we don't have
+ // to keep looking them up.
+ //
+ if (first)
+ {
+ auto& v (var_pool);
+
+ v.find ("config.cxx", string_type); //@@ VAR type
+
+ v.find ("config.cxx.poptions", strings_type);
+ v.find ("config.cxx.coptions", strings_type);
+ v.find ("config.cxx.loptions", strings_type);
+ v.find ("config.cxx.libs", strings_type);
+
+ v.find ("cxx.poptions", strings_type);
+ v.find ("cxx.coptions", strings_type);
+ v.find ("cxx.loptions", strings_type);
+ v.find ("cxx.libs", strings_type);
+
+ v.find ("cxx.export.poptions", strings_type);
+ v.find ("cxx.export.coptions", strings_type);
+ v.find ("cxx.export.loptions", strings_type);
+ v.find ("cxx.export.libs", strings_type);
+
+ v.find ("cxx.std", string_type);
+
+ v.find ("h.ext", string_type);
+ v.find ("c.ext", string_type);
+ v.find ("hxx.ext", string_type);
+ v.find ("ixx.ext", string_type);
+ v.find ("txx.ext", string_type);
+ v.find ("cxx.ext", string_type);
+ }
+
// Register target types.
//
{
- auto& tts (b.target_types);
+ auto& t (b.target_types);
- tts.insert<h> ();
- tts.insert<c> ();
+ t.insert<h> ();
+ t.insert<c> ();
- tts.insert<cxx> ();
- tts.insert<hxx> ();
- tts.insert<ixx> ();
- tts.insert<txx> ();
+ t.insert<cxx> ();
+ t.insert<hxx> ();
+ t.insert<ixx> ();
+ t.insert<txx> ();
}
// Register rules.
@@ -67,74 +106,40 @@ namespace build
{
using namespace bin;
- auto& rs (b.rules);
+ auto& r (b.rules);
- rs.insert<obja> (perform_id, update_id, "cxx", compile::instance);
- rs.insert<obja> (perform_id, clean_id, "cxx", compile::instance);
+ r.insert<obja> (perform_update_id, "cxx.compile", compile::instance);
- rs.insert<objso> (perform_id, update_id, "cxx", compile::instance);
- rs.insert<objso> (perform_id, clean_id, "cxx", compile::instance);
+ r.insert<obja> (perform_update_id, "cxx.compile", compile::instance);
+ r.insert<obja> (perform_clean_id, "cxx.compile", compile::instance);
- rs.insert<exe> (perform_id, update_id, "cxx", link::instance);
- rs.insert<exe> (perform_id, clean_id, "cxx", link::instance);
+ r.insert<objso> (perform_update_id, "cxx.compile", compile::instance);
+ r.insert<objso> (perform_clean_id, "cxx.compile", compile::instance);
- rs.insert<liba> (perform_id, update_id, "cxx", link::instance);
- rs.insert<liba> (perform_id, clean_id, "cxx", link::instance);
+ r.insert<exe> (perform_update_id, "cxx.link", link::instance);
+ r.insert<exe> (perform_clean_id, "cxx.link", link::instance);
- rs.insert<libso> (perform_id, update_id, "cxx", link::instance);
- rs.insert<libso> (perform_id, clean_id, "cxx", link::instance);
+ r.insert<liba> (perform_update_id, "cxx.link", link::instance);
+ r.insert<liba> (perform_clean_id, "cxx.link", link::instance);
+
+ r.insert<libso> (perform_update_id, "cxx.link", link::instance);
+ r.insert<libso> (perform_clean_id, "cxx.link", 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);
+ r.insert<obja> (configure_update_id, "cxx.compile", compile::instance);
+ r.insert<objso> (configure_update_id, "cxx.compile", compile::instance);
+
+ r.insert<exe> (configure_update_id, "cxx.link", link::instance);
+ r.insert<liba> (configure_update_id, "cxx.link", link::instance);
+ r.insert<libso> (configure_update_id, "cxx.link", link::instance);
//@@ Should we check if install module was loaded (see bin)?
//
- rs.insert<exe> (perform_id, install_id, "cxx", install::instance);
- rs.insert<liba> (perform_id, install_id, "cxx", install::instance);
- rs.insert<libso> (perform_id, install_id, "cxx", install::instance);
- }
-
- // Enter module variables.
- //
- // @@ Probably should only be done on load; make sure reset() unloads
- // modules.
- //
- // @@ Should probably cache the variable pointers so we don't have
- // to keep looking them up.
- //
- if (first)
- {
- var_pool.find ("config.cxx", string_type); //@@ VAR type
-
- var_pool.find ("config.cxx.poptions", strings_type);
- var_pool.find ("config.cxx.coptions", strings_type);
- var_pool.find ("config.cxx.loptions", strings_type);
- var_pool.find ("config.cxx.libs", strings_type);
-
- var_pool.find ("cxx.poptions", strings_type);
- var_pool.find ("cxx.coptions", strings_type);
- var_pool.find ("cxx.loptions", strings_type);
- var_pool.find ("cxx.libs", strings_type);
-
- var_pool.find ("cxx.export.poptions", strings_type);
- var_pool.find ("cxx.export.coptions", strings_type);
- var_pool.find ("cxx.export.loptions", strings_type);
- var_pool.find ("cxx.export.libs", strings_type);
-
- var_pool.find ("cxx.std", string_type);
-
- var_pool.find ("h.ext", string_type);
- var_pool.find ("c.ext", string_type);
- var_pool.find ("hxx.ext", string_type);
- var_pool.find ("ixx.ext", string_type);
- var_pool.find ("txx.ext", string_type);
- var_pool.find ("cxx.ext", string_type);
+ r.insert<exe> (perform_install_id, "cxx.install", install::instance);
+ r.insert<liba> (perform_install_id, "cxx.install", install::instance);
+ r.insert<libso> (perform_install_id, "cxx.install", install::instance);
}
// Configure.