fix(make): colon-namespaced targets silently no-op on macOS Make 3.81#351
Merged
DorianZheng merged 2 commits intomainfrom Mar 6, 2026
Merged
fix(make): colon-namespaced targets silently no-op on macOS Make 3.81#351DorianZheng merged 2 commits intomainfrom
DorianZheng merged 2 commits intomainfrom
Conversation
macOS ships Make 3.81 which bifurcates `\:` targets into two database entries: one with backslash (gets .PHONY but no recipe) and one without (gets recipe but not .PHONY). The dependency chain follows backslash versions, which are empty shells — so `make setup` does nothing. Fix: remove colon targets from PHONY_TARGETS and add a .DEFAULT rule that strips the backslash and re-invokes make with the clean name. This bridges the bifurcated entries without renaming any targets. Verified on Make 3.81: - `make setup` runs setup scripts (not "Nothing to be done") - `make setup:build` works directly - `make typo` prints proper error, exit 2 - `make help` unchanged
…colon namespacing All other Makefile targets use colon-style namespacing (setup:build, dev:python, test:unit:rust, etc.). The .DEFAULT bifurcation rule from the previous commit ensures colon targets resolve correctly as prerequisites on macOS Make 3.81.
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.
Summary
make setup(and all\:-namespaced targets) silently doing nothing on macOS Make 3.81 due to target name bifurcation.DEFAULTrule to bridge bifurcated backslash targets back to their real recipe counterpartsPHONY_TARGETSso.DEFAULTcan fire on the empty backslash versionsProblem
macOS ships Make 3.81, which bifurcates
\:targets into two database entries:setup\:build— gets.PHONYattribute but no recipe, no prereqssetup:build— gets recipe + prereqs but is not phonyThe dependency chain (
setup → setup\:dev → setup\:build) follows backslash versions, which are empty shells. The real content lives in unreachable non-backslash versions.Solution
By removing colon targets from
.PHONY, the empty backslash targets have no recipe, no file, and are not phony — so.DEFAULTfires. The.DEFAULTrule strips the\and re-invokes$(MAKE)with the clean name, hitting the non-backslash target that has the recipe.No target renaming, no doc changes, no CI changes.
Test plan
make -n setup—.DEFAULTfires, reaches real recipemake -n setup:build— direct invocation worksmake typo— proper error message + exit 2, no infinite loopmake -n help— unchanged, shows colon-style namesmake -n dev:python— works directly