From d2218726f5e1385bffac1f47e38640e4284ccec8 Mon Sep 17 00:00:00 2001 From: Storm Knight Date: Tue, 24 Mar 2026 13:34:08 -0400 Subject: [PATCH] Makefile: remove build prerequisites from install targets (fixes #8971) make install should only copy pre-built files, never trigger builds. Previously, install-program listed $(BIN_PROGRAMS), $(PKGLIBEXEC_PROGRAMS), $(PLUGINS), and $(PY_PLUGINS) as prerequisites, causing make to rebuild binaries if they were missing or stale. Similarly, install-data listed man page prerequisites, triggering Python-based man page generation. This is problematic when running `sudo make install` because sudo has a different environment (missing per-user Rust, uv, Python modules like mako, etc.). After this change, `make install` only creates directories (via installdirs) and copies files. If expected files are missing, the install commands will fail with clear error messages indicating which files need to be built first. Fixes #8971 --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fb9bd9110205..100f1f5bce33 100644 --- a/Makefile +++ b/Makefile @@ -934,7 +934,9 @@ installdirs: # $(PLUGINS) is defined in plugins/Makefile. -install-program: installdirs $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS) $(PY_PLUGINS) +# make install should only copy pre-built files, never trigger builds. +# Building is done via 'make' or 'make all'; see #8971. +install-program: installdirs @$(NORMAL_INSTALL) $(INSTALL_PROGRAM) $(BIN_PROGRAMS) $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) $(PKGLIBEXEC_PROGRAMS) $(DESTDIR)$(pkglibexecdir) @@ -955,7 +957,7 @@ MAN7PAGES = $(filter %.7,$(MANPAGES)) MAN8PAGES = $(filter %.8,$(MANPAGES)) DOC_DATA = README.md LICENSE -install-data: installdirs $(MAN1PAGES) $(MAN5PAGES) $(MAN7PAGES) $(MAN8PAGES) $(DOC_DATA) +install-data: installdirs @$(NORMAL_INSTALL) $(INSTALL_DATA) $(MAN1PAGES) $(DESTDIR)$(man1dir) $(INSTALL_DATA) $(MAN5PAGES) $(DESTDIR)$(man5dir)