Skip to content

[build] Remove unused bin/configuration.mk#11580

Open
jonathanpeppers wants to merge 2 commits into
mainfrom
jonathanpeppers/remove-configuration-mk
Open

[build] Remove unused bin/configuration.mk#11580
jonathanpeppers wants to merge 2 commits into
mainfrom
jonathanpeppers/remove-configuration-mk

Conversation

@jonathanpeppers
Copy link
Copy Markdown
Member

Why

bin/configuration.mk exists only to persist CONFIGURATION=<value> between Unix make invocations. Removing it lets us delete the only meaningful contents of Step_GenerateFiles.Unix.cs, continuing the slow removal of xaprepare (see precedent: #11568, #11529).

What

  • Drop -include bin/configuration.mk from the top of Makefile. The CONFIGURATION ?= Debug fallback at the top of the file is unchanged.
  • Delete build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.Unix.cs entirely (it contained GeneratedConfigurationFile and a one-line AddUnixPostBuildSteps partial that registered it).

The partial void AddUnixPostBuildSteps (Context context, List<GeneratedFile> steps); declaration in Step_GenerateFiles.cs is intentionally left in place — partial methods without an implementation are legal in C#, and the call site becomes a zero-cost no-op. Step_GenerateFiles.Windows.cs implements a different partial (AddOSSpecificSteps) and is unaffected.

Why this is safe

Caller Pre-change behavior Post-change behavior
All CI YAML (build-linux-steps.yaml, build-macos-steps.yaml, commercial-build.yaml, azure-pipelines-apidocs.yaml) Passes CONFIGURATION=$(XA.Build.Configuration) on every make call Same — explicit value still wins
build.sh (make prepare && make jenkins && make pack-dotnet) First make prepare runs against an empty bin/, so the -include no-ops and ?= Debug takes effect Identical — ?= Debug still takes effect
Fresh local checkout, bare make all ?= Debug (no bin/configuration.mk yet) Same
Local dev who runs make prepare CONFIGURATION=Release then bare make all Persisted Release via bin/configuration.mk Now defaults back to Debug — must pass CONFIGURATION=Release on every invocation

That last case is the only behavior change. It was never documented as a contract anywhere in Documentation/ or README.md, and developers building Release locally should be passing the flag explicitly anyway.

Verification

  • git grep "configuration\.mk" and git grep "GeneratedConfigurationFile": zero matches after this change.
  • dotnet build build-tools/xaprepare/xaprepare/xaprepare.csproj: 0 warnings, 0 errors.
  • Rubber-duck review: no remaining Path.Combine(..., "configuration.mk") references, no Makefile target depends on bin/configuration.mk as a prerequisite, and the leftover partial-method declaration is benign.

`bin/configuration.mk` existed only to persist `CONFIGURATION=<value>`
between Unix `make` invocations. CI passes `CONFIGURATION=...` explicitly
on every `make` call, and `build.sh` never sets it (so a fresh checkout
always hit the `CONFIGURATION ?= Debug` default anyway). Dropping the
include lets us delete the only meaningful contents of
`Step_GenerateFiles.Unix.cs`, continuing the slow removal of xaprepare.

- Drop `-include bin/configuration.mk` from the top of `Makefile`. The
  `CONFIGURATION ?= Debug` fallback is unchanged.
- Delete `build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.Unix.cs`
  entirely. The `partial void AddUnixPostBuildSteps (...)` declaration in
  `Step_GenerateFiles.cs` is left as a no-op (legal C#); the call site
  becomes a zero-cost no-op. `Step_GenerateFiles.Windows.cs` implements a
  different partial (`AddOSSpecificSteps`) and is unaffected.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 4, 2026 23:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the Unix make configuration persistence mechanism (bin/configuration.mk) as part of the ongoing cleanup/removal of xaprepare, relying solely on the existing CONFIGURATION ?= Debug default and explicit CONFIGURATION=... passed to make.

Changes:

  • Removed -include bin/configuration.mk from the repo Makefile.
  • Deleted the Unix-only xaprepare generated-file step that produced bin/configuration.mk.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Makefile Stops including bin/configuration.mk, leaving CONFIGURATION ?= Debug as the sole default mechanism.
build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.Unix.cs Removes the generator that created bin/configuration.mk and the Unix partial-step registration.

Comment thread Makefile
After deleting `Step_GenerateFiles.Unix.cs`, the `partial void
AddUnixPostBuildSteps (...)` declaration and its call site in
`Step_GenerateFiles.cs` were no-ops. Remove them so the file no longer
references a vestige of the `bin/configuration.mk` generator.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants