Build the tools with $(MAKE), not bare make - #774
Closed
quarrel07 wants to merge 1 commit into
Closed
Conversation
macOS still ships GNU make 3.81 as `make`, and tools/Makefile generates its per-tool rules with `define COMPILE =`, which is 3.82 syntax. Under 3.81 those rules do not take effect and make falls back to its built-in %: %.c rule, so each tool is linked from its first source file alone. n64graphics is built from n64graphics.c and utils.c, so it fails with an undefined _g_verbosity rather than anything that points at the cause. The docs already tell macOS users to build with gmake, but this line then calls bare make and undoes that. This makefile needs 4.0+ for != in the first place, so $(MAKE) is always a new enough make.
Contributor
Author
|
Folded into #772. |
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.
On macOS the tools are not built, and the failure points somewhere else entirely.
tools/Makefile:51generates its per-tool rules with:define NAME =is GNU make 3.82 syntax. macOS still ships 3.81 asmake, where those rules never take effect, so make falls back to its built-in%: %.crule and links each tool from its first source file alone.n64graphics_SOURCES := n64graphics.c utils.c, soutils.cis dropped:Nothing there suggests the make version is at fault.
docs/basics/compiling.mdalready tells macOS users to build withgmake, butMakefile:201then calls baremakeand undoes it. The root makefile uses!=, which needs make 4.0, so$(MAKE)is always new enough.Verified on macOS 26.6, Apple Silicon. Deleting
tools/n64graphicsand running the root build: with baremakeit stays missing and the build fails; with$(MAKE)it is rebuilt and make reportsmk64.us: OK.