From 4776ab7859e71bb6cec004a1aea05324ad33fd1d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 19 Aug 2016 15:35:06 +0200 Subject: Implement uninstall operation --- build2/cc/link.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'build2/cc/link.cxx') diff --git a/build2/cc/link.cxx b/build2/cc/link.cxx index df1fa7e..61dd0ad 100644 --- a/build2/cc/link.cxx +++ b/build2/cc/link.cxx @@ -595,8 +595,12 @@ namespace build2 // "library meta-information protocol". Don't do this if we are // called from the install rule just to check if we would match. // + auto op (a.operation ()); + auto oop (a.outer_operation ()); + if (seen_lib && lt != otype::e && - a.operation () != install_id && a.outer_operation () != install_id) + op != install_id && oop != install_id && + op != uninstall_id && oop != uninstall_id) { if (t.group != nullptr) t.group->prerequisite_targets.clear (); // lib{}'s @@ -1087,6 +1091,8 @@ namespace build2 { tracer trace (x, "link::perform_update"); + auto oop (a.outer_operation ()); + file& t (static_cast (xt)); scope& rs (t.root_scope ()); @@ -1107,7 +1113,7 @@ namespace build2 // assembly itself is generated later, after updating the target. Omit // it if we are updating for install. // - if (a.outer_operation () != install_id) + if (oop != install_id && oop != uninstall_id) rpath_timestamp = windows_rpath_timestamp (t); path mf ( @@ -1354,7 +1360,7 @@ namespace build2 { if (libs* ls = pt->is_a ()) { - if (a.outer_operation () != install_id) + if (oop != install_id && oop != uninstall_id) { sargs.push_back ("-Wl,-rpath," + ls->path ().directory ().string ()); @@ -1781,7 +1787,7 @@ namespace build2 // if (lt == otype::e && tclass == "windows") { - if (a.outer_operation () != install_id) + if (oop != install_id && oop != uninstall_id) windows_rpath_assembly (t, cast (rs[x_target_cpu]), rpath_timestamp, -- cgit v1.1