cmake: Add uninstall target #374

pull VijayabaskarR-06 wants to merge 1 commits into bitcoin-core:master from VijayabaskarR-06:uninstall-target changing 3 files +71 −0
  1. VijayabaskarR-06 commented at 4:15 AM on October 7, 2026: none

    Fixes #167.

    Adds a "make uninstall" target that removes installed files from all "install_manifest*.txt files and documents it in "doc/install.md".

    The approach suggested in the issue only checks "install_manifest.txt", so it does not work for "make installbin" and "make installlib". The new script checks all the manifest files and also handles paths with spaces and dangling symlinks.

    It shows an error if a file cannot be removed, such as when it needs sudo. Directories are not removed since they may be shared with other packages.

    The target is only added for standalone builds so it will not conflict with an uninstall target in a parent project.

    I tested this on Ubuntu 24.04 with libcapnpdev and it was succesfully tested So fro this I tested with a script in a clean Ubuntu 24.04 container with libcapnpdev installed via apt. It covers normal install, install-bin and install-lib, DESTDIR, and building as a subproject. and here is the result output for it

    <img width="865" height="668" alt="uninstall-test-results" src="https://github.com/user-attachments/assets/3e8642ff-918f-4ef7-a768-a14204c6a67e" />

  2. cmake: Add uninstall target
    Add a "make uninstall" target that removes the files recorded in the
    install_manifest*.txt files that install steps write to the build
    directory.
    
    A plain "xargs rm < install_manifest.txt" is not enough, because the
    "make install-bin" and "make install-lib" targets install single
    components, and CMake records those in install_manifest_bin.txt,
    install_manifest_lib.txt and install_manifest_common.txt instead.
    The script reads all of these, handles paths containing spaces and
    dangling symlinks, and fails with an error if a file cannot be removed,
    for example when the install step needed sudo.
    
    Manifests list paths without the DESTDIR prefix, so the script prepends
    DESTDIR the same way cmake_install.cmake does. This makes "make
    uninstall DESTDIR=<dir>" remove a staged install without touching files
    installed directly under the install prefix.
    
    The target is only defined for standalone builds, so it does not
    conflict with an uninstall target in a parent project that uses
    libmultiprocess as a subdirectory.
    
    Fixes #167
    7844bd23fa
  3. DrahtBot commented at 4:15 AM on October 7, 2026: none

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-10-08 00:30 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me