aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/pkgconfig.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-10-16 09:30:39 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-10-16 09:30:39 +0200
commit5d68312bd6973407ae7546ea73d91b4dc8c37741 (patch)
tree31c28ec1594152c66b159dad491cb2fcc8fd97e1 /libbuild2/cc/pkgconfig.cxx
parentf034a1bb4a7458e53e438b696713129c099bd185 (diff)
Skip regenerating .pc files during uninstall
Diffstat (limited to 'libbuild2/cc/pkgconfig.cxx')
-rw-r--r--libbuild2/cc/pkgconfig.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/libbuild2/cc/pkgconfig.cxx b/libbuild2/cc/pkgconfig.cxx
index f0dc5c4..151473d 100644
--- a/libbuild2/cc/pkgconfig.cxx
+++ b/libbuild2/cc/pkgconfig.cxx
@@ -1473,7 +1473,17 @@ namespace build2
const path& p (t->path ());
- // Note that generation can time some time if we have a large number of
+ // If we are uninstalling, skip regenerating the file if it already
+ // exists (I think we could have skipped this even if it doesn't exist,
+ // but let's keep things close to the install case).
+ //
+ if (ctx.current_action ().outer_operation () == uninstall_id)
+ {
+ if (exists (p))
+ return;
+ }
+
+ // Note that generation can take some time if we have a large number of
// prerequisite libraries.
//
if (verb)