Decomp libcd: CdStatus, CdMode, CdLastCom (+ Makefile commit-check fix)#17
Open
andreadellacorte wants to merge 2 commits into
Open
Conversation
GNU Make 4.4+ parses long flags in target-specific MAKEFLAGS as targets when invoked via $(MAKE), breaking commit-check. Passing the flag directly to each $(MAKE) invocation works on all make versions.
0ad68d1 to
a9b545d
Compare
ser-pounce
requested changes
May 24, 2026
| #include "common.h" | ||
|
|
||
| INCLUDE_ASM("build/src/SLUS_010.40/nonmatchings/libcd/SYS", CdStatus); | ||
| typedef void (*CdlCB)(unsigned char, unsigned char*); |
Owner
There was a problem hiding this comment.
This is already defined in <libcd.h> so it should be enough to add an #include at the top.
| remake: clean | ||
| $(MAKE) | ||
|
|
||
| commit-check remake: MAKEFLAGS += --no-print-directory |
Owner
There was a problem hiding this comment.
Suspicious change, are you sure it was breaking the build as per the commit comment? I compiled 4.4.1 from source to verify but it works fine on Ubuntu.
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
Two small commits:
src/main/psxsdk/libcd/sys.c(same compiler, 2.7.2-psx). All three are simple state-getters around psyq's static_cd_status/_cd_mode/_cd_lastcom.--no-print-directoryexplicitly to sub-makes — GNU Make 4.4+ (which is whatflake.nixships) parses long flags appended to target-specificMAKEFLAGSas targets in the sub-make, breakingmake commit-check. Passing the flag directly to each$(MAKE)invocation works on all make versions.Test plan
nix develop -c make commit-checkruns end-to-end (was previously failing on--no-print-directory)nix develop -c bash -lc 'make format && git diff --exit-code'cleanmake -jsrc/SLUS_010.40/libcd/andMakefile