#1163

Avoid rebuilding binaries during make install

Draftvitlavwants to merge intofrom

The multiconf build cache includes the compiler and flags in its key. When a packaging workflow builds with optimization flags and then installs with CC=false CXX=false, make install currently selects a different cache entry and attempts compilation even though the required binaries have already been built.

Remove the build prerequisites from the static-library, shared-library and CLI installation targets. Installation copies the existing outputs and fails if any required file is missing. No additional option is needed. The pkg-config file is still generated for the installation prefix.

This deliberately separates building from installation: run make followed by make install. Installation from an unbuilt tree now fails, and parallel make -j all install is not supported; build and install must be sequential.

Validation:

  • Built on dev with make -j4 lib xxhsum_and_links MOREFLAGS=-O2, then ran ordinary make install CC=false CXX=false PREFIX=/usr LIBDIR=/usr/lib64 into a temporary DESTDIR successfully.
  • Independently removed the CLI, static library and shared library and verified each installation target fails with a missing-file error.

Activity

1

This pull request is a draft

Merging is unavailable until it is marked ready for review.