Skip to content

refactor: simplify our Makefile#2008

Open
coriolinus wants to merge 9 commits intomainfrom
prgn/refactor/simplify-make
Open

refactor: simplify our Makefile#2008
coriolinus wants to merge 9 commits intomainfrom
prgn/refactor/simplify-make

Conversation

@coriolinus
Copy link
Copy Markdown
Contributor

What's new in this PR

The Makefile was a beast approaching 1000 LOC; too much to hold in my head. This breaks it up a bit into something easier to work with.


PR Submission Checklist for internal contributors
  • The PR Title
    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

coriolinus and others added 9 commits April 2, 2026 13:34
The ~925-line Makefile is split into 10 focused files:

  make/config.mk    — release mode, platform detection, STAMPS/TOUCH_STAMP
  make/sources.mk   — all source file enumerations (Rust, Kotlin, Swift, TS)
  make/ffi.mk       — uniffi-bindgen, ffi-library, bindings-* targets
  make/ios.mk       — iOS device/simulator/xcframework targets
  make/android.mk   — Android ARMv7/ARMv8/x86 targets
  make/jvm.mk       — JVM/KMP build and test targets
  make/ts.mk        — TypeScript/WASM build and test targets
  make/interop.mk   — interop binary and test
  make/docs.mk      — documentation generation targets
  make/fmt.mk       — format and lint targets for all languages

The top-level Makefile now contains only the include directives,
aggregate targets (all/local/bindings/clean), and the lazy-targets
machinery with an explanatory comment.

Two pre-existing forward-reference bugs are also fixed: SWIFT_FILES
and TS_NATIVE/BROWSER_TEST_FILES were defined after their `:=`
assignments, making them silently empty. Both are now defined in
sources.mk, which is included before the files that use them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
grep prepends filename: when searching multiple files. Adding -h
suppresses that prefix so awk captures the target name correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…k.sh

The 55-line inline shell recipe in ios-create-xcframework is moved to a
standalone script, consistent with run-ios-tests.sh and run-android-tests.sh.
The script locates the repo root via git so it can be run directly from any
working directory, not just from Make.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The ifeq branch and stamp-deletion pattern are non-obvious. The new
comment explains why both modes exist (CI always-runs vs. local
iteration), what the stamp deletion achieves, and where the real test
logic lives.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coriolinus coriolinus marked this pull request as ready for review April 2, 2026 17:59
@coriolinus coriolinus requested a review from a team April 2, 2026 17:59
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.

1 participant