Makefile: remove build prerequisites from install targets (fixes #8971)#8976
Open
ThomsenDrake wants to merge 1 commit intoElementsProject:masterfrom
Open
Makefile: remove build prerequisites from install targets (fixes #8971)#8976ThomsenDrake wants to merge 1 commit intoElementsProject:masterfrom
ThomsenDrake wants to merge 1 commit intoElementsProject:masterfrom
Conversation
…entsProject#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 ElementsProject#8971
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8971
Problem
make installtriggers builds (wiregen, rust compilation, python scripts) because bothinstall-programandinstall-datalist build outputs ($(BIN_PROGRAMS),$(PKGLIBEXEC_PROGRAMS),$(PLUGINS),$(PY_PLUGINS),$(MAN1PAGES), etc.) as Makefile prerequisites.This means
make installcan fail if build dependencies are missing, even when all artifacts are already built. This is particularly problematic for:make installin a clean environmentuv run makebut install with plainmake installFix
Remove build output prerequisites from both
install-programandinstall-datatargets somake installonly copies pre-built files, as documented in the comment now added to the Makefile.Building remains available via
makeormake all.Changes
Makefile: 2-line change (remove$(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS) $(PY_PLUGINS)from install-program, remove$(MAN1PAGES) $(MAN5PAGES) $(MAN7PAGES) $(MAN8PAGES) $(DOC_DATA)from install-data)make installshould only ever copy files #8971