aboutsummaryrefslogtreecommitdiff
path: root/build2/install/operation.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-19 15:35:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-19 15:35:06 +0200
commit4776ab7859e71bb6cec004a1aea05324ad33fd1d (patch)
tree33d37fd63f6d8d0d6a10f8373458da07fe438dc0 /build2/install/operation.cxx
parentd19ae162c2cf8059b3145ded8cfbce2ab01c8fc6 (diff)
Implement uninstall operation
Diffstat (limited to 'build2/install/operation.cxx')
-rw-r--r--build2/install/operation.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/build2/install/operation.cxx b/build2/install/operation.cxx
index 77deb2c..f08d85d 100644
--- a/build2/install/operation.cxx
+++ b/build2/install/operation.cxx
@@ -29,5 +29,25 @@ namespace build2
&install_pre,
nullptr
};
+
+ // Note that we run update as a pre-operation, just like install. Which
+ // may seem bizarre at first. We do it to obtain the exact same dependency
+ // graph as install so that we uninstall exactly the same set of files as
+ // install would install. Note that just matching the rules without
+ // executing them may not be enough: for example, a presence of an ad hoc
+ // group member may only be discovered after executing the rule (e.g., VC
+ // link.exe only creates a DLL's import library if there are any exported
+ // symbols).
+ //
+ operation_info uninstall {
+ uninstall_id,
+ "uninstall",
+ "uninstall",
+ "uninstalling",
+ "is not installed",
+ execution_mode::last,
+ &install_pre,
+ nullptr
+ };
}
}