Skip to content

refactor(make): proper per-file dependency tracking for ASM programs - #711

Merged
MauroToscano merged 3 commits into
mainfrom
feat/proper_deps_make
Jun 25, 2026
Merged

MauroToscano merged 3 commits into
mainfrom
feat/proper_deps_make

Conversation

@Oppen

@Oppen Oppen commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace the shell for loop in compile-programs-asm with a pattern rule $(ASM_ARTIFACTS_DIR)/%.elf: $(ASM_PROGRAMS_DIR)/%.s, so make tracks each .s → .elf pair individually and skips files that haven't changed
  • Add ASM_ARTIFACTS computed via patsubst, consistent with how RUST_ARTIFACTS and BENCH_ARTIFACTS are already defined
  • Use an order-only directory prerequisite (| $(ASM_ARTIFACTS_DIR)) so the output directory is created once, not on every file build
  • Remove test-asm-no-compile, test-rust-no-compile, and test-no-compile — these existed solely to bypass the unconditional loop rebuild; test-asm, test-rust, and test-executor now inline their cargo test commands directly

Test plan

  • make compile-programs-asm compiles all 212 .s files on a clean build
  • A second make compile-programs-asm with no source changes prints nothing (all up to date)
  • Touching a single .s file recompiles only that file
  • make test-asm, make test-rust, make test-executor work end-to-end

Oppen and others added 2 commits June 25, 2026 15:28
Replace the shell for-loop in compile-programs-asm with a pattern rule
so make tracks each .s → .elf pair individually and only recompiles
files whose source changed.

Remove the *-no-compile targets (test-asm-no-compile, test-rust-no-compile,
test-no-compile) that existed solely to skip the unconditional loop rebuild;
test-asm, test-rust, and test-executor now inline their cargo commands after
their compile prerequisites.
…es (#713)

Move `mkdir -p` out of the Rust and Bench recipe bodies and into
dedicated directory targets with order-only prerequisites, matching
the pattern already used for ASM artifacts in this branch.
@MauroToscano
MauroToscano enabled auto-merge June 25, 2026 18:47
@MauroToscano
MauroToscano added this pull request to the merge queue Jun 25, 2026
Merged via the queue into main with commit 03b3461 Jun 25, 2026
12 checks passed
@MauroToscano
MauroToscano deleted the feat/proper_deps_make branch June 25, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants