From 8c8bbd925f5e2ba326b14879d7b4ccebae2b8b63 Mon Sep 17 00:00:00 2001 From: Storm Knight Date: Thu, 26 Mar 2026 20:08:20 -0400 Subject: [PATCH] Makefile: move build prereqs from install-data to installcheck/bin-tarball (fixes #8971) install-data should only copy files, not trigger builds. This is important because `make install` is often run with `sudo` which has a different environment (missing Python deps, Rust toolchain, etc). Move doc-all and default-targets build dependencies from install-data to: - installcheck: ensure manpages and Rust plugins exist before staging - bin-tarball: ensure complete tarball with all artifacts `make install` itself remains pure copy, while higher-level targets that expect installable artifacts still trigger the necessary builds. Fixes #8971 Addresses review feedback on #8976 --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index fb9bd9110205..68b52446c9cf 100644 --- a/Makefile +++ b/Makefile @@ -955,7 +955,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) @@ -1020,7 +1020,7 @@ uninstall: rm -f $(DESTDIR)$(docdir)/`basename $$f`; \ done -installcheck: all-programs +installcheck: all-programs doc-all default-targets @rm -rf testinstall || true $(MAKE) DESTDIR=$$(pwd)/testinstall install testinstall$(bindir)/lightningd --test-daemons-only --lightning-dir=testinstall @@ -1042,7 +1042,7 @@ ifneq ($(VERSION),) bin-tarball: clightning-$(VERSION)-$(DISTRO).tar.xz clightning-$(VERSION)-$(DISTRO).tar.xz: DESTDIR=$(shell pwd)/ clightning-$(VERSION)-$(DISTRO).tar.xz: prefix=opt/clightning -clightning-$(VERSION)-$(DISTRO).tar.xz: install +clightning-$(VERSION)-$(DISTRO).tar.xz: install doc-all default-targets trap "rm -rf opt" 0; tar cvfa $@ opt/ endif